mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a26cbf1228
commit
270cfa364e
@ -852,7 +852,8 @@ actions.Actions({
|
|||||||
// XXX undo...
|
// XXX undo...
|
||||||
shiftImageTo: ['- Edit|Sort|Image/',
|
shiftImageTo: ['- Edit|Sort|Image/',
|
||||||
{undo: function(a){ this.shiftImageTo(a.args[1], a.args[0]) }},
|
{undo: function(a){ this.shiftImageTo(a.args[1], a.args[0]) }},
|
||||||
function(target, to, mode){ this.data.shiftImage(target, to, mode) }],
|
function(target, to, mode){
|
||||||
|
this.data.shiftImage(target, to, mode) }],
|
||||||
|
|
||||||
shiftImageUp: ['Edit|Image/Shift image up',
|
shiftImageUp: ['Edit|Image/Shift image up',
|
||||||
core.doc`Shift image up...
|
core.doc`Shift image up...
|
||||||
@ -920,29 +921,31 @@ actions.Actions({
|
|||||||
this.direction = 'right' }
|
this.direction = 'right' }
|
||||||
this.data.shiftImageRight(target)
|
this.data.shiftImageRight(target)
|
||||||
this.focusImage() }],
|
this.focusImage() }],
|
||||||
// XXX these are effectively identical...
|
// XXX these are effectively identical...
|
||||||
// XXX when shifting the first image in ribbon alignment is a bit off...
|
// XXX when shifting the first image in ribbon alignment is a bit off...
|
||||||
// XXX add undo...
|
// XXX add undo...
|
||||||
shiftImageToTop: ['Edit|Image/Shift image to top ribbon',
|
// XXX BUG: after move the wrong image is centered -- correct positioning after move...
|
||||||
function(target){
|
// XXX ASAP: add animation...
|
||||||
console.warn('shiftImageToTop(..)/shiftImageToBottom(..): need proper undo.')
|
shiftImageToTop: ['Edit|Image/Shift image to top ribbon',
|
||||||
if(target == null){
|
function(target){
|
||||||
var cur = this.current
|
console.warn('shiftImageToTop(..)/shiftImageToBottom(..): need proper undo.')
|
||||||
var next = this.getNextFocused(cur)
|
if(target == null){
|
||||||
this.data.shiftImage(cur, 0, 'vertical')
|
var cur = this.current
|
||||||
this.focusImage(next)
|
var next = this.getNextFocused(cur)
|
||||||
} else {
|
this.data.shiftImage(cur, 0, 'vertical')
|
||||||
this.data.shiftImage(target, 0, 'vertical') } }],
|
this.focusImage(next)
|
||||||
shiftImageToBottom: ['Edit|Image/Shift image to bottom ribbon',
|
} else {
|
||||||
function(target){
|
this.data.shiftImage(target, 0, 'vertical') } }],
|
||||||
console.warn('shiftImageToTop(..)/shiftImageToBottom(..): need proper undo.')
|
shiftImageToBottom: ['Edit|Image/Shift image to bottom ribbon',
|
||||||
if(target == null){
|
function(target){
|
||||||
var cur = this.current
|
console.warn('shiftImageToTop(..)/shiftImageToBottom(..): need proper undo.')
|
||||||
var next = this.getNextFocused(cur)
|
if(target == null){
|
||||||
this.data.shiftImage(cur, -1, 'vertical')
|
var cur = this.current
|
||||||
this.focusImage(next)
|
var next = this.getNextFocused(cur)
|
||||||
} else {
|
this.data.shiftImage(cur, -1, 'vertical')
|
||||||
this.data.shiftImage(target, 0, 'vertical') } }],
|
this.focusImage(next)
|
||||||
|
} else {
|
||||||
|
this.data.shiftImage(target, 0, 'vertical') } }],
|
||||||
/*
|
/*
|
||||||
shiftImageToBase: ['Edit|Image/Shift image to base robbon',
|
shiftImageToBase: ['Edit|Image/Shift image to base robbon',
|
||||||
function(){}],
|
function(){}],
|
||||||
@ -1151,6 +1154,9 @@ core.ImageGridFeatures.Feature({
|
|||||||
'shiftImageDown',
|
'shiftImageDown',
|
||||||
'shiftImageLeft',
|
'shiftImageLeft',
|
||||||
'shiftImageRight',
|
'shiftImageRight',
|
||||||
|
'shiftImageToTop',
|
||||||
|
'shiftImageToBottom',
|
||||||
|
'shiftImageToBase',
|
||||||
],
|
],
|
||||||
function(){ this.shiftImage.apply(this, [].slice(arguments, 1))}],
|
function(){ this.shiftImage.apply(this, [].slice(arguments, 1))}],
|
||||||
// horizontal shifting...
|
// horizontal shifting...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user