added cropFlatten action...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-10-21 18:51:42 +03:00
parent 0d046bb90e
commit e6a26104c3

View File

@ -795,7 +795,9 @@ module.CropActions = actions.Actions({
// //
crop: ['- Crop/Crop image list', crop: ['- Crop/Crop image list',
function(list, flatten){ function(list, flatten){
list = list || this.data.order //list = list || this.data.order
list = list || this.data.getImages()
if(this.crop_stack == null){ if(this.crop_stack == null){
this.crop_stack = [] this.crop_stack = []
} }
@ -863,6 +865,9 @@ module.CropActions = actions.Actions({
// XXX save a crop (catalog)... // XXX save a crop (catalog)...
// XXX // XXX
// XXX not sure if we actually need this...
cropFlatten: ['Crop/Flatten',
function(list){ this.crop(list, true) }],
cropRibbon: ['Crop/Crop current ribbon', cropRibbon: ['Crop/Crop current ribbon',
function(ribbon, flatten){ function(ribbon, flatten){
if(typeof(ribbon) == typeof(true)){ if(typeof(ribbon) == typeof(true)){
@ -872,7 +877,7 @@ module.CropActions = actions.Actions({
ribbon = ribbon || 'current' ribbon = ribbon || 'current'
this.crop(this.data.getImages(ribbon), flatten) this.crop(this.data.getImages(ribbon), flatten)
}], }],
cropRibbonAndAbove: ['Crop/Crop current and above ribbons', cropRibbonAndAbove: ['Crop/Crop out ribbons bellow',
function(ribbon, flatten){ function(ribbon, flatten){
if(typeof(ribbon) == typeof(true)){ if(typeof(ribbon) == typeof(true)){
flatten = ribbon flatten = ribbon