cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-06 02:50:20 +03:00
parent bf41a24afa
commit 7ba7e6f40b
2 changed files with 14 additions and 13 deletions

View File

@ -1372,19 +1372,18 @@ module.RibbonsPrototype = {
},
// Flip an image...
//
// Flip image:
// Flip image relative to view:
// .flipImage(target, 'horizontal')
// .flipImage(target, 'vertical')
// -> image
//
// .flipImage(target, 'horizontal', 'image')
// .flipImage(target, 'vertical', 'image')
// -> image
//
// .flipImage(target, 'horizontal', 'view')
// .flipImage(target, 'vertical', 'view')
// -> image
//
// Flip image relative to image:
// .flipImage(target, 'horizontal', 'image')
// .flipImage(target, 'vertical', 'image')
// -> image
//
// Set an explicit state:
// .flipImage(target, [ .. ])
// -> image
@ -1393,6 +1392,9 @@ module.RibbonsPrototype = {
// NOTE: this can be applied in bulk, e.g.
// this.flipImage($('.image'), 'vertical') will rotate all the
// loaded images vertically.
// NOTE: this is relative to how the image is viewed and not to
// it's original orientation by default...
// ...this makes things consistent both visually and internally
flipImage: function(target, direction, reference){
reference = reference || 'image'
target = target == null || target.constructor !== Array ? [target] : target
@ -1443,8 +1445,10 @@ module.RibbonsPrototype = {
// XXX should these be here???
rotateCW: function(target){ return this.rotateImage(target, 'cw') },
rotateCCW: function(target){ return this.rotateImage(target, 'ccw') },
flipVertical: function(target, reference){ return this.flipImage(target, 'vertical', reference) },
flipHorizontal: function(target, reference){ return this.flipImage(target, 'horizontal', reference) },
flipVertical: function(target, reference){
return this.flipImage(target, 'vertical', reference) },
flipHorizontal: function(target, reference){
return this.flipImage(target, 'horizontal', reference) },
// UI manipulation...

View File

@ -893,16 +893,13 @@ actions.Actions(Client, {
function(target){ this.ribbons.rotateCW(target) }],
rotateCCW: [
function(target){ this.ribbons.rotateCCW(target) }],
// NOTE: these are relative to how the image is viewed and not to
// it's original orientation...
// ...this makes things consistent both visually and internally
// NOTE: these support target lists...
// XXX tell data/images about the flip...
flipVertical: [
function(target){ this.ribbons.flipVertical(target, 'view') }],
flipHorizontal: [
function(target){ this.ribbons.flipHorizontal(target, 'view') }],
crop: [ reloadAfter() ],
uncrop: [ reloadAfter() ],