OSDN Git Service

Version 0.6.134, add comments for closure compiler.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 05_XUI_Gesture.js
index 1378f7d..9fd95b8 100644 (file)
@@ -24,7 +24,7 @@
                // start detection on touchstart\r
                Utils.addEvents( uinode, Hammer.EVENT_TYPES_START, this );\r
                \r
-               this.listen( type );\r
+               this[ 'listen' ]( type );\r
        };\r
        \r
        Hammer.defaults = {};\r
@@ -60,7 +60,7 @@
                // onmouseup, but when touchend has been fired we do nothing.\r
                // this is for touchdevices which also fire a mouseup on touchend\r
                if( type & MOUSE && touch_triggered ){\r
-                       return X.Callback.STOP_NOW | X.Callback.PREVENT_DEFAULT;\r
+                       return X_Callback_STOP_NOW | X_Callback_PREVENT_DEFAULT;\r
                } else\r
                // mousebutton must be down or a touch event\r
                if( type & TOUCH || //sourceEventType.match(/touch/) || // touch events are always on screen\r
                                // only when the instance options have enabled this gesture\r
                                active[ gesture.name ] &&\r
                                        // if a handler returns false, we stop with the detection\r
-                                       ( ret |= ( gesture.handler( e, hammer ) || X.Callback.NONE ) );\r
+                                       ( ret |= ( gesture.handler( e, hammer ) || X_Callback_NONE ) );\r
                        };\r
 \r
                        // endevent, but not the last touch, so dont stop\r
                if( !this.types[ type ] ) return;\r
                var e = Utils.extend( {}, gesture );\r
                e.type = type;\r
-               return this.uinode.dispatch( e );\r
+               return this.uinode[ 'dispatch' ]( e );\r
        };\r
        \r
        Hammer.prototype.listen = function( type ){\r
                 */\r
                addEvents : function( uinode, types, context ){\r
                        for( var i = 0; i < types.length; ++i ){\r
-                               uinode.listen( types[ i ], context );\r
+                               uinode[ 'listen' ]( types[ i ], context );\r
                        };\r
                },\r
                \r
                        switch( e.eventType ){\r
                                case START :\r
                                        // clear any running timers\r
-                                       this.timerID && X.Timer.remove( this.timerID );\r
+                                       this.timerID && X_Timer_remove( this.timerID );\r
 \r
                                        // set the gesture so we can check in the timeout if it still is\r
                                        Detection.current.name = this.name;\r
                                        \r
                                        // set timer and if after the timeout it still is hold,\r
                                        // we trigger the hold event\r
-                                       this.timerID = X.Timer.add( hammer.options.hold_timeout, 1, Gestures.Hold._onTimer, [ e, hammer ] );\r
+                                       this.timerID = X_Timer_add( hammer.options.hold_timeout, 1, Gestures.Hold._onTimer, [ e, hammer ] );\r
                                        return;\r
 \r
                                // when you move or end we clear the timer\r
                                case MOVE :\r
                                        if( e.distance <= hammer.options.hold_threshold ) return;\r
                                case END :\r
-                                       this.timerID && X.Timer.remove( this.timerID );\r
+                                       this.timerID && X_Timer_remove( this.timerID );\r
                                        if( Gestures.Hold.holding === true ){\r
                                                Gestures.Hold.holding = false;\r
                                                return hammer.trigger( X.UI.Event.HOLD_END, e );\r