From b1b402232d5feaf4ad96a92986e5300bacd36322 Mon Sep 17 00:00:00 2001 From: Jinhyuk Jun Date: Wed, 24 Apr 2013 18:54:57 +0900 Subject: [PATCH] Scrollview : remove useless setTimeout in case scrolls go outside Change-Id: I16a7dbab2fbbeb65d1f8f389480458c618b00494 --- src/js/jquery.mobile.tizen.scrollview.js | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/js/jquery.mobile.tizen.scrollview.js b/src/js/jquery.mobile.tizen.scrollview.js index 0bfdffb..ede55f6 100644 --- a/src/js/jquery.mobile.tizen.scrollview.js +++ b/src/js/jquery.mobile.tizen.scrollview.js @@ -208,16 +208,6 @@ define( [ ], function ( ) { y = 0, scroll_height = 0, self = this, - end_effect = function ( dir ) { - setTimeout( function () { - self._effect_dir = dir; - self._setEndEffect( "in" ); - }, 100 ); - - setTimeout( function () { - self._setEndEffect( "out" ); - }, 350 ); - }, vt = this._vTracker, ht = this._hTracker; @@ -242,15 +232,8 @@ define( [ ], function ( ) { } else if ( vt.isMin() ) { this._outerScroll( y - vt.getRemained() / 3, scroll_height ); - if ( scroll_height > 0 ) { - end_effect( 1 ); - } } else if ( vt.isMax() ) { this._outerScroll( vt.getRemained() / 3, scroll_height ); - - if ( scroll_height > 0 ) { - end_effect( 0 ); - } } } } @@ -367,17 +350,13 @@ define( [ ], function ( ) { if ( y > 0 ) { this._sy = 0; - if ( this._didDrag && scroll_height > 0 ) { - this._effect_dir = 0; - this._setEndEffect( "in" ); - } + this._effect_dir = 0; + this._setEndEffect( "in" ); } else if ( y < -scroll_height ) { this._sy = -scroll_height; - if ( this._didDrag && scroll_height > 0 ) { - this._effect_dir = 1; - this._setEndEffect( "in" ); - } + this._effect_dir = 1; + this._setEndEffect( "in" ); } else { if ( this._endEffect && this._sy !== y ) { this._setEndEffect(); -- 2.7.4