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

View File

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

View File

@ -2227,7 +2227,11 @@ var DataPrototype = {
// split the data into three sections... // split the data into three sections...
var res = this.split(start, end) 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... // set the base ribbon on the middle section...
rest[0].setBase(0) rest[0].setBase(0)