js-cloudimage-360-view 3.2.1 → 4.0.0-beta.2
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/.prettierrc +9 -0
- package/README.md +318 -721
- package/dist/assets/index-49ZK8EAw.js +9 -0
- package/dist/assets/index-CgRAm56E.css +1 -0
- package/dist/index.html +697 -0
- package/js-cloudimage-360-view-4.0.0-beta.1.tgz +0 -0
- package/package.json +22 -12
- package/.env +0 -3
- package/CHANGELOG.md +0 -175
- package/bin/deploy-bundle.js +0 -63
- package/dist/ci360.service.js +0 -1270
- package/dist/ci360.utils.js +0 -78
- package/dist/constants/auto-play-behavior.js +0 -13
- package/dist/constants/falsy-values.js +0 -8
- package/dist/constants/index.js +0 -39
- package/dist/constants/orientations.js +0 -12
- package/dist/constants/props-require-reload.js +0 -33
- package/dist/constants/regex.js +0 -10
- package/dist/index.js +0 -102
- package/dist/static/css/hotspots.css +0 -222
- package/dist/static/css/style.css +0 -230
- package/dist/utils/auto-play/get-speed-factor.js +0 -12
- package/dist/utils/auto-play/is-completed-one-cycle.js +0 -27
- package/dist/utils/auto-play/loop.js +0 -56
- package/dist/utils/class-names/add-class.js +0 -15
- package/dist/utils/class-names/remove-class.js +0 -14
- package/dist/utils/container-elements/apply-styles-to-container.js +0 -14
- package/dist/utils/container-elements/create-360-view-circle-icon.js +0 -14
- package/dist/utils/container-elements/create-360-view-icon.js +0 -13
- package/dist/utils/container-elements/create-box-shadow.js +0 -14
- package/dist/utils/container-elements/create-canvas.js +0 -14
- package/dist/utils/container-elements/create-close-fullscreen-icon.js +0 -12
- package/dist/utils/container-elements/create-fullscreen-icon.js +0 -12
- package/dist/utils/container-elements/create-fullscreen-modal.js +0 -18
- package/dist/utils/container-elements/create-icons-container.js +0 -13
- package/dist/utils/container-elements/create-inner-box.js +0 -13
- package/dist/utils/container-elements/create-loader.js +0 -13
- package/dist/utils/container-elements/create-magnifier-icon.js +0 -12
- package/dist/utils/container-elements/index.js +0 -96
- package/dist/utils/container-elements/remove-child-from-parent.js +0 -14
- package/dist/utils/controls/get-item-skipped.js +0 -11
- package/dist/utils/controls/init-controls.js +0 -68
- package/dist/utils/hotspots/attach-events/hide-popup.js +0 -13
- package/dist/utils/hotspots/attach-events/show-popup.js +0 -12
- package/dist/utils/hotspots/configs-error-handler.js +0 -23
- package/dist/utils/hotspots/create-popper-instace.js +0 -29
- package/dist/utils/hotspots/elements/create-carousel-dot.js +0 -20
- package/dist/utils/hotspots/elements/create-carousel-image.js +0 -18
- package/dist/utils/hotspots/elements/create-hotspot-icon.js +0 -55
- package/dist/utils/hotspots/elements/create-hotspot-popup-link.js +0 -19
- package/dist/utils/hotspots/elements/create-hotspots.js +0 -20
- package/dist/utils/hotspots/elements/create-images-carousel.js +0 -23
- package/dist/utils/hotspots/elements/create-modal-description.js +0 -13
- package/dist/utils/hotspots/elements/create-modal-title.js +0 -13
- package/dist/utils/hotspots/elements/create-model-elements.js +0 -49
- package/dist/utils/hotspots/elements/create-popup-arrow.js +0 -14
- package/dist/utils/hotspots/elements/create-popup.js +0 -55
- package/dist/utils/hotspots/elements/create-read-more-btn.js +0 -15
- package/dist/utils/hotspots/fill-empty-coord-with-previous.js +0 -21
- package/dist/utils/hotspots/generate-hotspots-configs.js +0 -48
- package/dist/utils/hotspots/generate-popup-config.js +0 -27
- package/dist/utils/hotspots/get-hotspot-icon.js +0 -12
- package/dist/utils/hotspots/get-hotspot-orientation.js +0 -17
- package/dist/utils/hotspots/get-hotspot-popup-node.js +0 -12
- package/dist/utils/hotspots/get-popup-node.js +0 -12
- package/dist/utils/hotspots/hide-hotspot-icon.js +0 -11
- package/dist/utils/hotspots/hide-hotspots-icons.js +0 -15
- package/dist/utils/hotspots/is-mouse-on-hotspot.js +0 -12
- package/dist/utils/hotspots/prepare-hotspots-positions.js +0 -22
- package/dist/utils/hotspots/set-current-slide.js +0 -21
- package/dist/utils/hotspots/toggle-popup-events.js +0 -19
- package/dist/utils/hotspots/update-hotspot-icon-position.js +0 -19
- package/dist/utils/hotspots/update-hotspots.js +0 -40
- package/dist/utils/image-src/generate-images-path.js +0 -33
- package/dist/utils/image-src/is-props-change-require-reload.js +0 -18
- package/dist/utils/index.js +0 -211
- package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +0 -25
- package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +0 -21
- package/dist/utils/load-images/lazyload/init-lazyload.js +0 -41
- package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-folder.js +0 -14
- package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-list.js +0 -20
- package/dist/utils/load-images/load-image-as-promise.js +0 -16
- package/dist/utils/load-images/load-images-relative-to-container-size.js +0 -19
- package/dist/utils/load-images/load-original-images.js +0 -44
- package/dist/utils/load-images/pad.js +0 -12
- package/dist/utils/load-images/preload-images.js +0 -28
- package/dist/utils/load-images/preload-original-images.js +0 -28
- package/dist/utils/magnify/get-current-original-image.js +0 -23
- package/dist/utils/magnify/get-cursor-position.js +0 -22
- package/dist/utils/magnify/magnify.js +0 -47
- package/dist/utils/magnify/move-magnifier.js +0 -39
- package/dist/utils/responsive/contain.js +0 -9
- package/dist/utils/responsive/fit.js +0 -29
- package/dist/utils/responsive/get-image-aspect-ratio.js +0 -31
- package/dist/utils/responsive/get-responsive-width-of-container.js +0 -11
- package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +0 -15
- package/dist/utils/responsive/get-size-limit.js +0 -12
- package/dist/utils/spin-y/get-moving-direction.js +0 -18
- package/dist/utils/zoom/generate-zoom-in-steps.js +0 -18
- package/dist/utils/zoom/generate-zoom-out-steps.js +0 -18
- package/yarn-error.log +0 -101
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
.cloudimage-360-icons-container {
|
|
2
|
-
position: absolute;
|
|
3
|
-
display: flex;
|
|
4
|
-
top: 5px;
|
|
5
|
-
right: 5px;
|
|
6
|
-
width: 30px;
|
|
7
|
-
height: 95%;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
align-items: center;
|
|
10
|
-
z-index: 101;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.cloudimage-360-magnifier-icon {
|
|
14
|
-
width: 25px;
|
|
15
|
-
height: 25px;
|
|
16
|
-
margin-bottom: 5px;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
background: url('https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/loupe.svg') 50% 50% / cover no-repeat;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.cloudimage-360-fullscreen-icon {
|
|
22
|
-
width: 25px;
|
|
23
|
-
height: 25px;
|
|
24
|
-
margin-bottom: 5px;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
background: url('https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/full_screen.svg') 50% 50% / cover no-repeat;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.cloudimage-360-reset-zoom-icon {
|
|
30
|
-
display: none;
|
|
31
|
-
width: 30px;
|
|
32
|
-
height: 30px;
|
|
33
|
-
margin-top: auto;
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
background: url('https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/ic-resize.svg?vh=248986') 50% 50% / cover no-repeat;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.cloudimage-360-close-fullscreen-icon {
|
|
39
|
-
width: 25px;
|
|
40
|
-
height: 25px;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
background: url('https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/cross.svg') 50% 50% / cover no-repeat;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cloudimage-360-loader {
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 0;
|
|
48
|
-
left: 0;
|
|
49
|
-
right: 0;
|
|
50
|
-
width: 0%;
|
|
51
|
-
height: 8px;
|
|
52
|
-
background-color: rgb(165, 175, 184);
|
|
53
|
-
z-index: 100;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.cloudimage-360-box-shadow {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 0;
|
|
59
|
-
left: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
z-index: 99;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.cloudimage-360-view-360-icon {
|
|
66
|
-
position: absolute;
|
|
67
|
-
top: 0;
|
|
68
|
-
bottom: 0;
|
|
69
|
-
left: 0;
|
|
70
|
-
right: 0;
|
|
71
|
-
width: 100px;
|
|
72
|
-
height: 100px;
|
|
73
|
-
margin: auto;
|
|
74
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
75
|
-
border-radius: 50%;
|
|
76
|
-
box-shadow: rgba(255, 255, 255, 0.5) 0px 0px 4px;
|
|
77
|
-
transition: 0.5s all;
|
|
78
|
-
color: rgb(80, 80, 80);
|
|
79
|
-
text-align: center;
|
|
80
|
-
line-height: 100px;
|
|
81
|
-
z-index: 2;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.cloudimage-360-view-360-circle {
|
|
85
|
-
position: absolute;
|
|
86
|
-
left: 0;
|
|
87
|
-
right: 0;
|
|
88
|
-
width: 80%;
|
|
89
|
-
height: auto;
|
|
90
|
-
margin: auto;
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
user-select: none;
|
|
93
|
-
transition: 0.5s all;
|
|
94
|
-
z-index: 2;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.cloudimage-360-fullscreen-modal {
|
|
98
|
-
position: fixed;
|
|
99
|
-
top: 0;
|
|
100
|
-
bottom: 0;
|
|
101
|
-
left: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
width: 100%;
|
|
104
|
-
height: 100%;
|
|
105
|
-
z-index: 999;
|
|
106
|
-
background-color: #FFF;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.cloudimage-360-img-magnifier-glass {
|
|
110
|
-
background-color: #FFF;
|
|
111
|
-
background-repeat: no-repeat;
|
|
112
|
-
position: absolute;
|
|
113
|
-
border: 3px solid #000;
|
|
114
|
-
border-radius: 50%;
|
|
115
|
-
cursor: wait;
|
|
116
|
-
line-height: 200px;
|
|
117
|
-
text-align: center;
|
|
118
|
-
z-index: 1000;
|
|
119
|
-
width: 250px;
|
|
120
|
-
height: 250px;
|
|
121
|
-
top: -75px;
|
|
122
|
-
right: -85px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.cloudimage-360 .cloudimage-360-left,
|
|
126
|
-
.cloudimage-360 .cloudimage-360-right {
|
|
127
|
-
padding: 8px;
|
|
128
|
-
background: rgb(244, 244, 244);
|
|
129
|
-
border: none;
|
|
130
|
-
border-radius: 4px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.cloudimage-360 .cloudimage-360-left:focus,
|
|
134
|
-
.cloudimage-360 .cloudimage-360-right:focus {
|
|
135
|
-
outline: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.cloudimage-360 .cloudimage-360-left {
|
|
139
|
-
display: none;
|
|
140
|
-
position: absolute;
|
|
141
|
-
z-index: 100;
|
|
142
|
-
top: calc(50% - 15px);
|
|
143
|
-
left: 20px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.cloudimage-360 .cloudimage-360-right {
|
|
147
|
-
display: none;
|
|
148
|
-
position: absolute;
|
|
149
|
-
z-index: 100;
|
|
150
|
-
top: calc(50% - 15px);
|
|
151
|
-
right: 20px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.cloudimage-360 .cloudimage-360-left:before,
|
|
155
|
-
.cloudimage-360 .cloudimage-360-right:before {
|
|
156
|
-
content: '';
|
|
157
|
-
display: block;
|
|
158
|
-
width: 30px;
|
|
159
|
-
height: 30px;
|
|
160
|
-
background: 50% 50% / cover no-repeat;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.cloudimage-360 .cloudimage-360-left:before {
|
|
164
|
-
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-left.svg');
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.cloudimage-360 .cloudimage-360-right:before {
|
|
168
|
-
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-right.svg');
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.cloudimage-360 .cloudimage-360-left.not-active,
|
|
172
|
-
.cloudimage-360 .cloudimage-360-right.not-active {
|
|
173
|
-
opacity: 0.4;
|
|
174
|
-
cursor: default;
|
|
175
|
-
pointer-events: none;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.cloudimage-360 .cloudimage-360-top,
|
|
179
|
-
.cloudimage-360 .cloudimage-360-bottom {
|
|
180
|
-
padding: 8px;
|
|
181
|
-
background: rgb(244, 244, 244);
|
|
182
|
-
border: none;
|
|
183
|
-
border-radius: 4px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.cloudimage-360 .cloudimage-360-top:focus,
|
|
187
|
-
.cloudimage-360 .cloudimage-360-bottom:focus {
|
|
188
|
-
outline: none;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.cloudimage-360 .cloudimage-360-top {
|
|
192
|
-
display: none;
|
|
193
|
-
position: absolute;
|
|
194
|
-
z-index: 100;
|
|
195
|
-
left: calc(50% - 15px);
|
|
196
|
-
top: 20px;
|
|
197
|
-
transform: rotate(90deg);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.cloudimage-360 .cloudimage-360-bottom {
|
|
201
|
-
display: none;
|
|
202
|
-
position: absolute;
|
|
203
|
-
z-index: 100;
|
|
204
|
-
left: calc(50% - 15px);
|
|
205
|
-
bottom: 20px;
|
|
206
|
-
transform: rotate(90deg);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.cloudimage-360 .cloudimage-360-top:before,
|
|
210
|
-
.cloudimage-360 .cloudimage-360-bottom:before {
|
|
211
|
-
content: '';
|
|
212
|
-
display: block;
|
|
213
|
-
width: 30px;
|
|
214
|
-
height: 30px;
|
|
215
|
-
background: 50% 50% / cover no-repeat;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.cloudimage-360 .cloudimage-360-top:before {
|
|
219
|
-
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-left.svg');
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.cloudimage-360 .cloudimage-360-bottom:before {
|
|
223
|
-
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-right.svg');
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.cloudimage-360 .cloudimage-360-top.not-active,
|
|
227
|
-
.cloudimage-360 .cloudimage-360-bottom.not-active {
|
|
228
|
-
opacity: 0.4;
|
|
229
|
-
cursor: default;
|
|
230
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getSpeedFactor = void 0;
|
|
7
|
-
var getSpeedFactor = function getSpeedFactor(dragSpeed, amount, containerOffset) {
|
|
8
|
-
var containerOffsetWidth = Math.max(containerOffset, 600);
|
|
9
|
-
var speedFactor = dragSpeed / 150 * (36 / amount) * 25 * (containerOffsetWidth / 1500) || 1;
|
|
10
|
-
return Math.floor(speedFactor);
|
|
11
|
-
};
|
|
12
|
-
exports.getSpeedFactor = getSpeedFactor;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isCompletedOneCycle = void 0;
|
|
7
|
-
var _autoPlayBehavior = require("../../constants/auto-play-behavior");
|
|
8
|
-
var isCompletedOneCycle = function isCompletedOneCycle(autoplayBehavior, activeImageX, activeImageY, amountX, amountY, isReversed) {
|
|
9
|
-
switch (autoplayBehavior) {
|
|
10
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_XY:
|
|
11
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_Y:
|
|
12
|
-
{
|
|
13
|
-
var isReachedTheEdge = isReversed ? activeImageY === 1 : activeImageY === amountY;
|
|
14
|
-
if (isReachedTheEdge) return true;
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_X:
|
|
18
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_YX:
|
|
19
|
-
default:
|
|
20
|
-
{
|
|
21
|
-
var _isReachedTheEdge = isReversed ? activeImageX === 1 : activeImageX === amountX;
|
|
22
|
-
if (_isReachedTheEdge) return true;
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.isCompletedOneCycle = isCompletedOneCycle;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.loop = void 0;
|
|
7
|
-
var _autoPlayBehavior = require("../../constants/auto-play-behavior");
|
|
8
|
-
var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
|
|
9
|
-
var bottom = loopTriggers.bottom,
|
|
10
|
-
top = loopTriggers.top,
|
|
11
|
-
left = loopTriggers.left,
|
|
12
|
-
right = loopTriggers.right;
|
|
13
|
-
switch (autoplayBehavior) {
|
|
14
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_Y:
|
|
15
|
-
if (reversed) {
|
|
16
|
-
bottom();
|
|
17
|
-
} else {
|
|
18
|
-
top();
|
|
19
|
-
}
|
|
20
|
-
break;
|
|
21
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_XY:
|
|
22
|
-
if (spinY) {
|
|
23
|
-
if (reversed) {
|
|
24
|
-
bottom();
|
|
25
|
-
} else {
|
|
26
|
-
top();
|
|
27
|
-
}
|
|
28
|
-
} else if (reversed) {
|
|
29
|
-
left();
|
|
30
|
-
} else {
|
|
31
|
-
right();
|
|
32
|
-
}
|
|
33
|
-
break;
|
|
34
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_YX:
|
|
35
|
-
if (spinY) {
|
|
36
|
-
if (reversed) {
|
|
37
|
-
bottom();
|
|
38
|
-
} else {
|
|
39
|
-
top();
|
|
40
|
-
}
|
|
41
|
-
} else if (reversed) {
|
|
42
|
-
left();
|
|
43
|
-
} else {
|
|
44
|
-
right();
|
|
45
|
-
}
|
|
46
|
-
break;
|
|
47
|
-
case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_X:
|
|
48
|
-
default:
|
|
49
|
-
if (reversed) {
|
|
50
|
-
left();
|
|
51
|
-
} else {
|
|
52
|
-
right();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
exports.loop = loop;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.addClass = void 0;
|
|
7
|
-
var addClass = function addClass(el, className) {
|
|
8
|
-
var element = el || {};
|
|
9
|
-
if (element.classList) {
|
|
10
|
-
element.classList.add(className);
|
|
11
|
-
} else {
|
|
12
|
-
element.className += " ".concat(className);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
exports.addClass = addClass;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.removeClass = void 0;
|
|
7
|
-
var removeClass = function removeClass(el, className) {
|
|
8
|
-
if (el.classList) {
|
|
9
|
-
el.classList.remove(className);
|
|
10
|
-
} else {
|
|
11
|
-
el.className = el.className.replace(new RegExp("(^|\\b)".concat(className.split(' ').join('|'), "(\\b|$)"), 'gi'), ' ');
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.removeClass = removeClass;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.applyStylesToContainer = void 0;
|
|
7
|
-
var applyStylesToContainer = function applyStylesToContainer(container) {
|
|
8
|
-
container.style.position = 'relative';
|
|
9
|
-
container.style.width = '100%';
|
|
10
|
-
container.style.cursor = 'wait';
|
|
11
|
-
container.setAttribute('draggable', 'false');
|
|
12
|
-
container.className = "".concat(container.className, " initialized");
|
|
13
|
-
};
|
|
14
|
-
exports.applyStylesToContainer = applyStylesToContainer;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.create360ViewCircleIcon = void 0;
|
|
7
|
-
var create360ViewCircleIcon = function create360ViewCircleIcon(circleOffset) {
|
|
8
|
-
var view360CircleIcon = new Image();
|
|
9
|
-
view360CircleIcon.src = 'https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/assets/img/360.svg';
|
|
10
|
-
view360CircleIcon.style.bottom = "".concat(circleOffset, "%");
|
|
11
|
-
view360CircleIcon.className = 'cloudimage-360-view-360-circle';
|
|
12
|
-
return view360CircleIcon;
|
|
13
|
-
};
|
|
14
|
-
exports.create360ViewCircleIcon = create360ViewCircleIcon;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.create360ViewIcon = void 0;
|
|
7
|
-
var create360ViewIcon = function create360ViewIcon() {
|
|
8
|
-
var view360Icon = document.createElement('div');
|
|
9
|
-
view360Icon.className = 'cloudimage-360-view-360-icon';
|
|
10
|
-
view360Icon.innerText = '0%';
|
|
11
|
-
return view360Icon;
|
|
12
|
-
};
|
|
13
|
-
exports.create360ViewIcon = create360ViewIcon;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createBoxShadow = void 0;
|
|
7
|
-
var createBoxShadow = function createBoxShadow(boxShadow, innerBox) {
|
|
8
|
-
var nextBoxShadow = document.createElement('div');
|
|
9
|
-
nextBoxShadow.className = 'cloudimage-360-box-shadow';
|
|
10
|
-
nextBoxShadow.style.boxShadow = boxShadow;
|
|
11
|
-
innerBox.appendChild(nextBoxShadow);
|
|
12
|
-
return nextBoxShadow;
|
|
13
|
-
};
|
|
14
|
-
exports.createBoxShadow = createBoxShadow;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCanvas = void 0;
|
|
7
|
-
var createCanvas = function createCanvas(innerBox) {
|
|
8
|
-
var canvas = document.createElement('canvas');
|
|
9
|
-
canvas.style.width = '100%';
|
|
10
|
-
canvas.style.fontSize = '0';
|
|
11
|
-
innerBox.appendChild(canvas);
|
|
12
|
-
return canvas;
|
|
13
|
-
};
|
|
14
|
-
exports.createCanvas = createCanvas;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCloseFullscreenIcon = void 0;
|
|
7
|
-
var createCloseFullscreenIcon = function createCloseFullscreenIcon() {
|
|
8
|
-
var closeFullscreenIcon = document.createElement('div');
|
|
9
|
-
closeFullscreenIcon.className = 'cloudimage-360-close-fullscreen-icon';
|
|
10
|
-
return closeFullscreenIcon;
|
|
11
|
-
};
|
|
12
|
-
exports.createCloseFullscreenIcon = createCloseFullscreenIcon;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createFullscreenIcon = void 0;
|
|
7
|
-
var createFullscreenIcon = function createFullscreenIcon() {
|
|
8
|
-
var fullscreenIcon = document.createElement('div');
|
|
9
|
-
fullscreenIcon.className = 'cloudimage-360-fullscreen-icon';
|
|
10
|
-
return fullscreenIcon;
|
|
11
|
-
};
|
|
12
|
-
exports.createFullscreenIcon = createFullscreenIcon;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createFullscreenModal = void 0;
|
|
7
|
-
var createFullscreenModal = function createFullscreenModal(container) {
|
|
8
|
-
var fullscreenModal = document.createElement('div');
|
|
9
|
-
fullscreenModal.className = 'cloudimage-360-fullscreen-modal';
|
|
10
|
-
var fullscreenContainer = container.cloneNode();
|
|
11
|
-
fullscreenContainer.style.height = '100%';
|
|
12
|
-
fullscreenContainer.style.maxHeight = '100%';
|
|
13
|
-
fullscreenModal.appendChild(fullscreenContainer);
|
|
14
|
-
window.document.body.style.overflow = 'hidden';
|
|
15
|
-
window.document.body.appendChild(fullscreenModal);
|
|
16
|
-
return fullscreenContainer;
|
|
17
|
-
};
|
|
18
|
-
exports.createFullscreenModal = createFullscreenModal;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createIconsContainer = void 0;
|
|
7
|
-
var createIconsContainer = function createIconsContainer(innerBox) {
|
|
8
|
-
var iconsContainer = document.createElement('div');
|
|
9
|
-
iconsContainer.className = 'cloudimage-360-icons-container';
|
|
10
|
-
innerBox.appendChild(iconsContainer);
|
|
11
|
-
return iconsContainer;
|
|
12
|
-
};
|
|
13
|
-
exports.createIconsContainer = createIconsContainer;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createInnerBox = void 0;
|
|
7
|
-
var createInnerBox = function createInnerBox(container) {
|
|
8
|
-
var innerBox = document.createElement('div');
|
|
9
|
-
innerBox.className = 'cloudimage-360-inner-box';
|
|
10
|
-
container.appendChild(innerBox);
|
|
11
|
-
return innerBox;
|
|
12
|
-
};
|
|
13
|
-
exports.createInnerBox = createInnerBox;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createLoader = void 0;
|
|
7
|
-
var createLoader = function createLoader(innerBox) {
|
|
8
|
-
var loader = document.createElement('div');
|
|
9
|
-
loader.className = 'cloudimage-360-loader';
|
|
10
|
-
innerBox.appendChild(loader);
|
|
11
|
-
return loader;
|
|
12
|
-
};
|
|
13
|
-
exports.createLoader = createLoader;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createMagnifierIcon = void 0;
|
|
7
|
-
var createMagnifierIcon = function createMagnifierIcon() {
|
|
8
|
-
var magnifyIcon = document.createElement('div');
|
|
9
|
-
magnifyIcon.className = 'cloudimage-360-magnifier-icon';
|
|
10
|
-
return magnifyIcon;
|
|
11
|
-
};
|
|
12
|
-
exports.createMagnifierIcon = createMagnifierIcon;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "applyStylesToContainer", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _applyStylesToContainer.applyStylesToContainer;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "create360ViewCircleIcon", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _create360ViewCircleIcon.create360ViewCircleIcon;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "create360ViewIcon", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _create360ViewIcon.create360ViewIcon;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "createBoxShadow", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _createBoxShadow.createBoxShadow;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "createCanvas", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _createCanvas.createCanvas;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "createCloseFullscreenIcon", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _createCloseFullscreenIcon.createCloseFullscreenIcon;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "createFullscreenIcon", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _createFullscreenIcon.createFullscreenIcon;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "createFullscreenModal", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _createFullscreenModal.createFullscreenModal;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "createIconsContainer", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _createIconsContainer.createIconsContainer;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "createInnerBox", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _createInnerBox.createInnerBox;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "createLoader", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function get() {
|
|
69
|
-
return _createLoader.createLoader;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "createMagnifierIcon", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _createMagnifierIcon.createMagnifierIcon;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "removeChildFromParent", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _removeChildFromParent.removeChildFromParent;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
var _create360ViewCircleIcon = require("./create-360-view-circle-icon");
|
|
85
|
-
var _create360ViewIcon = require("./create-360-view-icon");
|
|
86
|
-
var _createCanvas = require("./create-canvas");
|
|
87
|
-
var _createCloseFullscreenIcon = require("./create-close-fullscreen-icon");
|
|
88
|
-
var _createFullscreenIcon = require("./create-fullscreen-icon");
|
|
89
|
-
var _createIconsContainer = require("./create-icons-container");
|
|
90
|
-
var _createInnerBox = require("./create-inner-box");
|
|
91
|
-
var _createMagnifierIcon = require("./create-magnifier-icon");
|
|
92
|
-
var _createBoxShadow = require("./create-box-shadow");
|
|
93
|
-
var _createLoader = require("./create-loader");
|
|
94
|
-
var _applyStylesToContainer = require("./apply-styles-to-container");
|
|
95
|
-
var _createFullscreenModal = require("./create-fullscreen-modal");
|
|
96
|
-
var _removeChildFromParent = require("./remove-child-from-parent");
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.removeChildFromParent = void 0;
|
|
7
|
-
var removeChildFromParent = function removeChildFromParent(parent, child) {
|
|
8
|
-
if (parent && child) {
|
|
9
|
-
try {
|
|
10
|
-
parent.removeChild(child);
|
|
11
|
-
} catch (_unused) {}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.removeChildFromParent = removeChildFromParent;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getItemSkipped = void 0;
|
|
7
|
-
var getItemSkipped = function getItemSkipped(currentPosition, movementStart, speedFactor) {
|
|
8
|
-
var itemsSkipped = Math.floor((currentPosition - movementStart) / speedFactor) || 1;
|
|
9
|
-
return itemsSkipped;
|
|
10
|
-
};
|
|
11
|
-
exports.getItemSkipped = getItemSkipped;
|