From 2502642bea9be5989beef958de3b1cfd97c580c8 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 17 Oct 2014 15:24:32 +0400 Subject: [PATCH] added makeShadow(..) docs... Signed-off-by: Alex A. Naanou --- ui (gen4)/ribbons.js | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/ui (gen4)/ribbons.js b/ui (gen4)/ribbons.js index acf6989a..5f7e72ba 100755 --- a/ui (gen4)/ribbons.js +++ b/ui (gen4)/ribbons.js @@ -313,9 +313,32 @@ module.RibbonsPrototype = { return this }, + // Make a "shadow" image for use with image oriented animations... + // + // .makeShadwo([][, ][, ]) + // -> + // + // A shadow is a clone of placed directly above it while it + // is hidden (transparent), calling will remove the shadwo + // and restore the original image, if is set then the shadow + // will be moved to the image location, and sets the time delay + // to provision for shadow animations. + // + // is a function, that when called will remove the shadow + // and restore image state. + // + // is the target image to clone + // + // if is set, will shift the shadow to target + // image offset before removing it (default: false). + // + // sets the delay before the shadow is removed and the target + // state is restored (default: 200). + // // XXX make this work for multiple targets... // XXX avoid hardcoded delays... - makeShadow: function(target, animate){ + makeShadow: function(target, animate, delay){ + delay = delay || 200 var img = this.getImage(target) var gid = this.getElemGID(img) var s = this.getScale() @@ -344,13 +367,12 @@ module.RibbonsPrototype = { setTimeout(function(){ img.removeClass('moving') shadow.remove() - }, 200) + }, delay) return img } }, - // Contextual getters... // Get ribbon...