mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7cb1bd7c4b
commit
5342d3e7ca
@ -832,7 +832,7 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
showEmpty: false,
|
showEmpty: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
'browse-actions-keys': true,
|
'browse-actions-keys': 'on',
|
||||||
|
|
||||||
'browse-actions-shortcut-marker': '\\$(\\w)',
|
'browse-actions-shortcut-marker': '\\$(\\w)',
|
||||||
},
|
},
|
||||||
@ -1291,10 +1291,10 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
toggleBrowseActionKeys: ['Interface/Show keys in menu',
|
toggleBrowseActionKeys: ['Interface/Show keys in menu',
|
||||||
core.makeConfigToggler(
|
core.makeConfigToggler(
|
||||||
'browse-actions-keys',
|
'browse-actions-keys',
|
||||||
[true, false],
|
['on', 'off'],
|
||||||
function(state){
|
function(state){
|
||||||
this.modal.client.dom.hasClass('browse-actions')
|
this.modal.client.dom.hasClass('browse-actions')
|
||||||
&& this.modal.client.dom[state ? 'addClass' : 'removeClass']('show-keys')
|
&& this.modal.client.dom[state == 'on' ? 'addClass' : 'removeClass']('show-keys')
|
||||||
})],
|
})],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1249,7 +1249,8 @@ var ConfigLocalStorageActions = actions.Actions({
|
|||||||
}],
|
}],
|
||||||
|
|
||||||
toggleAutoStoreConfig: ['File/Store configuration',
|
toggleAutoStoreConfig: ['File/Store configuration',
|
||||||
toggler.Toggler(null, function(_, state){
|
toggler.Toggler(null,
|
||||||
|
function(_, state){
|
||||||
if(state == null){
|
if(state == null){
|
||||||
return this.__auto_save_config_timer || 'none'
|
return this.__auto_save_config_timer || 'none'
|
||||||
|
|
||||||
@ -1972,13 +1973,17 @@ var ControlActions = actions.Actions({
|
|||||||
// XXX do not do anything on viewer focus... (???)
|
// XXX do not do anything on viewer focus... (???)
|
||||||
toggleImageClickHandling: ['Interface/Image click handling',
|
toggleImageClickHandling: ['Interface/Image click handling',
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(){
|
function(_, new_state){
|
||||||
return this.ribbons
|
return new_state ?
|
||||||
&& this.ribbons.viewer
|
// NOTE: we are not setting the state here, so
|
||||||
//&& this.ribbons.getRibbon().data('hammer') ? 'handling-click' : 'none' },
|
// nothing to do...
|
||||||
&& this.ribbons.getRibbon().hasClass('clickable') ?
|
null
|
||||||
|
: (this.ribbons
|
||||||
|
&& this.ribbons.viewer
|
||||||
|
//&& this.ribbons.getRibbon().data('hammer') ? 'handling-click' : 'none' },
|
||||||
|
&& this.ribbons.getRibbon().hasClass('clickable')) ?
|
||||||
'handling-click'
|
'handling-click'
|
||||||
: 'none' },
|
: 'none' },
|
||||||
'handling-click',
|
'handling-click',
|
||||||
function(state){
|
function(state){
|
||||||
var that = this
|
var that = this
|
||||||
@ -2170,11 +2175,16 @@ var ControlActions = actions.Actions({
|
|||||||
// to work semi smoothly...
|
// to work semi smoothly...
|
||||||
toggleRibbonPanHandling: ['Interface/Ribbon pan handling',
|
toggleRibbonPanHandling: ['Interface/Ribbon pan handling',
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(){
|
function(_, new_state){
|
||||||
return this.ribbons
|
return new_state ?
|
||||||
&& this.ribbons.viewer
|
// NOTE: we are not setting the state here, so there's
|
||||||
//&& this.ribbons.getRibbon().data('hammer') ? 'handling-pan' : 'none' },
|
// nothing to do...
|
||||||
&& this.ribbons.getRibbon().hasClass('draggable') ? 'handling-pan' : 'none' },
|
null
|
||||||
|
: (this.ribbons
|
||||||
|
&& this.ribbons.viewer
|
||||||
|
&& this.ribbons.getRibbon().hasClass('draggable')) ?
|
||||||
|
'handling-pan'
|
||||||
|
: 'none' },
|
||||||
'handling-pan',
|
'handling-pan',
|
||||||
function(state){
|
function(state){
|
||||||
var that = this
|
var that = this
|
||||||
@ -2402,12 +2412,16 @@ var ControlActions = actions.Actions({
|
|||||||
// XXX add a "ribbonWheeling" ( ;) ) event a-la ribbonPanning...
|
// XXX add a "ribbonWheeling" ( ;) ) event a-la ribbonPanning...
|
||||||
toggleMouseWheelHandling: ['Interface/Mouse wheel handling',
|
toggleMouseWheelHandling: ['Interface/Mouse wheel handling',
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(){
|
function(_, new_state){
|
||||||
return this.ribbons
|
return new_state ?
|
||||||
&& this.ribbons.viewer
|
// NOTE: we are not setting the state here, so there's
|
||||||
&& this.ribbons.viewer.hasClass('mouse-wheel-scroll') ?
|
// nothing to do...
|
||||||
|
null
|
||||||
|
: (this.ribbons
|
||||||
|
&& this.ribbons.viewer
|
||||||
|
&& this.ribbons.viewer.hasClass('mouse-wheel-scroll')) ?
|
||||||
'handling-mouse-wheel'
|
'handling-mouse-wheel'
|
||||||
: 'none' },
|
: 'none' },
|
||||||
'handling-mouse-wheel',
|
'handling-mouse-wheel',
|
||||||
function(state){
|
function(state){
|
||||||
var that = this
|
var that = this
|
||||||
@ -2510,9 +2524,13 @@ var ControlActions = actions.Actions({
|
|||||||
toggleSwipeHandling: ['Interface/Swipe handling',
|
toggleSwipeHandling: ['Interface/Swipe handling',
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(_, state){
|
function(_, state){
|
||||||
return this.ribbons
|
return state ?
|
||||||
&& this.ribbons.viewer
|
null
|
||||||
&& this.ribbons.viewer.data('hammer') ? 'handling-swipes' : 'none' },
|
: (this.ribbons
|
||||||
|
&& this.ribbons.viewer
|
||||||
|
&& this.ribbons.viewer.data('hammer')) ?
|
||||||
|
'handling-swipes'
|
||||||
|
: 'none' },
|
||||||
'handling-swipes',
|
'handling-swipes',
|
||||||
function(state){
|
function(state){
|
||||||
var viewer = this.ribbons.viewer
|
var viewer = this.ribbons.viewer
|
||||||
@ -2579,7 +2597,7 @@ var ControlActions = actions.Actions({
|
|||||||
},
|
},
|
||||||
toggleControlMode: ['- Interface/',
|
toggleControlMode: ['- Interface/',
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(){ return this.config['control-mode'] },
|
function(_, state){ return state == null ? null : this.config['control-mode'] },
|
||||||
function(){ return Object.keys(this.__control_mode_handlers__ || [])
|
function(){ return Object.keys(this.__control_mode_handlers__ || [])
|
||||||
.concat(Object.keys(ControlActions.__control_mode_handlers__ || []))
|
.concat(Object.keys(ControlActions.__control_mode_handlers__ || []))
|
||||||
.concat(['none'])
|
.concat(['none'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user