some cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-01-01 02:22:17 +03:00
parent e553bcc378
commit 5f2d7d2188
3 changed files with 9 additions and 11 deletions

View File

@ -43,8 +43,7 @@ module.CLI = core.ImageGridFeatures.Feature({
depends: ['base'],
isApplicable: function(){
return this.runtime == 'node' || this.runtime == 'nw'
},
return this.runtime == 'node' || this.runtime == 'nw' },
handlers: [
['start',
@ -106,9 +105,6 @@ module.CLI = core.ImageGridFeatures.Feature({
/**********************************************************************
* vim:set ts=4 sw=4 : */
return module })

View File

@ -2816,7 +2816,10 @@ module.IndirectControl = core.ImageGridFeatures.Feature({
function(_, state){
if(state == null){
return this.__touch_handler || 'none'
return (this.ribbons
&& this.ribbons.viewer
&& this.ribbons.viewer.data('hammer'))
|| 'none'
// on...
} else if(state == 'handling-swipes'){
@ -2824,13 +2827,13 @@ module.IndirectControl = core.ImageGridFeatures.Feature({
var viewer = this.ribbons.viewer
// prevent multiple handlers...
if(this.__touch_handler){
if(viewer.data('hammer') != null){
return
}
viewer.hammer()
var h = this.__touch_handler = viewer.data('hammer')
var h = viewer.data('hammer')
h.get('swipe').set({direction: Hammer.DIRECTION_ALL})
viewer
@ -2847,7 +2850,6 @@ module.IndirectControl = core.ImageGridFeatures.Feature({
.off('swipeup')
.off('swipedown')
.removeData('hammer')
delete this.__touch_handler
}
},

View File

@ -1,6 +1,7 @@
#!/usr/bin/env node
/**********************************************************************
*
* ImageGrid.CLI entry point...
*
*
**********************************************************************/
@ -21,6 +22,7 @@ require = requirejs
//---------------------------------------------------------------------
// XXX need to automate this...
var core = require('features/core')
var base = require('features/base')
var location = require('features/location')
@ -43,7 +45,6 @@ module.ImageGridFeatures =
core.ImageGridFeatures
//---------------------------------------------------------------------
// setup actions and start...
@ -53,6 +54,5 @@ ImageGridFeatures
/**********************************************************************
* vim:set ts=4 sw=4 : */