mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
16dd6c92a6
commit
4889a1196f
@ -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 })
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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: ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user