mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
current image indicator fading on fast scrolls, done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
414dae016e
commit
1cc214b12f
@ -69,11 +69,11 @@ body {
|
||||
/* XXX not 100% sure about this...
|
||||
*/
|
||||
:not(.no-transitions) .current-marker:not(.no-transitions) {
|
||||
-webkit-transition: left 0.1s ease-out, opacity 0.5s ease;
|
||||
-moz-transition: left 0.1s ease-out, opacity 0.5s ease;
|
||||
-ms-transition: left 0.1s ease-out, opacity 0.5s ease;
|
||||
-o-transition: left 0.1s ease-out, opacity 0.5s ease;
|
||||
transition: left 0.1s ease-out, opacity 0.5s ease;
|
||||
-webkit-transition: left 0.1s ease-out;
|
||||
-moz-transition: left 0.1s ease-out;
|
||||
-ms-transition: left 0.1s ease-out;
|
||||
-o-transition: left 0.1s ease-out;
|
||||
transition: left 0.1s ease-out;
|
||||
}
|
||||
|
||||
/* XXX should this be !important */
|
||||
|
||||
@ -1862,6 +1862,8 @@ module.CurrentImageIndicator = Feature({
|
||||
'current-image-shift-timeout': 200,
|
||||
|
||||
'current-image-indicator-fadein': 500,
|
||||
|
||||
'current-image-indicator-hide-timeout': 250,
|
||||
},
|
||||
|
||||
actions: CurrentImageIndicatorActions,
|
||||
@ -1930,22 +1932,22 @@ module.CurrentImageIndicator = Feature({
|
||||
}
|
||||
}],
|
||||
|
||||
// XXX experimental...
|
||||
// XXX move all the sittings into .config
|
||||
// XXX BUG: this does not restore the indicator in some situations...
|
||||
// to reproduce:
|
||||
// do the action twice, fast.
|
||||
// XXX experimental -- not sure if we need this...
|
||||
// NOTE: we use .pre events here to see if we have moved...
|
||||
['prevScreen.pre nextScreen.pre',
|
||||
function(){
|
||||
var t = 250
|
||||
var m = this.ribbons.viewer.find('.current-marker')
|
||||
var t = this.config['current-image-indicator-hide-timeout']
|
||||
|
||||
var cur = this.current
|
||||
|
||||
return function(){
|
||||
var that = this
|
||||
|
||||
// delay fadeout...
|
||||
if(cur != this.current && m.css('opacity') != 0){
|
||||
if(cur != this.current
|
||||
&& m.css('opacity') == 1
|
||||
&& this.__current_indicator_t0 == null){
|
||||
this.__current_indicator_t0 = setTimeout(function(){
|
||||
delete that.__current_indicator_t0
|
||||
|
||||
@ -1953,12 +1955,12 @@ module.CurrentImageIndicator = Feature({
|
||||
}, t)
|
||||
}
|
||||
|
||||
// cancel previous fadein...
|
||||
// cancel/delay previous fadein...
|
||||
if(this.__current_indicator_t1 != null){
|
||||
clearTimeout(this.__current_indicator_t1)
|
||||
}
|
||||
|
||||
// cancel fadeout or do fadein...
|
||||
// cancel fadeout and do fadein...
|
||||
this.__current_indicator_t1 = setTimeout(function(){
|
||||
delete that.__current_indicator_t1
|
||||
|
||||
@ -1969,9 +1971,7 @@ module.CurrentImageIndicator = Feature({
|
||||
}
|
||||
|
||||
// show...
|
||||
if(m.css('opacity') == 0){
|
||||
m.css({ opacity: '' })
|
||||
}
|
||||
m.animate({ opacity: '1' })
|
||||
}, t-50)
|
||||
}
|
||||
}],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user