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