From dad312daa4300d3c35bf6a2a3bf32cbc6361ea6e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 20 Apr 2017 17:53:43 +0300 Subject: [PATCH] more tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-chrome.js | 37 +++++++--------------- ui (gen4)/features/ui-partial-ribbons-2.js | 2 -- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/ui (gen4)/features/ui-chrome.js b/ui (gen4)/features/ui-chrome.js index ec448a41..2a7b57d9 100755 --- a/ui (gen4)/features/ui-chrome.js +++ b/ui (gen4)/features/ui-chrome.js @@ -438,21 +438,15 @@ var makeIndicatorHiderOnFastAction = function(hide_timeout){ var cur = this.current - var hide = function(){ - delete that.__current_indicator_t0 - m.css({ opacity: 0 }) - } - var show = function(){ - delete that.__current_indicator_t0 - m.animate({ opacity: 1 }) - } - return function(){ // delay fadeout... if(cur != this.current && m.css('opacity') == 1 && this.__current_indicator_t0 == null){ - this.__current_indicator_t0 = setTimeout(hide, t) + this.__current_indicator_t0 = setTimeout(function(){ + delete that.__current_indicator_t0 + m.css({ opacity: 0 }) + }, t) } // cancel/delay previous fadein... @@ -468,7 +462,8 @@ var makeIndicatorHiderOnFastAction = function(hide_timeout){ && clearTimeout(that.__current_indicator_t0) delete that.__current_indicator_t0 - show() + // show... + m.animate({ opacity: 1 }) }, t-50) } } @@ -489,25 +484,17 @@ module.CurrentImageIndicatorHideOnFastScreenNav = core.ImageGridFeatures.Feature exclusive: ['ui-current-image-indicator-hide'], config: { - 'current-image-indicator-screen-hide-threshold': 100, + 'current-image-indicator-hide-threshold': 100, - 'current-image-indicator-hide-threshold': 250, + 'current-image-indicator-screen-hide-threshold': 100, }, handlers: [ // hide indicator on next/prev... - [[ - 'prevImage.pre', - 'nextImage.pre', - ], - makeIndicatorHiderOnFastAction( - 'current-image-indicator-hide-threshold')], - [[ - 'prevImage.pre', - 'nextImage.pre', - ], - makeIndicatorHiderOnFastAction( - 'current-image-indicator-screen-hide-threshold')], + ['prevImage.pre nextImage.pre', + makeIndicatorHiderOnFastAction('current-image-indicator-hide-threshold')], + ['prevScreen.pre nextScreen.pre', + makeIndicatorHiderOnFastAction('current-image-indicator-screen-hide-threshold')], ], }) diff --git a/ui (gen4)/features/ui-partial-ribbons-2.js b/ui (gen4)/features/ui-partial-ribbons-2.js index 80b6e5e3..0301f349 100755 --- a/ui (gen4)/features/ui-partial-ribbons-2.js +++ b/ui (gen4)/features/ui-partial-ribbons-2.js @@ -64,7 +64,6 @@ var PartialRibbonsActions = actions.Actions({ this.__last_update = this.__last_update || t var timeout = this.config['ribbons-in-place-update-timeout'] - // localize transition prevention... // NOTE: we can't get ribbon via target directly here as // the target might not be loaded... @@ -198,6 +197,5 @@ module.PartialRibbons = core.ImageGridFeatures.Feature({ - /********************************************************************** * vim:set ts=4 sw=4 : */ return module })