c,
v;
- this._stopMScroll();
- this._showScrollBars();
- this._showOverflowIndicator();
-
this._$clip.trigger( this.options.startEventName );
if ( ht ) {
this._endEffect = true;
this._setOverflowIndicator( this._effect_dir );
+ this._showOverflowIndicator();
} else if ( dir === "out" ) {
if ( !this._endEffect ) {
return;
}
this._endEffect = false;
- this._setOverflowIndicator( this._effect_dir );
+ } else {
+ this._endEffect = false;
+ this._setOverflowIndicator();
+ this._showOverflowIndicator();
}
},
}
} else {
if ( this._endEffect && this._sy !== y ) {
- this._endEffect = false;
- this._setOverflowIndicator();
+ this._setEndEffect();
}
this._sy = y;
this._doSnapBackY = false;
}
- this._didDrag = true;
this._lastX = ex;
this._lastY = ey;
this._setScrollPosition( newX, newY );
- this._showScrollBars();
- this._showOverflowIndicator();
+ if ( this._didDrag === false ) {
+ this._didDrag = true;
+ this._showScrollBars();
+ this._showOverflowIndicator();
+ }
},
_handleDragStop: function ( e ) {
this._scrollbar_showed = false;
},
- _resetOverflowIndicator: function () {
- if ( !this.options.overflowEnable || !this._overflowAvail || this._softkeyboard ) {
- return;
- }
-
- this._overflow_top.css( "-webkit-animation", "" );
- this._overflow_bottom.css( "-webkit-animation", "" );
- },
-
_setOverflowIndicator: function ( dir ) {
if ( dir === 1 ) {
- this._opacity_top = "0.2";
+ this._opacity_top = "0";
this._opacity_bottom = "0.8";
} else if ( dir === 0 ) {
this._opacity_top = "0.8";
- this._opacity_bottom = "0.2";
+ this._opacity_bottom = "0";
} else {
this._opacity_top = "0.5";
this._opacity_bottom = "0.5";
}
},
- _getOverflowIndicator: function ( opacity ) {
- if ( opacity === "0.2" ) {
- return "-lite";
- } else if ( opacity === "0.8" ) {
- return "-dark";
- }
- return "";
- },
-
_showOverflowIndicator: function () {
if ( !this.options.overflowEnable || !this._overflowAvail || this._softkeyboard ) {
return;
}
- this._overflow_top.css( "opacity", this._opacity_top );
- this._overflow_bottom.css( "opacity", this._opacity_bottom );
-
- if ( this._overflow_showed === true ) {
- return;
- }
-
- this._overflow_top.css( "-webkit-animation", "ui-overflow-show" +
- this._getOverflowIndicator( this._opacity_top ) + " 0.3s 1 ease" );
- this._overflow_bottom.css( "-webkit-animation", "ui-overflow-show" +
- this._getOverflowIndicator( this._opacity_bottom ) + " 0.3s 1 ease" );
+ this._overflow_top.animate( { opacity: this._opacity_top }, 300 );
+ this._overflow_bottom.animate( { opacity: this._opacity_bottom }, 300 );
this._overflow_showed = true;
},
_hideOverflowIndicator: function () {
- var opacity_top,
- opacity_bottom;
-
if ( !this.options.overflowEnable || !this._overflowAvail || this._softkeyboard ) {
return;
}
return;
}
- opacity_top = this._overflow_top.css( "opacity" );
- opacity_bottom = this._overflow_bottom.css( "opacity" );
-
- this._overflow_top.css( "opacity", "0" );
- this._overflow_bottom.css( "opacity", "0" );
-
- this._overflow_top.css( "-webkit-animation", "ui-overflow-hide" +
- this._getOverflowIndicator( opacity_top ) + " 0.5s 1 ease" );
- this._overflow_bottom.css( "-webkit-animation", "ui-overflow-hide" +
- this._getOverflowIndicator( opacity_bottom ) + " 0.5s 1 ease" );
+ this._overflow_top.animate( { opacity: 0 }, 300 );
+ this._overflow_bottom.animate( { opacity: 0 }, 300 );
this._overflow_showed = false;
this._setOverflowIndicator();
self._set_scrollbar_size();
self._setScrollPosition( self._sx, self._sy );
self._showScrollBars( 2000 );
- self._resetOverflowIndicator();
}, 0 );
});
},