mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
63ad1dec90
commit
b4d7ee058b
@ -519,8 +519,8 @@ module.SingleImageAutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
],
|
||||
|
||||
config: {
|
||||
'cursor-autohide-single-image-view': 'on',
|
||||
'cursor-autohide-ribbon-view': 'off',
|
||||
'cursor-autohide-on-timeout-single-image-view': 'on',
|
||||
'cursor-autohide-on-timeout-ribbon-view': 'off',
|
||||
},
|
||||
|
||||
handlers: [
|
||||
@ -528,8 +528,8 @@ module.SingleImageAutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
['load',
|
||||
function(){
|
||||
var mode = this.toggleSingleImage('?') == 'on' ?
|
||||
'cursor-autohide-single-image-view'
|
||||
: 'cursor-autohide-ribbon-view'
|
||||
'cursor-autohide-on-timeout-single-image-view'
|
||||
: 'cursor-autohide-on-timeout-ribbon-view'
|
||||
|
||||
this.toggleAutoHideCursorTimeout(this.config[mode] || 'off')
|
||||
}],
|
||||
@ -537,8 +537,8 @@ module.SingleImageAutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
['toggleAutoHideCursorTimeout',
|
||||
function(){
|
||||
var mode = this.toggleSingleImage('?') == 'on' ?
|
||||
'cursor-autohide-single-image-view'
|
||||
: 'cursor-autohide-ribbon-view'
|
||||
'cursor-autohide-on-timeout-single-image-view'
|
||||
: 'cursor-autohide-on-timeout-ribbon-view'
|
||||
|
||||
this.config[mode] = this.toggleAutoHideCursorTimeout('?')
|
||||
}],
|
||||
@ -546,13 +546,13 @@ module.SingleImageAutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
['toggleSingleImage',
|
||||
function(){
|
||||
if(this.toggleSingleImage('?') == 'on'){
|
||||
this.toggleAutoHideCursorTimeout(this.config['cursor-autohide-single-image-view'])
|
||||
this.toggleAutoHideCursorTimeout(this.config['cursor-autohide-on-timeout-single-image-view'])
|
||||
|
||||
} else {
|
||||
this.toggleAutoHideCursorTimeout(this.config['cursor-autohide-ribbon-view'])
|
||||
this.toggleAutoHideCursorTimeout(this.config['cursor-autohide-on-timeout-ribbon-view'])
|
||||
|
||||
// XXX for some reason this is not working...
|
||||
this.toggleHiddenCursor(this.config['cursor-autohide-ribbon-view'])
|
||||
this.toggleHiddenCursor(this.config['cursor-autohide-on-timeout-ribbon-view'])
|
||||
}
|
||||
}],
|
||||
]
|
||||
|
||||
@ -1590,7 +1590,6 @@ module.ShiftAnimation = core.ImageGridFeatures.Feature({
|
||||
// and show it on next timeout/mousemove.
|
||||
// This will not stop watching the cursor, this setting the prop back
|
||||
// on will re-enable autohide.
|
||||
// XXX needs testing...
|
||||
// NOTE: chrome 49 + devtools open appears to prevent the cursor from
|
||||
// being hidden...
|
||||
var AutoHideCursor =
|
||||
@ -1605,7 +1604,8 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
|
||||
config: {
|
||||
'cursor-autohide': 'on',
|
||||
'cursor-autohide-on-timeout': 'on',
|
||||
'cursor-autohide-on-timeout': 'off',
|
||||
'cursor-autohide-on-keyboard': 'on',
|
||||
|
||||
'cursor-autohide-timeout': 1000,
|
||||
'cursor-show-threshold': 10,
|
||||
@ -1667,8 +1667,6 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
function(state){
|
||||
var that = this
|
||||
|
||||
console.log('!!!!!', state)
|
||||
|
||||
var viewer = this.ribbons.viewer
|
||||
// NOTE: this is handled by the keyboard feature...
|
||||
var kb_target = this.__keyboard_event_source || $(window)
|
||||
@ -1680,7 +1678,7 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
var x, y
|
||||
var timer
|
||||
var timeout =
|
||||
that.config['cursor-autohide-on-timeout'] != 'off' ?
|
||||
that.toggleAutoHideCursorTimeout('?') == 'on' ?
|
||||
(that.config['cursor-autohide-timeout'] || 1000)
|
||||
: -1
|
||||
|
||||
@ -1693,7 +1691,7 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
|
||||
// hide on timeout...
|
||||
var timeout =
|
||||
that.config['cursor-autohide-on-timeout'] != 'off' ?
|
||||
that.toggleAutoHideCursorTimeout('?') == 'on' ?
|
||||
(that.config['cursor-autohide-timeout'] || 1000)
|
||||
: -1
|
||||
if(timeout && timeout > 0){
|
||||
@ -1727,7 +1725,8 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
return
|
||||
}
|
||||
|
||||
that.toggleHiddenCursor('on')
|
||||
that.toggleAutoHideCursorKeyboard('?') == 'on'
|
||||
&& that.toggleHiddenCursor('on')
|
||||
|
||||
return true
|
||||
})
|
||||
@ -1765,6 +1764,10 @@ module.AutoHideCursor = core.ImageGridFeatures.Feature({
|
||||
core.makeConfigToggler('cursor-autohide-on-timeout',
|
||||
['on', 'off'],
|
||||
function(){ this.toggleAutoHideCursor('!') })],
|
||||
toggleAutoHideCursorKeyboard: ['Interface/Hide cursor on keyboard',
|
||||
core.makeConfigToggler('cursor-autohide-on-keyboard',
|
||||
['on', 'off'],
|
||||
function(){ this.toggleAutoHideCursor('!') })],
|
||||
}),
|
||||
|
||||
handlers: [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user