@@ -35,14 +35,11 @@ define([
35
35
allowZoomOut = false ,
36
36
allowZoomIn = true ;
37
37
38
- ( function ( ) {
39
- var style = document . documentElement . style ,
40
- transitionEnabled = style . transition !== undefined ||
41
- style . WebkitTransition !== undefined ||
42
- style . MozTransition !== undefined ||
43
- style . MsTransition !== undefined ||
44
- style . OTransition !== undefined ;
45
- } ) ( ) ;
38
+ transitionEnabled = document . documentElement . style . transition !== undefined ||
39
+ document . documentElement . style . WebkitTransition !== undefined ||
40
+ document . documentElement . style . MozTransition !== undefined ||
41
+ document . documentElement . style . MsTransition !== undefined ||
42
+ document . documentElement . style . OTransition !== undefined ;
46
43
47
44
/**
48
45
* Return width and height of original image
@@ -314,7 +311,7 @@ define([
314
311
ratio ,
315
312
dimentions = { } ;
316
313
317
- if ( allowZoomIn && ( ! transitionEnabled && ! transitionActive ) && ( isTouchEnabled ||
314
+ if ( allowZoomIn && ( ! transitionEnabled || ! transitionActive ) && ( isTouchEnabled ||
318
315
! $ ( zoomInButtonSelector ) . hasClass ( zoomInDisabled ) ) ) {
319
316
$image = $ ( fullscreenImageSelector ) ;
320
317
imgOriginalSize = getImageSize ( $image [ 0 ] ) ;
@@ -387,7 +384,7 @@ define([
387
384
ratio ,
388
385
fitIntoParent ;
389
386
390
- if ( allowZoomOut && ( ! transitionEnabled && ! transitionActive ) && ( isTouchEnabled ||
387
+ if ( allowZoomOut && ( ! transitionEnabled || ! transitionActive ) && ( isTouchEnabled ||
391
388
! $ ( zoomOutButtonSelector ) . hasClass ( zoomOutDisabled ) ) ) {
392
389
allowZoomIn = true ;
393
390
$image = $ ( fullscreenImageSelector ) ;
@@ -679,7 +676,7 @@ define([
679
676
if ( $image . hasClass ( imageDraggableClass ) ) {
680
677
$image . removeClass ( imageDraggableClass ) ;
681
678
}
682
- } else if ( gallery . fullScreen && ( ! transitionEnabled && ! transitionActive ) ) {
679
+ } else if ( gallery . fullScreen && ( ! transitionEnabled || ! transitionActive ) ) {
683
680
imagePosY = getTop ( $image ) ;
684
681
imagePosX = $image . offset ( ) . left ;
685
682
@@ -719,7 +716,7 @@ define([
719
716
var clientX ,
720
717
clientY ;
721
718
722
- if ( gallery . fullScreen && isDragActive && ( ! transitionEnabled && ! transitionActive ) ) {
719
+ if ( gallery . fullScreen && isDragActive && ( ! transitionEnabled || ! transitionActive ) ) {
723
720
724
721
if ( allowZoomOut && ! $image . hasClass ( imageDraggableClass ) ) {
725
722
$image . addClass ( imageDraggableClass ) ;
0 commit comments