minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-10-12 04:52:44 +04:00
parent f987acd5c5
commit 02a21f9c3c
2 changed files with 12 additions and 6 deletions

View File

@ -111,10 +111,12 @@ module.GLOBAL_KEYBOARD = {
Up: {
default: doc('', function(){ a.prevRibbon() }),
shift: doc('', function(){ a.shiftImageUp() }),
'ctrl+shift': doc('', function(){ a.shiftImageUpNewRibbon() }),
},
Down: {
default: doc('', function(){ a.nextRibbon() }),
shift: doc('', function(){ a.shiftImageDown() }),
'ctrl+shift': doc('', function(){ a.shiftImageDownNewRibbon() }),
}
},

View File

@ -232,7 +232,7 @@ actions.Actions({
shiftImageDownNewRibbon: ['Shift image down to a new empty ribbon',
function(target){
this.data.newRibbon(target, 'below')
this.shiftImageUp(target)
this.shiftImageDown(target)
}],
// XXX is tracking direction here correct???
shiftImageLeft: ['Shift image left',
@ -320,6 +320,11 @@ actions.Actions(Client, {
this.focusImage()
}
}],
reload: [
function(){
this.ribbons.updateData(this.data)
this.focusImage()
}],
clear: [
// XXX do we need to delete the ribbons???
function(){
@ -395,24 +400,22 @@ actions.Actions(Client, {
// XXX
}],
// XXX
shiftImageUp: [
function(target){
return function(){
// XXX this is cheating...
this.ribbons.updateData(this.data)
this.focusImage()
this.reload()
}
}],
shiftImageDown: [
function(target){
return function(){
// XXX this is cheating...
this.ribbons.updateData(this.data)
this.focusImage()
this.reload()
}
}],
/* XXX these are not needed when reloading in .shiftImageUp(..) / .shiftImageDown(..)...
shiftImageUpNewRibbon: [
function(target){
// XXX only create a new ribbon...
@ -421,6 +424,7 @@ actions.Actions(Client, {
function(target){
// XXX only create a new ribbon...
}],
*/
shiftImageLeft: [
function(target){
this.ribbons.placeImage(target, -1)