mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 11:50: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
|
[_] index and group ALL files in an archive
|
||||||
[_] import metadata
|
[_] import metadata
|
||||||
[_] real GIDs
|
[_] real GIDs
|
||||||
|
[_] BUG: context status does not get updated on Ctrl-D
|
||||||
[_] BUG: shifting last image out of a ribbon misaligns the current ribbon
|
[_] BUG: shifting last image out of a ribbon misaligns the current ribbon
|
||||||
| i.e. the prev ribbon was deleted and the new focused ribbon
|
| i.e. the prev ribbon was deleted and the new focused ribbon
|
||||||
| is aligned as if it was not current...
|
| 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...
|
// Setup event handlers for data bindings...
|
||||||
//
|
//
|
||||||
// This does two jobs:
|
// This does two jobs:
|
||||||
@ -334,11 +347,18 @@ function setupDataBindings(viewer){
|
|||||||
// info...
|
// info...
|
||||||
.on([
|
.on([
|
||||||
'focusingImage',
|
'focusingImage',
|
||||||
|
'togglingMark'
|
||||||
|
].join(' '),
|
||||||
|
function(evt, image){
|
||||||
|
image = $(image)
|
||||||
|
updateGlobalImageInfo(image)
|
||||||
|
updateContextIndicators(image)
|
||||||
|
})
|
||||||
|
.on([
|
||||||
'rotatingLeft',
|
'rotatingLeft',
|
||||||
'rotateingRight',
|
'rotateingRight',
|
||||||
'flippingVertical',
|
'flippingVertical',
|
||||||
'flippingHorizontal',
|
'flippingHorizontal'
|
||||||
'togglingMark'
|
|
||||||
].join(' '),
|
].join(' '),
|
||||||
function(evt, image){
|
function(evt, image){
|
||||||
updateGlobalImageInfo($(image))
|
updateGlobalImageInfo($(image))
|
||||||
@ -352,19 +372,9 @@ function setupDataBindings(viewer){
|
|||||||
].join(' '),
|
].join(' '),
|
||||||
function(){
|
function(){
|
||||||
updateGlobalImageInfo()
|
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){
|
.on('baseURLChanged', function(evt, url){
|
||||||
saveLocalStorageBaseURL()
|
saveLocalStorageBaseURL()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user