mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor refactoring + moved crop context keys to the crop context...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
435918e1b0
commit
6de70e7b98
@ -64,12 +64,17 @@ module.GLOBAL_KEYBOARD = {
|
||||
Esc: 'toggleSingleImage: "off" -- Exit single image view',
|
||||
},
|
||||
|
||||
// XXX cropped -- needs a class to indicate a crop...
|
||||
// XXX add "save as collection..."
|
||||
'Cropped': {
|
||||
// XXX make .crop(..) toggle the class...
|
||||
pattern: '.crop-mode',
|
||||
|
||||
Esc: {
|
||||
default: 'uncrop',
|
||||
ctrl: 'uncropAll',
|
||||
},
|
||||
},
|
||||
|
||||
// XXX add "save as collection..." (???)
|
||||
// XXX cleanup...
|
||||
'Viewer': {
|
||||
doc: 'NOTE: binding priority is the same as the order of sections '+
|
||||
@ -203,10 +208,6 @@ module.GLOBAL_KEYBOARD = {
|
||||
ctrl: 'cropMarked',
|
||||
alt: 'cropBookmarked',
|
||||
},
|
||||
Esc: {
|
||||
default: 'uncrop',
|
||||
ctrl: 'uncropAll',
|
||||
},
|
||||
|
||||
// marking...
|
||||
M: {
|
||||
|
||||
@ -758,14 +758,12 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
||||
delete this.__viewer_resize
|
||||
}
|
||||
}],
|
||||
// manage the .crop-mode css class...
|
||||
['crop uncrop',
|
||||
function(){
|
||||
if(this.cropped){
|
||||
this.ribbons.viewer.addClass('crop-mode')
|
||||
|
||||
} else {
|
||||
this.ribbons.viewer.removeClass('crop-mode')
|
||||
}
|
||||
this.ribbons.viewer[this.cropped ?
|
||||
'addClass'
|
||||
: 'removeClass']('crop-mode')
|
||||
}],
|
||||
],
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user