cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-12-09 21:59:18 +04:00
parent e20e457061
commit 80ac4b03e1
2 changed files with 18 additions and 29 deletions

View File

@ -722,12 +722,25 @@ function centerRibbons(mode, no_skip_current, no_skip_hidden){
return
}
// skip ribbons outside of the viewer...
// NOTE: we are accounting for position relative to image...
// NOTE: we need to factor in image height as the distance is
// between cleanly ribbon centers will mean that half
// hidden ribbons will not get updated...
// skip hidden ribbons...
if(no_skip_hidden != true){
/* NOTE: this is commented out as it is not really needed now
* uncomment if a need arises...
// skip ribbons that are not visible or are not displayed...
// NOTE: we do not make an attempt to test each and every
// way a ribbon can be hidden...
if(ribbon.css('visibility') == 'hidden'
|| ribbon.css('display') == 'none'
|| ribbon.css('opacity') == 0){
return
}
*/
// skip ribbons outside of the viewer...
// NOTE: we are accounting for position relative to image...
// NOTE: we need to factor in image height as the distance is
// between cleanly ribbon centers will mean that half
// hidden ribbons will not get updated...
var d = Math.abs(getRelativeVisualPosition(cur, ribbon).top)
if( d - h/2 >= R ){
return

View File

@ -95,30 +95,6 @@ function setupDataBindings(viewer){
return
}
/* NOTE: this is not really needed as we are skipping this stuff
// in centerRibbons(...)
// skip the whole thing if the ribbon is not visible, i.e. outside
// of viewer area...
var R = $('.viewer').height()/2
var h = image.height()
var d = Math.abs(getRelativeVisualPosition(image, ribbon).top)
if( d - h/2 >= R ){
return
}
*/
/* NOTE: this is commented out as it is not really needed now
* uncomment if a need arises...
// skip ribbons that are not visible or are not displayed...
// NOTE: we do not make an attempt to test each and every
// way a ribbon can be hidden...
if(ribbon.css('visibility') == 'hidden'
|| ribbon.css('display') == 'none'
|| ribbon.css('opacity') == 0){
return
}
*/
// prepare for loading...
var gid = getImageGID(image)
var gr = DATA.ribbons[r]