diff --git a/ui (gen4)/images.js b/ui (gen4)/images.js index 921d1278..ac1bc787 100755 --- a/ui (gen4)/images.js +++ b/ui (gen4)/images.js @@ -523,15 +523,6 @@ Images.prototype.constructor = Images -/*********************************************************************/ - -// XXX keep this here or move this to a different module??? -module.setupActionHandlers = function(context){ - // XXX -} - - - /********************************************************************** * vim:set ts=4 sw=4 : */ return module }) diff --git a/ui (gen4)/ribbons.js b/ui (gen4)/ribbons.js index ac6819b4..94d3bfb5 100755 --- a/ui (gen4)/ribbons.js +++ b/ui (gen4)/ribbons.js @@ -1602,7 +1602,7 @@ module.RibbonsPrototype = { // NOTE: this will never scale the view in a wat that an image // overflows either in height nor width. // - // XXX might be usefull to set origin before scaling... + // XXX might be useful to set origin before scaling... fitImage: function(n, min){ n = n || 1 diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 8717dd5a..98ecfca5 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -176,6 +176,7 @@ module.GLOBAL_KEYBOARD = { $(function(){ + // XXX window.a = testing.setupActions() // setup features... @@ -206,7 +207,6 @@ $(function(){ }) - // setup base keyboard for devel, in case something breaks... $(document) .keydown( diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 168bfddc..d9e2ace2 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -1074,23 +1074,34 @@ actions.Actions({ }) +// XXX var SingleImageView = module.SingleImageView = Feature({ tag: 'ui-single-image-view', + // XXX should this be an action??? // XXX + updateImageProportions: function(actions){ + // XXX + }, + setup: function(actions){ + var that = this return actions .mixin(SingleImageActions) - .on('toggleSingleImage.post fitImgae.post', this.tag, function(){ - // XXX set image proportions... + .on('fitImgae.post', this.tag, function(){ + // singe image mode -- set image proportions... if(this.toggleSingleImage('?') == 'on'){ - console.log('!!!! single image: on') - // XXX + that.updateImageProportions(this) + } + }) + .on('toggleSingleImage.post', this.tag, function(){ + // singe image mode -- set image proportions... + if(this.toggleSingleImage('?') == 'on'){ + that.updateImageProportions(this) - // restore original image size... + // ribbon mode -- restore original image size... } else { - console.log('!!!! single image: off') this.ribbons.viewer.find('.image').css({ width: '', height: ''