mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-31 19:30:07 +00:00
minor rework in undicator update...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
de43dc5204
commit
4055b4e846
@ -106,6 +106,7 @@ Roadmap
|
||||
[_] index and group ALL files in an archive
|
||||
[_] import metadata
|
||||
[_] real GIDs
|
||||
[_] BUG: context status does not get updated on Ctrl-D
|
||||
[_] BUG: shifting last image out of a ribbon misaligns the current ribbon
|
||||
| i.e. the prev ribbon was deleted and the new focused ribbon
|
||||
| is aligned as if it was not current...
|
||||
|
||||
36
ui/setup.js
36
ui/setup.js
@ -40,6 +40,19 @@ function setupIndicators(){
|
||||
}
|
||||
|
||||
|
||||
function updateContextIndicators(image){
|
||||
image = image == null ? getImage() : $(image)
|
||||
|
||||
// marked...
|
||||
var indicator = $('.context-mode-indicators .current-image-marked')
|
||||
if(image.hasClass('marked')){
|
||||
indicator.addClass('shown')
|
||||
} else {
|
||||
indicator.removeClass('shown')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Setup event handlers for data bindings...
|
||||
//
|
||||
// This does two jobs:
|
||||
@ -334,11 +347,18 @@ function setupDataBindings(viewer){
|
||||
// info...
|
||||
.on([
|
||||
'focusingImage',
|
||||
'togglingMark'
|
||||
].join(' '),
|
||||
function(evt, image){
|
||||
image = $(image)
|
||||
updateGlobalImageInfo(image)
|
||||
updateContextIndicators(image)
|
||||
})
|
||||
.on([
|
||||
'rotatingLeft',
|
||||
'rotateingRight',
|
||||
'flippingVertical',
|
||||
'flippingHorizontal',
|
||||
'togglingMark'
|
||||
'flippingHorizontal'
|
||||
].join(' '),
|
||||
function(evt, image){
|
||||
updateGlobalImageInfo($(image))
|
||||
@ -352,19 +372,9 @@ function setupDataBindings(viewer){
|
||||
].join(' '),
|
||||
function(){
|
||||
updateGlobalImageInfo()
|
||||
updateContextIndicators()
|
||||
})
|
||||
|
||||
// mark indicator...
|
||||
// XXX make this generic and handle any of the available marks...
|
||||
.on('focusingImage togglingMark', function(evt, image){
|
||||
image = image.length == 0 ? getImage() : image
|
||||
var indicator = $('.context-mode-indicators .current-image-marked')
|
||||
if(image.hasClass('marked')){
|
||||
indicator.addClass('shown')
|
||||
} else {
|
||||
indicator.removeClass('shown')
|
||||
}
|
||||
})
|
||||
|
||||
.on('baseURLChanged', function(evt, url){
|
||||
saveLocalStorageBaseURL()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user