.alignToRibbon(..) now works...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-07-28 04:11:43 +03:00
parent 1a20893c34
commit b47eecec3c
3 changed files with 9 additions and 3 deletions

View File

@ -564,7 +564,7 @@ actions.Actions({
this.images
&& this.images.rotateImage(this.data.getImage(target), direction || 'cw')
}],
flip: ['- Flip|edit/Flip image',
flip: ['- Flip|Edit/Flip image',
function(target, direction){
if(target == 'vertical' || target == 'horizontal'){
direction = target
@ -588,7 +588,7 @@ actions.Actions({
// complex operations...
// XXX align to ribbon...
alignToRibbon: ['Edit/',
alignToRibbon: ['Ribbons|Edit/Align top ribbon to base',
function(target, start, end){
this.data = this.data.alignToRibbon(target, start, end)
}],

View File

@ -272,6 +272,8 @@ module.Changes = core.ImageGridFeatures.Feature({
'reverseImages',
'reverseRibbons',
'alignToRibbon',
'group',
'ungroup',
'expandGroup',

View File

@ -2227,7 +2227,11 @@ var DataPrototype = {
// split the data into three sections...
var res = this.split(start, end)
var rest = res.shift()
var rest = res.slice(1)
// cleanup...
// XXX do we actually need this???
res.forEach(function(e){ e.clear('empty') })
// set the base ribbon on the middle section...
rest[0].setBase(0)