From 8e06a5a3f23b973b4a830440de8f893c648a510b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 23 May 2013 23:05:38 +0400 Subject: [PATCH] cleanup... Signed-off-by: Alex A. Naanou --- ui/base.js | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/ui/base.js b/ui/base.js index 803da00b..247a5a47 100755 --- a/ui/base.js +++ b/ui/base.js @@ -176,56 +176,6 @@ function getRelativeVisualPosition(outer, inner){ } -// NOTE: this is replaces by strategic outerWidth/outerHeight knowing -// about margins in a correct way... -/* -// Calculate relative position between two images or an image and a -// container -// -// This is a version of getRelativeVisualPosition(...) but it also -// accounts for: -// - partial scale (margins) -// - image rotation -// -// NOTE: both arguments ar optional... -// -// XXX this still causes a wrong inter-ribbon align... -function getRelativeImagePosition(a, b){ - if(b == null){ - var b = a == null ? $('.current.image') : $(a) - var a = $('.viewer') - } else { - var a = a == null ? $('.current.image') : $(a) - var b = $(b) - } - var scale = getElementScale($('.ribbon-set')) - - var a_t = a.offset() - var a_l = a_t.left - var a_t = a_t.top - var a_orientation = a.attr('orientation') - if(a_orientation == 90 || a_orientation == 270){ - a_t += parseFloat(a.css('margin-top')) * scale - a_l += parseFloat(a.css('margin-left')) * scale - } - - var b_t = b.offset() - var b_l = b_t.left - var b_t = b_t.top - var b_orientation = b.attr('orientation') - if(b_orientation == 90 || b_orientation == 270){ - b_t += parseFloat(b.css('margin-top')) * scale - b_l += parseFloat(b.css('margin-left')) * scale - } - - return { - top: b_t - a_t, - left: b_l - a_l - } -} -*/ - - // Returns the image size (width) as viewed on screen... // // dim can be: