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...
|
// Edit...
|
||||||
|
|
||||||
var BaseEditActions =
|
var BaseEditActions =
|
||||||
module.BaseEditActions =
|
module.BaseEditActions =
|
||||||
actions.Actions({
|
actions.Actions({
|
||||||
|
|||||||
@ -1041,28 +1041,12 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
|||||||
['resizingDone',
|
['resizingDone',
|
||||||
function(){ this.scale = this.scale }],
|
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???
|
// XXX Q: should this be further split into groups and tags???
|
||||||
var ViewerEditActions =
|
var ViewerEditActions =
|
||||||
@ -1175,11 +1159,33 @@ core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
depends: [
|
depends: [
|
||||||
'base-edit',
|
'base-edit',
|
||||||
|
'tags',
|
||||||
|
'sort',
|
||||||
|
'crop',
|
||||||
|
'image-group',
|
||||||
'ui',
|
'ui',
|
||||||
],
|
],
|
||||||
|
|
||||||
actions: ViewerEditActions,
|
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