some cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-09 19:39:57 +03:00
parent 16dd6c92a6
commit 4889a1196f
4 changed files with 19 additions and 17 deletions

View File

@ -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 : */ * vim:set ts=4 sw=4 : */
return module }) return module })

View File

@ -1602,7 +1602,7 @@ module.RibbonsPrototype = {
// NOTE: this will never scale the view in a wat that an image // NOTE: this will never scale the view in a wat that an image
// overflows either in height nor width. // 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){ fitImage: function(n, min){
n = n || 1 n = n || 1

View File

@ -176,6 +176,7 @@ module.GLOBAL_KEYBOARD = {
$(function(){ $(function(){
// XXX
window.a = testing.setupActions() window.a = testing.setupActions()
// setup features... // setup features...
@ -206,7 +207,6 @@ $(function(){
}) })
// setup base keyboard for devel, in case something breaks... // setup base keyboard for devel, in case something breaks...
$(document) $(document)
.keydown( .keydown(

View File

@ -1074,23 +1074,34 @@ actions.Actions({
}) })
// XXX
var SingleImageView = var SingleImageView =
module.SingleImageView = Feature({ module.SingleImageView = Feature({
tag: 'ui-single-image-view', tag: 'ui-single-image-view',
// XXX should this be an action???
// XXX // XXX
updateImageProportions: function(actions){
// XXX
},
setup: function(actions){ setup: function(actions){
var that = this
return actions return actions
.mixin(SingleImageActions) .mixin(SingleImageActions)
.on('toggleSingleImage.post fitImgae.post', this.tag, function(){ .on('fitImgae.post', this.tag, function(){
// XXX set image proportions... // singe image mode -- set image proportions...
if(this.toggleSingleImage('?') == 'on'){ if(this.toggleSingleImage('?') == 'on'){
console.log('!!!! single image: on') that.updateImageProportions(this)
// XXX }
})
.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 { } else {
console.log('!!!! single image: off')
this.ribbons.viewer.find('.image').css({ this.ribbons.viewer.find('.image').css({
width: '', width: '',
height: '' height: ''