diff --git a/ui (gen4)/data.js b/ui (gen4)/data.js index c9243f5a..6de91dbb 100755 --- a/ui (gen4)/data.js +++ b/ui (gen4)/data.js @@ -1346,7 +1346,6 @@ module.DataPrototype = { // NOTE: this may result in empty ribbons... // NOTE: this will not crop the .order... // - // XXX flatten as an option... // XXX should this link to .root and .parent data??? crop: function(list, flatten){ var crop = this.clone() @@ -1398,6 +1397,7 @@ module.DataPrototype = { // // NOTE: this may result in empty ribbons... // + // XXX what are we doing with new ribbons??? // XXX sync ribbon order??? // XXX should we be able to align a merged crop??? // XXX test diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 187101d8..f710e500 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -89,13 +89,16 @@ module.GLOBAL_KEYBOARD = { }, // XXX testing... + Home: { default: 'firstImage', - ctrl: 'firstRibbon', + ctrl: 'firstGlobalImage', + shift: 'firstRibbon', }, End: { default: 'lastImage', - ctrl: 'lastRibbon', + ctrl: 'lastGlobalImage', + shift: 'lastRibbon', }, Left: { default: 'prevImage', diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index b395bd24..491a5265 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -150,6 +150,8 @@ actions.Actions({ function(img, list){ this.data.focusImage(img, list) }], + + focusRibbon: ['Focus Ribbon', function(target){ var data = this.data @@ -175,11 +177,15 @@ actions.Actions({ setBaseRibbon: ['Set base ribbon', function(target){ this.data.setBase(target) }], - // shorthands for .focusImage(..) and .focusRibbon(..)... firstImage: ['Focus first image in current ribbon', - function(){ this.focusImage('first') }], + function(all){ this.focusImage(all == null ? 'first' : 0) }], lastImage: ['Focus last image in current ribbon', - function(){ this.focusImage('last') }], + function(all){ this.focusImage(all == null ? 'last' : -1) }], + + firstGlobalImage: ['Get first globally image', + function(){ this.firstImage(true) }], + lastGlobalImage: ['Get last globally image', + function(){ this.lastImage(true) }], prevImage: ['Focus previous image', function(a){ @@ -217,6 +223,7 @@ actions.Actions({ nextImageInOrder: ['Focus next image in order', function(){ this.nextImage(this.data.order) }], + firstRibbon: ['Focus previous ribbon', function(){ this.focusRibbon('first') }], lastRibbon: ['Focus next ribbon', @@ -627,6 +634,7 @@ actions.Actions(Client, { // + usable as-is without any extra "features" // - not customizable without rewriting... // - might be too monolithic (god object?) + // ...need to think about it a bit more... focusImage: [ function(target, list){ var ribbons = this.ribbons @@ -786,6 +794,7 @@ actions.Actions(Client, { // XXX should these call .images.* or should it be done by data... // ...I think that data is a better candidate as it should be // standalone... + // XXX should we have .rotate(..) and .flip(..) generic actions??? rotateCW: [ function(target){ this.ribbons.rotateCW(target) }], rotateCCW: [