virtualgrid: changes event binding target
authorWoosung Sohn <woosungim.sohn@samsung.com>
Tue, 5 Feb 2013 06:18:01 +0000 (15:18 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 7 Feb 2013 05:53:02 +0000 (14:53 +0900)
When Virtualgrid is in the nested-scrollview structure,
Virtualgrid doesn't handle touch events properly.
This patch changes touch-related event binding targets, and
fixes wrong usage of a scrollview Virtualgrid contains.

(TDIS-2643, TDIS-2644, TDIS-2645)

Change-Id: I6f11a80c295f72e4a283d870697c600a64f45a33

src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js

index b0a6796..5c1c4b5 100644 (file)
                },
 
                _enableTracking: function () {
-                       $(document).bind( this._dragMoveEvt, this._dragMoveCB );
-                       $(document).bind( this._dragStopEvt, this._dragStopCB );
+                       var self = this;
+                       self._$view.bind( self._dragMoveEvt, self._dragMoveCB );
+                       self._$view.bind( self._dragStopEvt, self._dragStopCB );
+                       self._scrollView._enableTracking.apply( self );
                },
 
                _disableTracking: function () {
-                       $(document).unbind( this._dragMoveEvt, this._dragMoveCB );
-                       $(document).unbind( this._dragStopEvt, this._dragStopCB );
+                       var self = this;
+                       self._$view.unbind( self._dragMoveEvt, self._dragMoveCB );
+                       self._$view.unbind( self._dragStopEvt, self._dragStopCB );
+                       self._scrollView._disableTracking.apply( self );
                },
 
                _handleDragStart: function ( e, ex, ey ) {