From: Jinhyuk Jun Date: Wed, 24 Apr 2013 09:54:57 +0000 (+0900) Subject: Scrollview : remove useless setTimeout in case scrolls go outside X-Git-Tag: 2.1b_release^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1b402232d5feaf4ad96a92986e5300bacd36322;p=framework%2Fweb%2Fweb-ui-fw.git Scrollview : remove useless setTimeout in case scrolls go outside Change-Id: I16a7dbab2fbbeb65d1f8f389480458c618b00494 --- 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();