minor fixed + found a bug...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-07-29 19:37:51 +03:00
parent 428c59e0ac
commit 4802eb0514

View File

@ -695,11 +695,19 @@ actions.Actions({
cropRibbon: ['Crop current ribbon',
function(ribbon, flatten){
if(typeof(ribbon) == typeof(true)){
flatten = ribbon
ribbon = null
}
ribbon = ribbon || 'current'
this.crop(this.data.getImages(ribbon), flatten)
}],
cropRibbonAndAbove: ['Crop current and above ribbons',
function(ribbon, flatten){
if(typeof(ribbon) == typeof(true)){
flatten = ribbon
ribbon = null
}
ribbon = ribbon || this.data.getRibbon()
var data = this.data
@ -1258,6 +1266,14 @@ actions.Actions(Client, {
crop: [ reloadAfter() ],
// XXX BUG: this does not align correctly if the current image is in
// a different ribbon relative to the top...
// to repeat:
// - in a three ribbon setup focus an image in the middle ribbon
// - .cropRibbonAndAbove(true) -> single ribbon
// - .uncrop()
// result:
// ribbon vertical alignment will not change.
uncrop: [ reloadAfter() ],
// XXX might be a good idea to do this in a new viewer in an overlay...
cropGroup: [ reloadAfter() ],