Merge pull request #13781 from woocommerce/fix-13775

Change zoom mode on touch devices
This commit is contained in:
Mike Jolley 2017-03-28 10:42:32 +01:00 committed by GitHub
commit 9576ec6431
2 changed files with 10 additions and 4 deletions

View File

@ -176,10 +176,16 @@ jQuery( function( $ ) {
// But only zoom if the img is larger than its container.
if ( zoomEnabled ) {
zoomTarget.trigger( 'zoom.destroy' );
zoomTarget.zoom( {
var zoom_options = {
touch: false
} );
};
if ( 'ontouchstart' in window ) {
zoom_options.on = 'click';
}
zoomTarget.trigger( 'zoom.destroy' );
zoomTarget.zoom( zoom_options );
}
};

File diff suppressed because one or more lines are too long