some minor refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-03-29 17:22:35 +03:00
parent 50823e69a0
commit 0cba7dc760

View File

@ -881,12 +881,14 @@ module.ViewerActions = actions.Actions({
function(){ this.screenfit = 1 }], function(){ this.screenfit = 1 }],
// NOTE: these work by getting the target position from .data... // NOTE: these work by getting the target position from .data...
/*
shiftImageTo: [ shiftImageTo: [
function(target){ return updateImagePosition(this, target) }], function(target){ return updateImagePosition(this, target) }],
shiftImageUp: [ shiftImageUp: [
function(target){ return updateImagePosition(this, target) }], function(target){ return updateImagePosition(this, target) }],
shiftImageDown: [ shiftImageDown: [
function(target){ return updateImagePosition(this, target) }], function(target){ return updateImagePosition(this, target) }],
//*/
shiftImageLeft: [ shiftImageLeft: [
function(target){ this.ribbons.placeImage(target, -1) }], function(target){ this.ribbons.placeImage(target, -1) }],
shiftImageRight: [ shiftImageRight: [
@ -1101,6 +1103,16 @@ 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... // manage the .crop-mode css class...
['crop uncrop', ['crop uncrop',
function(){ function(){