mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added makeShadow(..) docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4f5b432c08
commit
2502642bea
@ -313,9 +313,32 @@ module.RibbonsPrototype = {
|
|||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Make a "shadow" image for use with image oriented animations...
|
||||||
|
//
|
||||||
|
// .makeShadwo([<image>][, <animate>][, <delay>])
|
||||||
|
// -> <finalize>
|
||||||
|
//
|
||||||
|
// A shadow is a clone of <image> placed directly above it while it
|
||||||
|
// is hidden (transparent), calling <finalize> will remove the shadwo
|
||||||
|
// and restore the original image, if <animate> is set then the shadow
|
||||||
|
// will be moved to the image location, and <delay> sets the time delay
|
||||||
|
// to provision for shadow animations.
|
||||||
|
//
|
||||||
|
// <finalize> is a function, that when called will remove the shadow
|
||||||
|
// and restore image state.
|
||||||
|
//
|
||||||
|
// <image> is the target image to clone
|
||||||
|
//
|
||||||
|
// <animate> if is set, <finalize> will shift the shadow to target
|
||||||
|
// image offset before removing it (default: false).
|
||||||
|
//
|
||||||
|
// <delay> sets the delay before the shadow is removed and the target
|
||||||
|
// state is restored (default: 200).
|
||||||
|
//
|
||||||
// XXX make this work for multiple targets...
|
// XXX make this work for multiple targets...
|
||||||
// XXX avoid hardcoded delays...
|
// XXX avoid hardcoded delays...
|
||||||
makeShadow: function(target, animate){
|
makeShadow: function(target, animate, delay){
|
||||||
|
delay = delay || 200
|
||||||
var img = this.getImage(target)
|
var img = this.getImage(target)
|
||||||
var gid = this.getElemGID(img)
|
var gid = this.getElemGID(img)
|
||||||
var s = this.getScale()
|
var s = this.getScale()
|
||||||
@ -344,13 +367,12 @@ module.RibbonsPrototype = {
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
img.removeClass('moving')
|
img.removeClass('moving')
|
||||||
shadow.remove()
|
shadow.remove()
|
||||||
}, 200)
|
}, delay)
|
||||||
return img
|
return img
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Contextual getters...
|
// Contextual getters...
|
||||||
|
|
||||||
// Get ribbon...
|
// Get ribbon...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user