Merge pull request #13859 from woocommerce/tweak-13847

Fade gallery in after delay to avoid flash
This commit is contained in:
Mike Jolley 2017-03-31 15:50:56 +01:00 committed by GitHub
commit 414e2d434b
8 changed files with 10 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2163,13 +2163,6 @@ button.pswp__button--zoom:hover {
display: block;
}
/* added to get around variation image flicker issue */
.product.has-default-attributes.has-children {
> .images {
opacity: 0;
}
}
/**
* Twenty Eleven specific styles
*/

View File

@ -174,9 +174,6 @@
// Show reset link.
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

View File

@ -108,6 +108,8 @@ jQuery( function( $ ) {
if ( this.flexslider_enabled ) {
this.initFlexslider();
$target.on( 'woocommerce_gallery_reset_slide_position', this.onResetSlidePosition );
} else {
$( '.woocommerce-product-gallery' ).css( 'opacity', 1 );
}
if ( this.zoom_enabled ) {
@ -136,6 +138,9 @@ jQuery( function( $ ) {
animationSpeed: wc_single_product_params.flexslider.animationSpeed,
animationLoop: wc_single_product_params.flexslider.animationLoop, // Breaks photoswipe pagination if true.
start: function() {
// Fade in.
$( '.woocommerce-product-gallery' ).css( 'opacity', 1 );
var largest_height = 0;
images.each( function() {

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_cl
'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">
<?php
$attributes = array(