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 : */
return module })

View File

@ -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

View File

@ -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(

View File

@ -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: ''