From 84da434226986a199575be9b6739f01b18d20723 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 18 Oct 2014 04:36:47 +0400 Subject: [PATCH] added .reverseRibbons() action... Signed-off-by: Alex A. Naanou --- ui (gen4)/data.js | 4 ++++ ui (gen4)/viewer.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/data.js b/ui (gen4)/data.js index 2a019700..bd079bc1 100755 --- a/ui (gen4)/data.js +++ b/ui (gen4)/data.js @@ -898,6 +898,10 @@ module.DataPrototype = { return this }, + reverseRibbons: function(){ + this.ribbon_order.reverse() + }, + // Shift image... // // Shift image to target position: diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 56914be2..13d129f9 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -292,8 +292,11 @@ actions.Actions({ this.focusImage() }], - reverseImages: [ + reverseImages: ['Reverse image order', function(){ this.data.reverseImages() }], + reverseRibbons: ['Reverse ribbon order', + function(){ this.data.reverseRibbons() }], + // XXX this also requires images... sortImages: [ @@ -549,6 +552,13 @@ actions.Actions(Client, { this.ribbons.restoreTransitions() } }], + reverseRibbons: [ + function(target){ + return function(){ + // XXX this is cheating... + this.reload() + } + }], // basic image editing...