mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some more refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9ce4e3c0c4
commit
04ebffbfa0
@ -993,8 +993,10 @@ core.ImageGridFeatures.Feature({
|
||||
})
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Edit...
|
||||
|
||||
var BaseEditActions =
|
||||
module.BaseEditActions =
|
||||
actions.Actions({
|
||||
|
||||
@ -1041,28 +1041,12 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
||||
['resizingDone',
|
||||
function(){ this.scale = this.scale }],
|
||||
//*/
|
||||
|
||||
[[
|
||||
'shiftImageTo.pre',
|
||||
'shiftImageUp.pre',
|
||||
'shiftImageDown.pre',
|
||||
],
|
||||
function(target){
|
||||
return updateImagePosition(this, target) }],
|
||||
|
||||
|
||||
// manage the .crop-mode css class...
|
||||
['crop uncrop',
|
||||
function(){
|
||||
this.ribbons.viewer[this.cropped ?
|
||||
'addClass'
|
||||
: 'removeClass']('crop-mode')
|
||||
}],
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Viewer edit actions...
|
||||
|
||||
// XXX Q: should this be further split into groups and tags???
|
||||
var ViewerEditActions =
|
||||
@ -1175,11 +1159,33 @@ core.ImageGridFeatures.Feature({
|
||||
|
||||
depends: [
|
||||
'base-edit',
|
||||
'tags',
|
||||
'sort',
|
||||
'crop',
|
||||
'image-group',
|
||||
'ui',
|
||||
],
|
||||
|
||||
actions: ViewerEditActions,
|
||||
|
||||
handlers: [
|
||||
[[
|
||||
'shiftImageTo.pre',
|
||||
'shiftImageUp.pre',
|
||||
'shiftImageDown.pre',
|
||||
],
|
||||
function(target){
|
||||
return updateImagePosition(this, target) }],
|
||||
|
||||
|
||||
// manage the .crop-mode css class...
|
||||
['crop uncrop',
|
||||
function(){
|
||||
this.ribbons.viewer[this.cropped ?
|
||||
'addClass'
|
||||
: 'removeClass']('crop-mode')
|
||||
}],
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user