Merge pull request #13859 from woocommerce/tweak-13847
Fade gallery in after delay to avoid flash
This commit is contained in:
commit
414e2d434b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2163,13 +2163,6 @@ button.pswp__button--zoom:hover {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* added to get around variation image flicker issue */
|
|
||||||
.product.has-default-attributes.has-children {
|
|
||||||
> .images {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Eleven specific styles
|
* Twenty Eleven specific styles
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -174,9 +174,6 @@
|
||||||
|
|
||||||
// Show reset link.
|
// Show reset link.
|
||||||
form.toggleResetLink( attributes.chosenCount > 0 );
|
form.toggleResetLink( attributes.chosenCount > 0 );
|
||||||
|
|
||||||
// added to get around variation image flicker issue
|
|
||||||
$( '.product.has-default-attributes > .images' ).fadeTo( 200, 1 );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -108,6 +108,8 @@ jQuery( function( $ ) {
|
||||||
if ( this.flexslider_enabled ) {
|
if ( this.flexslider_enabled ) {
|
||||||
this.initFlexslider();
|
this.initFlexslider();
|
||||||
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
|
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
|
||||||
|
} else {
|
||||||
|
$( '.woocommerce-product-gallery' ).css( 'opacity', 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.zoom_enabled ) {
|
if ( this.zoom_enabled ) {
|
||||||
|
@ -136,6 +138,9 @@ jQuery( function( $ ) {
|
||||||
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
|
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
|
||||||
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
|
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
|
||||||
start: function() {
|
start: function() {
|
||||||
|
// Fade in.
|
||||||
|
$( '.woocommerce-product-gallery' ).css( 'opacity', 1 );
|
||||||
|
|
||||||
var largest_height = 0;
|
var largest_height = 0;
|
||||||
|
|
||||||
images.each( function() {
|
images.each( function() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -34,7 +34,7 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_cl
|
||||||
'images',
|
'images',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>">
|
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
|
||||||
<figure class="woocommerce-product-gallery__wrapper">
|
<figure class="woocommerce-product-gallery__wrapper">
|
||||||
<?php
|
<?php
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
|
|
Loading…
Reference in New Issue