mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
.mergeRibbonCrop(..) now also sets the .base ribbon...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
611377f3e3
commit
5c07ddc11a
11
ui/data4.js
11
ui/data4.js
@ -1307,16 +1307,25 @@ var DataPrototype = {
|
|||||||
// Merge the sortable ribbon representation into data...
|
// Merge the sortable ribbon representation into data...
|
||||||
//
|
//
|
||||||
// This will take the image order from the crop and merge it into
|
// This will take the image order from the crop and merge it into
|
||||||
// the .ribbon_order of this.
|
// the .ribbon_order of this, essentially sorting ribbons...
|
||||||
//
|
//
|
||||||
// NOTE: see .cropRibbons(..) for more details...
|
// NOTE: see .cropRibbons(..) for more details...
|
||||||
|
// NOTE: this will set the base to the top ribbon, but only if base
|
||||||
|
// was the top ribbon (default) in the first place...
|
||||||
|
// XXX is this correct???
|
||||||
//
|
//
|
||||||
// XXX should there be a way to set the base ribbon???
|
// XXX should there be a way to set the base ribbon???
|
||||||
mergeRibbonCrop: function(crop){
|
mergeRibbonCrop: function(crop){
|
||||||
|
var b = this.ribbon_order.indexOf(this.base)
|
||||||
var that = this
|
var that = this
|
||||||
this.ribbon_order = crop.order.map(function(e){
|
this.ribbon_order = crop.order.map(function(e){
|
||||||
return that.getRibbon(e)
|
return that.getRibbon(e)
|
||||||
})
|
})
|
||||||
|
// set the base to the first/top ribbon...
|
||||||
|
// XXX is this the correct way???
|
||||||
|
if(b == 0){
|
||||||
|
this.base = this.ribbon_order[0]
|
||||||
|
}
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user