mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 11:50:07 +00:00
cleanup of tag status handler logic...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
71faf29359
commit
87f77e804a
@ -357,18 +357,23 @@ module.ImageStateIndicator = core.ImageGridFeatures.Feature({
|
|||||||
this.toggleStateIndicator(this.config['global-state-indicator-mode'])
|
this.toggleStateIndicator(this.config['global-state-indicator-mode'])
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
['focusImage',
|
||||||
|
function(){
|
||||||
|
this.updateStateIndicators()
|
||||||
|
}],
|
||||||
[[
|
[[
|
||||||
'focusImage',
|
|
||||||
// XXX these might not be the right way to go because these
|
|
||||||
// will get triggered on batch operations and the such...
|
|
||||||
// ...one way to fix this is to test if it's the current
|
|
||||||
// image being updated and do nothing otherwise...
|
|
||||||
'tag',
|
'tag',
|
||||||
'untag',
|
'untag',
|
||||||
],
|
],
|
||||||
function(){
|
function(res, tags, gids){
|
||||||
this.updateStateIndicators()
|
// trigger only when current image is affected...
|
||||||
}]
|
if(gids.constructor === Array
|
||||||
|
&& (gids.indexOf('current') >= 0
|
||||||
|
|| gids.indexOf(this.current) >= 0)
|
||||||
|
|| this.data.getImage(gids) == this.current){
|
||||||
|
this.updateStateIndicators()
|
||||||
|
}
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user