From 418ec659d511ba2a23f2237b494054002a91a0af Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 25 Jul 2014 07:01:08 +0400 Subject: [PATCH] more tweaking on .placeImage(..)... Signed-off-by: Alex A. Naanou --- ui (gen4)/ribbons.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui (gen4)/ribbons.js b/ui (gen4)/ribbons.js index 90096bc2..7377035b 100755 --- a/ui (gen4)/ribbons.js +++ b/ui (gen4)/ribbons.js @@ -248,17 +248,16 @@ module.RibbonsPrototype = { // Place an image... // - // Place gid at at offset from current position: - // .placeImage(gid, offset) + // Place target at at offset from current position: + // .placeImage(target, offset) // -> image // - // Place gid at image position: - // .placeImage(gid, image) - // .placeImage(gid, image, 'before') - // .placeImage(gid, image, 'after') + // Place target at image position: + // .placeImage(target, image) + // .placeImage(target, image, 'before') + // .placeImage(target, image, 'after') // -> image // - // // NOTE: mode is defaults to 'before'. // NOTE: if image gid does not exist it will be created. // @@ -272,7 +271,7 @@ module.RibbonsPrototype = { // offset on same ribbon... if(typeof(to) == typeof(123)){ if(to == 0){ - return target + return img } var i = to var images = img[i > 0 ? 'nextAll' : 'prevAll']('.image') @@ -283,6 +282,9 @@ module.RibbonsPrototype = { } else { var i = mode == 'before' ? -1 : 1 to = this.getImage(to) + if(to[0] == img[0]){ + return img + } var images = to[mode]('.image') }