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