Gallery winset image showing bug (when orientation change event fired)
has been fixed
Change-Id: I65846d6d8e726e274926f6f26b31c40e5fda3868
processing = function () {
self._resize( index );
self._align( index, obj );
processing = function () {
self._resize( index );
self._align( index, obj );
},
loading = function () {
if ( self.images[index] === undefined ) {
},
loading = function () {
if ( self.images[index] === undefined ) {
}
obj.css( "display", "block" );
}
obj.css( "display", "block" );
+ obj.css( "visibility", "hidden" );
obj.append( this.images[index] );
loading();
},
obj.append( this.images[index] );
loading();
},
coord_x = _x - this.org_x;
coord_x = _x - this.org_x;
- this._moveLeft( this.cur_img , coord_x + 'px');
+ this._moveLeft( this.cur_img , coord_x + 'px' );
if ( this.next_img.length ) {
this._moveLeft( this.next_img , coord_x + this.window_width + 'px' );
}
if ( this.next_img.length ) {
this._moveLeft( this.next_img , coord_x + this.window_width + 'px' );
}
},
_setTranslateposition : function ( $ele, value ) {
var translate,
},
_setTranslateposition : function ( $ele, value ) {
var translate,
+ cssArray = null,
+ self = this;
if ( $.support.cssTransform3d ) {
translate = "translate3d(" + value + ", 0px, 0px)";
if ( $.support.cssTransform3d ) {
translate = "translate3d(" + value + ", 0px, 0px)";
$ele.css(cssArray);
return $ele;
},
$ele.css(cssArray);
return $ele;
},
- _moveLeft : function ( $ele , value , duration) {
+ _hidePrevNext : function() {
+ var self = this;
+
+ if( self.next_img )
+ self.next_img.css( "visibility", "hidden" );
+ if( self.prev_img )
+ self.prev_img.css( "visibility", "hidden" );
+
+ },
+ _hideCur : function() {
+ var self = this;
+ if( self.cur_img )
+ self.cur_img.css( "visibility", "hidden" );
+ },
+ _moveLeft : function ( $ele , value , duration ) {
var translate,
transition = "",
var translate,
transition = "",
+ cssArray = null,
+ self = this;
if ( $.support.cssTransform3d ) {
translate = "translate3d(" + value + ", 0px, 0px)";
if ( $.support.cssTransform3d ) {
translate = "translate3d(" + value + ", 0px, 0px)";
"transform": translate};
if( transition !== "" ) {
cssArray["-webkit-transition"] = transition ;
"transform": translate};
if( transition !== "" ) {
cssArray["-webkit-transition"] = transition ;
+ if( value == "0px" )
+ $ele.one( 'webkitTransitionEnd', self._hidePrevNext );
+ else
+ $ele.one( 'webkitTransitionEnd', self._hideCur );
+ }
+ if( value == "0px" ) {
+ $ele.css( "visibility", "visible" );
this._attach( this.index, this.cur_img );
this._attach( this.index + 1, this.next_img );
this._attach( this.index, this.cur_img );
this._attach( this.index + 1, this.next_img );
+ this.cur_img.css( 'visibility', 'visible' );
if ( this.prev_img.length ) {
this._setTranslateposition( this.prev_img, -this.window_width + 'px');
}
if ( this.prev_img.length ) {
this._setTranslateposition( this.prev_img, -this.window_width + 'px');
}