mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-23 11:41:39 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e20e457061
commit
80ac4b03e1
@ -722,12 +722,25 @@ function centerRibbons(mode, no_skip_current, no_skip_hidden){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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...
|
// skip ribbons outside of the viewer...
|
||||||
// NOTE: we are accounting for position relative to image...
|
// NOTE: we are accounting for position relative to image...
|
||||||
// NOTE: we need to factor in image height as the distance is
|
// NOTE: we need to factor in image height as the distance is
|
||||||
// between cleanly ribbon centers will mean that half
|
// between cleanly ribbon centers will mean that half
|
||||||
// hidden ribbons will not get updated...
|
// hidden ribbons will not get updated...
|
||||||
if(no_skip_hidden != true){
|
|
||||||
var d = Math.abs(getRelativeVisualPosition(cur, ribbon).top)
|
var d = Math.abs(getRelativeVisualPosition(cur, ribbon).top)
|
||||||
if( d - h/2 >= R ){
|
if( d - h/2 >= R ){
|
||||||
return
|
return
|
||||||
|
|||||||
24
ui/setup.js
24
ui/setup.js
@ -95,30 +95,6 @@ function setupDataBindings(viewer){
|
|||||||
return
|
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...
|
// prepare for loading...
|
||||||
var gid = getImageGID(image)
|
var gid = getImageGID(image)
|
||||||
var gr = DATA.ribbons[r]
|
var gr = DATA.ribbons[r]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user