@get-set/gs-zoom 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -1
- package/actions/general.ts +29 -0
- package/actions/getAdjustTransform.ts +46 -0
- package/actions/getCurrentParams.ts +42 -0
- package/actions/getTranslateCoordToPoint.ts +37 -0
- package/actions/init.ts +25 -0
- package/actions/initActionEvents.ts +102 -0
- package/actions/initAdditionals.ts +91 -0
- package/actions/initAdjust.ts +120 -0
- package/actions/initAdjustAdditionalActive.ts +31 -0
- package/actions/initArrows.ts +36 -0
- package/actions/initAutoplay.ts +91 -0
- package/actions/initChange.ts +139 -0
- package/actions/initClose.ts +29 -0
- package/actions/initDraggle.ts +258 -0
- package/actions/initDraw.ts +83 -0
- package/actions/initDrawItem.ts +77 -0
- package/actions/initFullScreen.ts +30 -0
- package/actions/initLightBox.ts +13 -0
- package/actions/initMagnifier.ts +53 -0
- package/actions/initNavigateWithKeys.ts +22 -0
- package/actions/initOpen.ts +29 -0
- package/actions/initWheel.ts +44 -0
- package/actions/setStyles.ts +28 -0
- package/components/GSZoom.tsx +178 -0
- package/{dist/components → components}/styles/GSZoom.scss +252 -254
- package/components/styles/GSZoomCSS.ts +237 -0
- package/constants/defaultParams.ts +20 -0
- package/constants/icons.ts +25 -0
- package/constants/magnifierDefaultProps.ts +9 -0
- package/constants/types.ts +6 -0
- package/dist/GSZoom.d.ts +2 -0
- package/dist/actions/general.d.ts +7 -0
- package/dist/actions/general.d.ts.map +1 -0
- package/dist/actions/general.js +26 -30
- package/dist/actions/general.js.map +1 -0
- package/dist/actions/getAdjustTransform.d.ts +3 -0
- package/dist/actions/getAdjustTransform.d.ts.map +1 -0
- package/dist/actions/getAdjustTransform.js +41 -43
- package/dist/actions/getAdjustTransform.js.map +1 -0
- package/dist/actions/getCurrentParams.d.ts +4 -0
- package/dist/actions/getCurrentParams.d.ts.map +1 -0
- package/dist/actions/getCurrentParams.js +35 -42
- package/dist/actions/getCurrentParams.js.map +1 -0
- package/dist/actions/getTranslateCoordToPoint.d.ts +3 -0
- package/dist/actions/getTranslateCoordToPoint.d.ts.map +1 -0
- package/dist/actions/getTranslateCoordToPoint.js +21 -41
- package/dist/actions/getTranslateCoordToPoint.js.map +1 -0
- package/dist/actions/init.d.ts +4 -0
- package/dist/actions/init.d.ts.map +1 -0
- package/dist/actions/init.js +21 -21
- package/dist/actions/init.js.map +1 -0
- package/dist/actions/initActionEvents.d.ts +4 -0
- package/dist/actions/initActionEvents.d.ts.map +1 -0
- package/dist/actions/initActionEvents.js +80 -127
- package/dist/actions/initActionEvents.js.map +1 -0
- package/dist/actions/initAdditionals.d.ts +4 -0
- package/dist/actions/initAdditionals.d.ts.map +1 -0
- package/dist/actions/initAdditionals.js +78 -117
- package/dist/actions/initAdditionals.js.map +1 -0
- package/dist/actions/initAdjust.d.ts +4 -0
- package/dist/actions/initAdjust.d.ts.map +1 -0
- package/dist/actions/initAdjust.js +96 -107
- package/dist/actions/initAdjust.js.map +1 -0
- package/dist/actions/initAdjustAdditionalActive.d.ts +4 -0
- package/dist/actions/initAdjustAdditionalActive.d.ts.map +1 -0
- package/dist/actions/initAdjustAdditionalActive.js +25 -33
- package/dist/actions/initAdjustAdditionalActive.js.map +1 -0
- package/dist/actions/initArrows.d.ts +4 -0
- package/dist/actions/initArrows.d.ts.map +1 -0
- package/dist/actions/initArrows.js +28 -44
- package/dist/actions/initArrows.js.map +1 -0
- package/dist/actions/initAutoplay.d.ts +6 -0
- package/dist/actions/initAutoplay.d.ts.map +1 -0
- package/dist/actions/initAutoplay.js +85 -81
- package/dist/actions/initAutoplay.js.map +1 -0
- package/dist/actions/initChange.d.ts +4 -0
- package/dist/actions/initChange.d.ts.map +1 -0
- package/dist/actions/initChange.js +116 -137
- package/dist/actions/initChange.js.map +1 -0
- package/dist/actions/initClose.d.ts +3 -0
- package/dist/actions/initClose.d.ts.map +1 -0
- package/dist/actions/initClose.js +24 -28
- package/dist/actions/initClose.js.map +1 -0
- package/dist/actions/initDraggle.d.ts +4 -0
- package/dist/actions/initDraggle.d.ts.map +1 -0
- package/dist/actions/initDraggle.js +227 -303
- package/dist/actions/initDraggle.js.map +1 -0
- package/dist/actions/initDraw.d.ts +4 -0
- package/dist/actions/initDraw.d.ts.map +1 -0
- package/dist/actions/initDraw.js +74 -90
- package/dist/actions/initDraw.js.map +1 -0
- package/dist/actions/initDrawItem.d.ts +4 -0
- package/dist/actions/initDrawItem.d.ts.map +1 -0
- package/dist/actions/initDrawItem.js +63 -79
- package/dist/actions/initDrawItem.js.map +1 -0
- package/dist/actions/initFullScreen.d.ts +4 -0
- package/dist/actions/initFullScreen.d.ts.map +1 -0
- package/dist/actions/initFullScreen.js +32 -32
- package/dist/actions/initFullScreen.js.map +1 -0
- package/dist/actions/initLightBox.d.ts +4 -0
- package/dist/actions/initLightBox.d.ts.map +1 -0
- package/dist/actions/initLightBox.js +11 -12
- package/dist/actions/initLightBox.js.map +1 -0
- package/dist/actions/initMagnifier.d.ts +4 -0
- package/dist/actions/initMagnifier.d.ts.map +1 -0
- package/dist/actions/initMagnifier.js +42 -54
- package/dist/actions/initMagnifier.js.map +1 -0
- package/dist/actions/initNavigateWithKeys.d.ts +4 -0
- package/dist/actions/initNavigateWithKeys.d.ts.map +1 -0
- package/dist/actions/initNavigateWithKeys.js +18 -27
- package/dist/actions/initNavigateWithKeys.js.map +1 -0
- package/dist/actions/initOpen.d.ts +4 -0
- package/dist/actions/initOpen.d.ts.map +1 -0
- package/dist/actions/initOpen.js +27 -28
- package/dist/actions/initOpen.js.map +1 -0
- package/dist/actions/initWheel.d.ts +4 -0
- package/dist/actions/initWheel.d.ts.map +1 -0
- package/dist/actions/initWheel.js +27 -49
- package/dist/actions/initWheel.js.map +1 -0
- package/dist/actions/setStyles.d.ts +4 -0
- package/dist/actions/setStyles.d.ts.map +1 -0
- package/dist/actions/setStyles.js +23 -24
- package/dist/actions/setStyles.js.map +1 -0
- package/dist/components/GSZoom.d.ts +23 -0
- package/dist/components/GSZoom.d.ts.map +1 -0
- package/dist/components/GSZoom.js +122 -177
- package/dist/components/GSZoom.js.map +1 -0
- package/dist/components/styles/GSZoomCSS.d.ts +3 -0
- package/dist/components/styles/GSZoomCSS.d.ts.map +1 -0
- package/dist/components/styles/GSZoomCSS.js +238 -0
- package/dist/components/styles/GSZoomCSS.js.map +1 -0
- package/dist/constants/defaultParams.d.ts +4 -0
- package/dist/constants/defaultParams.d.ts.map +1 -0
- package/dist/constants/defaultParams.js +18 -19
- package/dist/constants/defaultParams.js.map +1 -0
- package/dist/constants/icons.d.ts +13 -0
- package/dist/constants/icons.d.ts.map +1 -0
- package/dist/constants/icons.js +16 -25
- package/dist/constants/icons.js.map +1 -0
- package/dist/constants/magnifierDefaultProps.d.ts +4 -0
- package/dist/constants/magnifierDefaultProps.d.ts.map +1 -0
- package/dist/constants/magnifierDefaultProps.js +7 -7
- package/dist/constants/magnifierDefaultProps.js.map +1 -0
- package/dist/constants/types.d.ts +6 -0
- package/dist/constants/types.d.ts.map +1 -0
- package/dist/constants/types.js +6 -6
- package/dist/constants/types.js.map +1 -0
- package/dist/helpers/uihelpers.d.ts +2 -0
- package/dist/helpers/uihelpers.d.ts.map +1 -0
- package/dist/helpers/uihelpers.js +8 -9
- package/dist/helpers/uihelpers.js.map +1 -0
- package/dist/types/params.d.ts +35 -0
- package/dist/types/params.d.ts.map +1 -0
- package/dist/types/params.js +2 -0
- package/dist/types/params.js.map +1 -0
- package/dist/types/ref.d.ts +23 -0
- package/dist/types/ref.d.ts.map +1 -0
- package/dist/types/ref.js +2 -0
- package/dist/types/ref.js.map +1 -0
- package/dist-js/bundle.js +1689 -0
- package/helpers/uihelpers.ts +7 -0
- package/package.json +74 -43
- package/styles/GSZoom.scss +252 -0
- package/types/global.d.ts +33 -0
- package/types/params.ts +36 -0
- package/types/ref.ts +23 -0
- package/dist/components/styles/GSZoom.css.map +0 -1
- package/index.js +0 -3
- /package/{dist → components/styles}/GSZoom.css +0 -0
- /package/{dist/components/styles → styles}/GSZoom.css +0 -0
|
@@ -1,41 +1,21 @@
|
|
|
1
|
-
import { getTranslateCoord } from
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(clientY - (containerHeight - actualHeight) / 2 - translatey) /
|
|
23
|
-
actualHeight;
|
|
24
|
-
|
|
25
|
-
mouseDirectionX =
|
|
26
|
-
(clientX - (containerWidth - actualWidth) / 2 - translatex) / actualWidth;
|
|
27
|
-
|
|
28
|
-
const newActualWidth = (actualWidth * newScale) / scale;
|
|
29
|
-
const newActualHeight = (actualHeight * newScale) / scale;
|
|
30
|
-
|
|
31
|
-
const newTranslatex =
|
|
32
|
-
(newActualWidth - containerWidth) / 2 -
|
|
33
|
-
(newActualWidth * mouseDirectionX - clientX);
|
|
34
|
-
const newTranslatey =
|
|
35
|
-
(newActualHeight - containerHeight) / 2 -
|
|
36
|
-
(newActualHeight * mouseDirectionY - clientY);
|
|
37
|
-
|
|
38
|
-
return [newTranslatex, newTranslatey];
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default getTranslateCoordToPoint;
|
|
1
|
+
import { getTranslateCoord } from './general';
|
|
2
|
+
const getTranslateCoordToPoint = ($img, $container, scale, newScale, clientX, clientY) => {
|
|
3
|
+
const coords = getTranslateCoord($img);
|
|
4
|
+
const translatex = coords.x;
|
|
5
|
+
const translatey = coords.y;
|
|
6
|
+
const actualWidth = $img.clientWidth * scale;
|
|
7
|
+
const actualHeight = $img.clientHeight * scale;
|
|
8
|
+
const containerWidth = $container.clientWidth;
|
|
9
|
+
const containerHeight = $container.clientHeight;
|
|
10
|
+
const mouseDirectionY = (clientY - (containerHeight - actualHeight) / 2 - translatey) / actualHeight;
|
|
11
|
+
const mouseDirectionX = (clientX - (containerWidth - actualWidth) / 2 - translatex) / actualWidth;
|
|
12
|
+
const newActualWidth = (actualWidth * newScale) / scale;
|
|
13
|
+
const newActualHeight = (actualHeight * newScale) / scale;
|
|
14
|
+
const newTranslatex = (newActualWidth - containerWidth) / 2 -
|
|
15
|
+
(newActualWidth * mouseDirectionX - clientX);
|
|
16
|
+
const newTranslatey = (newActualHeight - containerHeight) / 2 -
|
|
17
|
+
(newActualHeight * mouseDirectionY - clientY);
|
|
18
|
+
return [newTranslatex, newTranslatey];
|
|
19
|
+
};
|
|
20
|
+
export default getTranslateCoordToPoint;
|
|
21
|
+
//# sourceMappingURL=getTranslateCoordToPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTranslateCoordToPoint.js","sourceRoot":"","sources":["../../actions/getTranslateCoordToPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,wBAAwB,GAAG,CAC/B,IAAiB,EACjB,UAAuB,EACvB,KAAa,EACb,QAAgB,EAChB,OAAe,EACf,OAAe,EACG,EAAE;IACpB,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;IAC5B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;IAC5B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC/C,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAC9C,MAAM,eAAe,GAAG,UAAU,CAAC,YAAY,CAAC;IAEhD,MAAM,eAAe,GACnB,CAAC,OAAO,GAAG,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,YAAY,CAAC;IAC/E,MAAM,eAAe,GACnB,CAAC,OAAO,GAAG,CAAC,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,WAAW,CAAC;IAE5E,MAAM,cAAc,GAAG,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,KAAK,CAAC;IACxD,MAAM,eAAe,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,GAAG,KAAK,CAAC;IAE1D,MAAM,aAAa,GACjB,CAAC,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;QACrC,CAAC,cAAc,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;IAC/C,MAAM,aAAa,GACjB,CAAC,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC;QACvC,CAAC,eAAe,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;IAEhD,OAAO,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../actions/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,IAAI,GAAI,KAAK,GAAG,KAAG,IAiBxB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/actions/init.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import types from
|
|
2
|
-
import initLightBox from
|
|
3
|
-
import initMagnifier from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import types from '../constants/types';
|
|
2
|
+
import initLightBox from './initLightBox';
|
|
3
|
+
import initMagnifier from './initMagnifier';
|
|
4
|
+
const init = (ref) => {
|
|
5
|
+
if (typeof ref.currentParams.beforeInit === 'function') {
|
|
6
|
+
ref.currentParams.beforeInit();
|
|
7
|
+
}
|
|
8
|
+
switch (ref.currentParams.type) {
|
|
9
|
+
case types.lightbox:
|
|
10
|
+
initLightBox(ref);
|
|
11
|
+
break;
|
|
12
|
+
case types.magnifier:
|
|
13
|
+
initMagnifier(ref);
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
if (typeof ref.currentParams.afterInit === 'function') {
|
|
17
|
+
ref.currentParams.afterInit();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export default init;
|
|
21
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../actions/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C,MAAM,IAAI,GAAG,CAAC,GAAQ,EAAQ,EAAE;IAC9B,IAAI,OAAO,GAAG,CAAC,aAAa,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QACvD,GAAG,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;IAED,QAAQ,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAC/B,KAAK,KAAK,CAAC,QAAQ;YACjB,YAAY,CAAC,GAAG,CAAC,CAAC;YAClB,MAAM;QACR,KAAK,KAAK,CAAC,SAAS;YAClB,aAAa,CAAC,GAAG,CAAC,CAAC;YACnB,MAAM;IACV,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,aAAa,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;QACtD,GAAG,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;IAChC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initActionEvents.d.ts","sourceRoot":"","sources":["../../actions/initActionEvents.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,gBAAgB,GAAI,KAAK,GAAG,KAAG,IA2FpC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,127 +1,80 @@
|
|
|
1
|
-
import icons from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
$
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
$
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
setStyles(ref, $img, {
|
|
82
|
-
transition: "unset",
|
|
83
|
-
});
|
|
84
|
-
}, 300);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
if ($btnZoomOut != null) {
|
|
89
|
-
$btnZoomOut.addEventListener("click", () => {
|
|
90
|
-
const $img = ref.$img;
|
|
91
|
-
const scale =
|
|
92
|
-
$img.dataset.scale != undefined ? parseFloat($img.dataset.scale) : 1;
|
|
93
|
-
|
|
94
|
-
if (scale > 1) {
|
|
95
|
-
clearTimeout(window.timeout);
|
|
96
|
-
const newScale = Math.max(1, scale - 0.4);
|
|
97
|
-
$img.dataset.scale = newScale;
|
|
98
|
-
let [newTranslatex, newTranslatey] = getTranslateCoordToPoint(
|
|
99
|
-
$img,
|
|
100
|
-
$container,
|
|
101
|
-
scale,
|
|
102
|
-
newScale,
|
|
103
|
-
$container.clientWidth / 2,
|
|
104
|
-
$container.clientHeight / 2
|
|
105
|
-
);
|
|
106
|
-
[newTranslatex, newTranslatey] = getAdjustTransform(
|
|
107
|
-
newScale,
|
|
108
|
-
newTranslatex,
|
|
109
|
-
newTranslatey,
|
|
110
|
-
$img,
|
|
111
|
-
$container
|
|
112
|
-
);
|
|
113
|
-
setStyles(ref, $img, {
|
|
114
|
-
transition: ".3s ease-in-out",
|
|
115
|
-
transform: `scale(${newScale}) translate(${newTranslatex}px, ${newTranslatey}px)`,
|
|
116
|
-
});
|
|
117
|
-
window.timeout = setTimeout(function () {
|
|
118
|
-
setStyles(ref, $img, {
|
|
119
|
-
transition: "unset",
|
|
120
|
-
});
|
|
121
|
-
}, 300);
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export default initActionEvents;
|
|
1
|
+
import icons from '../constants/icons';
|
|
2
|
+
import getAdjustTransform from './getAdjustTransform';
|
|
3
|
+
import getTranslateCoordToPoint from './getTranslateCoordToPoint';
|
|
4
|
+
import { initAutoplay, stopAutoplay } from './initAutoplay';
|
|
5
|
+
import { exitFullScreen } from './initFullScreen';
|
|
6
|
+
import setStyles from './setStyles';
|
|
7
|
+
const initActionEvents = (ref) => {
|
|
8
|
+
const params = ref.currentParams;
|
|
9
|
+
const $container = ref.$container;
|
|
10
|
+
const $btnAdditionals = ref.$btnAdditionals;
|
|
11
|
+
const $btnAutoplay = ref.$btnAutoplay;
|
|
12
|
+
const $btnClose = ref.$btnClose;
|
|
13
|
+
const $btnZoomIn = ref.$btnZoomIn;
|
|
14
|
+
const $btnZoomOut = ref.$btnZoomOut;
|
|
15
|
+
if ($btnAdditionals != null) {
|
|
16
|
+
$btnAdditionals.addEventListener('click', () => {
|
|
17
|
+
$container
|
|
18
|
+
.querySelector('.gs-zoom-additionals')
|
|
19
|
+
?.classList.toggle('gs-zoom-hidden');
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if ($btnAutoplay != null) {
|
|
23
|
+
$btnAutoplay.addEventListener('click', () => {
|
|
24
|
+
if (ref.autoplay === undefined) {
|
|
25
|
+
initAutoplay(ref);
|
|
26
|
+
$btnAutoplay.innerHTML = icons.autoplayPause;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
stopAutoplay(ref);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if ($btnClose != null) {
|
|
34
|
+
$btnClose.addEventListener('click', () => {
|
|
35
|
+
exitFullScreen();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if ($btnZoomIn != null) {
|
|
39
|
+
$btnZoomIn.addEventListener('click', () => {
|
|
40
|
+
const $img = ref.$img;
|
|
41
|
+
const scale = $img.dataset.scale !== undefined ? parseFloat($img.dataset.scale) : 1;
|
|
42
|
+
if (scale < params.maxZoom) {
|
|
43
|
+
clearTimeout(ref.zoomButtonTimeout);
|
|
44
|
+
const newScale = Math.min(scale + 0.4, params.maxZoom);
|
|
45
|
+
$img.dataset.scale = String(newScale);
|
|
46
|
+
let [newTranslatex, newTranslatey] = getTranslateCoordToPoint($img, $container, scale, newScale, $container.clientWidth / 2, $container.clientHeight / 2);
|
|
47
|
+
[newTranslatex, newTranslatey] = getAdjustTransform(newScale, newTranslatex, newTranslatey, $img, $container);
|
|
48
|
+
setStyles(ref, $img, {
|
|
49
|
+
transition: '.3s ease-in-out',
|
|
50
|
+
transform: `scale(${newScale}) translate(${newTranslatex}px, ${newTranslatey}px)`,
|
|
51
|
+
});
|
|
52
|
+
ref.zoomButtonTimeout = setTimeout(() => {
|
|
53
|
+
setStyles(ref, $img, { transition: 'unset' });
|
|
54
|
+
}, 300);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if ($btnZoomOut != null) {
|
|
59
|
+
$btnZoomOut.addEventListener('click', () => {
|
|
60
|
+
const $img = ref.$img;
|
|
61
|
+
const scale = $img.dataset.scale !== undefined ? parseFloat($img.dataset.scale) : 1;
|
|
62
|
+
if (scale > 1) {
|
|
63
|
+
clearTimeout(ref.zoomButtonTimeout);
|
|
64
|
+
const newScale = Math.max(1, scale - 0.4);
|
|
65
|
+
$img.dataset.scale = String(newScale);
|
|
66
|
+
let [newTranslatex, newTranslatey] = getTranslateCoordToPoint($img, $container, scale, newScale, $container.clientWidth / 2, $container.clientHeight / 2);
|
|
67
|
+
[newTranslatex, newTranslatey] = getAdjustTransform(newScale, newTranslatex, newTranslatey, $img, $container);
|
|
68
|
+
setStyles(ref, $img, {
|
|
69
|
+
transition: '.3s ease-in-out',
|
|
70
|
+
transform: `scale(${newScale}) translate(${newTranslatex}px, ${newTranslatey}px)`,
|
|
71
|
+
});
|
|
72
|
+
ref.zoomButtonTimeout = setTimeout(() => {
|
|
73
|
+
setStyles(ref, $img, { transition: 'unset' });
|
|
74
|
+
}, 300);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
export default initActionEvents;
|
|
80
|
+
//# sourceMappingURL=initActionEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initActionEvents.js","sourceRoot":"","sources":["../../actions/initActionEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,MAAM,gBAAgB,GAAG,CAAC,GAAQ,EAAQ,EAAE;IAC1C,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC;IACjC,MAAM,UAAU,GAAG,GAAG,CAAC,UAAW,CAAC;IACnC,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAC5C,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IACtC,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAChC,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IAClC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAEpC,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAC5B,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAC7C,UAAU;iBACP,aAAa,CAAC,sBAAsB,CAAC;gBACtC,EAAE,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;QACzB,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAC1C,IAAI,GAAG,CAAC,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AE,aAAa,CAAC,GAAG,kBAAkB,CACjD,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,CACzD,CAAC;gBACF,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE;oBACnB,UAAU,EAAE,iBAAiB;oBAC7B,SAAS,EAAE,SAAS,QAAQ,eAAe,aAAa,OAAO,aAAa,KAAK;iBAClF,CAAC,CAAC;gBACH,GAAG,CAAC,iBAAiB,GAAG,UAAU,CAAC,GAAG,EAAE;oBACtC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;gBAChD,CAAC,EAAE,GAAG,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initAdditionals.d.ts","sourceRoot":"","sources":["../../actions/initAdditionals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,eAAe,GAAI,KAAK,GAAG,KAAG,IAoFnC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,117 +1,78 @@
|
|
|
1
|
-
import { getTranslateCoord } from
|
|
2
|
-
import initChange from
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (translate > 0) {
|
|
80
|
-
$addList.style.transform = `translateX(0px)`;
|
|
81
|
-
} else if (translate < $container.clientWidth - $addList.clientWidth) {
|
|
82
|
-
$addList.style.transform = `translateX(${
|
|
83
|
-
$container.clientWidth - $addList.clientWidth
|
|
84
|
-
}px)`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
$container.addEventListener("mouseup", (e) => {
|
|
89
|
-
if ($container.classList.contains("gs-additional-isdragging")) {
|
|
90
|
-
$container.classList.remove("gs-additional-isdragging");
|
|
91
|
-
const translate = getTranslateCoord($addList).x;
|
|
92
|
-
if (translate > 0) {
|
|
93
|
-
$addList.style.transform = `translateX(0px)`;
|
|
94
|
-
} else if (translate < $container.clientWidth - $addList.clientWidth) {
|
|
95
|
-
$addList.style.transform = `translateX(${
|
|
96
|
-
$container.clientWidth - $addList.clientWidth
|
|
97
|
-
}px)`;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
$container.addEventListener("touchend", (e) => {
|
|
102
|
-
if ($container.classList.contains("gs-additional-isdragging")) {
|
|
103
|
-
$container.classList.remove("gs-additional-isdragging");
|
|
104
|
-
const translate = getTranslateCoord($addList).x;
|
|
105
|
-
if (translate > 0) {
|
|
106
|
-
$addList.style.transform = `translateX(0px)`;
|
|
107
|
-
} else if (translate < $container.clientWidth - $addList.clientWidth) {
|
|
108
|
-
$addList.style.transform = `translateX(${
|
|
109
|
-
$container.clientWidth - $addList.clientWidth
|
|
110
|
-
}px)`;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export default initAdditionals;
|
|
1
|
+
import { getTranslateCoord } from './general';
|
|
2
|
+
import initChange from './initChange';
|
|
3
|
+
const initAdditionals = (ref) => {
|
|
4
|
+
const params = ref.currentParams;
|
|
5
|
+
if (params.showAdditionals && ref.list.length > 1) {
|
|
6
|
+
const $container = ref.$container;
|
|
7
|
+
const $addContainer = document.createElement('div');
|
|
8
|
+
const $addList = document.createElement('div');
|
|
9
|
+
const $addListContainer = document.createElement('div');
|
|
10
|
+
$addContainer.classList.add('gs-zoom-additionals', 'gs-zoom-hide-inzoomed', 'gs-zoom-hidden');
|
|
11
|
+
$addListContainer.classList.add('gs-add-list-container');
|
|
12
|
+
$addList.classList.add('gs-add-list');
|
|
13
|
+
$addList.style.transform = 'translateX(0px)';
|
|
14
|
+
ref.list.forEach((el, index) => {
|
|
15
|
+
const $item = document.createElement('div');
|
|
16
|
+
$item.dataset.index = String(index);
|
|
17
|
+
if (index === ref.currentIndex) {
|
|
18
|
+
$item.classList.add('active');
|
|
19
|
+
}
|
|
20
|
+
const $itemImg = document.createElement('img');
|
|
21
|
+
$itemImg.src = el.src.split('?')[0] + params.additionalImageQueryParameters;
|
|
22
|
+
$itemImg.onload = () => {
|
|
23
|
+
$item.classList.remove('gz-zoom-is-loading');
|
|
24
|
+
};
|
|
25
|
+
$item.classList.add('gs-add-item', 'gz-zoom-is-loading');
|
|
26
|
+
$item.append($itemImg);
|
|
27
|
+
$addList.append($item);
|
|
28
|
+
$item.addEventListener('click', () => {
|
|
29
|
+
initChange(ref, index);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
$addListContainer.append($addList);
|
|
33
|
+
$addContainer.append($addListContainer);
|
|
34
|
+
$container.append($addContainer);
|
|
35
|
+
const clampTranslate = () => {
|
|
36
|
+
const translate = getTranslateCoord($addList).x;
|
|
37
|
+
if (translate > 0) {
|
|
38
|
+
$addList.style.transform = 'translateX(0px)';
|
|
39
|
+
}
|
|
40
|
+
else if (translate < $container.clientWidth - $addList.clientWidth) {
|
|
41
|
+
$addList.style.transform = `translateX(${$container.clientWidth - $addList.clientWidth}px)`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
$addList.ontouchstart = $addList.onmousedown = (e) => {
|
|
45
|
+
if ($addList.clientWidth > $container.clientWidth) {
|
|
46
|
+
const te = e;
|
|
47
|
+
window.initX =
|
|
48
|
+
te.targetTouches?.length > 0 ? te.targetTouches[0].clientX : e.clientX;
|
|
49
|
+
window.initListTranslateX = getTranslateCoord($addList).x;
|
|
50
|
+
$container.classList.add('gs-additional-isdragging');
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
$container.addEventListener('touchmove', (e) => {
|
|
54
|
+
if ($container.classList.contains('gs-additional-isdragging')) {
|
|
55
|
+
window.clientX = e.targetTouches[0].clientX;
|
|
56
|
+
$addList.style.transform = `translateX(${window.initListTranslateX + (window.clientX - window.initX)}px)`;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
$container.addEventListener('mousemove', (e) => {
|
|
60
|
+
if ($container.classList.contains('gs-additional-isdragging') &&
|
|
61
|
+
$addList.clientWidth > $container.clientWidth) {
|
|
62
|
+
window.clientX = e.clientX;
|
|
63
|
+
$addList.style.transform = `translateX(${window.initListTranslateX + (window.clientX - window.initX)}px)`;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const onDragEnd = () => {
|
|
67
|
+
if ($container.classList.contains('gs-additional-isdragging')) {
|
|
68
|
+
$container.classList.remove('gs-additional-isdragging');
|
|
69
|
+
clampTranslate();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
$container.addEventListener('mouseleave', onDragEnd);
|
|
73
|
+
$container.addEventListener('mouseup', onDragEnd);
|
|
74
|
+
$container.addEventListener('touchend', onDragEnd);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export default initAdditionals;
|
|
78
|
+
//# sourceMappingURL=initAdditionals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initAdditionals.js","sourceRoot":"","sources":["../../actions/initAdditionals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAQ,EAAE;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC;IAEjC,IAAI,MAAM,CAAC,eAAe,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,MAAM,UAAU,GAAG,GAAG,CAAC,UAAW,CAAC;QACnC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAExD,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,EAAE,uBAAuB,EAAE,gBAAgB,CAAC,CAAC;QAC9F,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACzD,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACtC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,iBAAiB,CAAC;QAE7C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