Merge pull request #13781 from woocommerce/fix-13775
Change zoom mode on touch devices
This commit is contained in:
commit
9576ec6431
|
@ -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
Loading…
Reference in New Issue