mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-31 19:30:07 +00:00
more tweaking on .placeImage(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cc43b7c4eb
commit
418ec659d5
@ -248,17 +248,16 @@ module.RibbonsPrototype = {
|
|||||||
|
|
||||||
// Place an image...
|
// Place an image...
|
||||||
//
|
//
|
||||||
// Place gid at at offset from current position:
|
// Place target at at offset from current position:
|
||||||
// .placeImage(gid, offset)
|
// .placeImage(target, offset)
|
||||||
// -> image
|
// -> image
|
||||||
//
|
//
|
||||||
// Place gid at image position:
|
// Place target at image position:
|
||||||
// .placeImage(gid, image)
|
// .placeImage(target, image)
|
||||||
// .placeImage(gid, image, 'before')
|
// .placeImage(target, image, 'before')
|
||||||
// .placeImage(gid, image, 'after')
|
// .placeImage(target, image, 'after')
|
||||||
// -> image
|
// -> image
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// NOTE: mode is defaults to 'before'.
|
// NOTE: mode is defaults to 'before'.
|
||||||
// NOTE: if image gid does not exist it will be created.
|
// NOTE: if image gid does not exist it will be created.
|
||||||
//
|
//
|
||||||
@ -272,7 +271,7 @@ module.RibbonsPrototype = {
|
|||||||
// offset on same ribbon...
|
// offset on same ribbon...
|
||||||
if(typeof(to) == typeof(123)){
|
if(typeof(to) == typeof(123)){
|
||||||
if(to == 0){
|
if(to == 0){
|
||||||
return target
|
return img
|
||||||
}
|
}
|
||||||
var i = to
|
var i = to
|
||||||
var images = img[i > 0 ? 'nextAll' : 'prevAll']('.image')
|
var images = img[i > 0 ? 'nextAll' : 'prevAll']('.image')
|
||||||
@ -283,6 +282,9 @@ module.RibbonsPrototype = {
|
|||||||
} else {
|
} else {
|
||||||
var i = mode == 'before' ? -1 : 1
|
var i = mode == 'before' ? -1 : 1
|
||||||
to = this.getImage(to)
|
to = this.getImage(to)
|
||||||
|
if(to[0] == img[0]){
|
||||||
|
return img
|
||||||
|
}
|
||||||
var images = to[mode]('.image')
|
var images = to[mode]('.image')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user