js-cloudimage-360-view 3.0.3 → 3.1.0

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.
Files changed (93) hide show
  1. package/.env +3 -0
  2. package/CHANGELOG.md +167 -156
  3. package/LICENSE +27 -33
  4. package/README.md +820 -806
  5. package/bin/deploy-bundle.js +63 -0
  6. package/dist/ci360.service.js +65 -245
  7. package/dist/ci360.utils.js +2 -14
  8. package/dist/constants/index.js +0 -4
  9. package/dist/constants/props-require-reload.js +24 -12
  10. package/dist/index.js +0 -27
  11. package/dist/static/css/hotspots.css +221 -221
  12. package/dist/static/css/style.css +229 -229
  13. package/dist/utils/auto-play/get-speed-factor.js +0 -2
  14. package/dist/utils/auto-play/is-completed-one-cycle.js +0 -5
  15. package/dist/utils/auto-play/loop.js +3 -14
  16. package/dist/utils/class-names/add-class.js +0 -3
  17. package/dist/utils/class-names/remove-class.js +0 -2
  18. package/dist/utils/container-elements/apply-styles-to-container.js +0 -2
  19. package/dist/utils/container-elements/create-360-view-circle-icon.js +0 -2
  20. package/dist/utils/container-elements/create-360-view-icon.js +0 -2
  21. package/dist/utils/container-elements/create-box-shadow.js +0 -2
  22. package/dist/utils/container-elements/create-canvas.js +0 -2
  23. package/dist/utils/container-elements/create-close-fullscreen-icon.js +0 -2
  24. package/dist/utils/container-elements/create-fullscreen-icon.js +0 -2
  25. package/dist/utils/container-elements/create-fullscreen-modal.js +0 -2
  26. package/dist/utils/container-elements/create-icons-container.js +0 -2
  27. package/dist/utils/container-elements/create-inner-box.js +0 -2
  28. package/dist/utils/container-elements/create-loader.js +0 -2
  29. package/dist/utils/container-elements/create-magnifier-icon.js +0 -2
  30. package/dist/utils/container-elements/index.js +0 -13
  31. package/dist/utils/container-elements/remove-child-from-parent.js +0 -2
  32. package/dist/utils/controls/get-item-skipped.js +0 -2
  33. package/dist/utils/controls/init-controls.js +7 -16
  34. package/dist/utils/hotspots/attach-events/hide-popup.js +0 -2
  35. package/dist/utils/hotspots/attach-events/show-popup.js +0 -2
  36. package/dist/utils/hotspots/configs-error-handler.js +6 -10
  37. package/dist/utils/hotspots/create-popper-instace.js +1 -4
  38. package/dist/utils/hotspots/elements/create-carousel-dot.js +0 -6
  39. package/dist/utils/hotspots/elements/create-carousel-image.js +0 -4
  40. package/dist/utils/hotspots/elements/create-hotspot-icon.js +3 -14
  41. package/dist/utils/hotspots/elements/create-hotspot-popup-link.js +2 -6
  42. package/dist/utils/hotspots/elements/create-hotspots.js +0 -5
  43. package/dist/utils/hotspots/elements/create-images-carousel.js +0 -4
  44. package/dist/utils/hotspots/elements/create-modal-description.js +0 -2
  45. package/dist/utils/hotspots/elements/create-modal-title.js +0 -2
  46. package/dist/utils/hotspots/elements/create-model-elements.js +8 -25
  47. package/dist/utils/hotspots/elements/create-popup-arrow.js +0 -2
  48. package/dist/utils/hotspots/elements/create-popup.js +6 -18
  49. package/dist/utils/hotspots/elements/create-read-more-btn.js +0 -2
  50. package/dist/utils/hotspots/fill-empty-coord-with-previous.js +1 -6
  51. package/dist/utils/hotspots/generate-hotspots-configs.js +11 -21
  52. package/dist/utils/hotspots/generate-popup-config.js +9 -11
  53. package/dist/utils/hotspots/get-hotspot-icon.js +0 -2
  54. package/dist/utils/hotspots/get-hotspot-orientation.js +0 -4
  55. package/dist/utils/hotspots/get-hotspot-popup-node.js +0 -2
  56. package/dist/utils/hotspots/get-popup-node.js +0 -2
  57. package/dist/utils/hotspots/hide-hotspot-icon.js +0 -2
  58. package/dist/utils/hotspots/hide-hotspots-icons.js +0 -3
  59. package/dist/utils/hotspots/is-mouse-on-hotspot.js +0 -2
  60. package/dist/utils/hotspots/prepare-hotspots-positions.js +0 -6
  61. package/dist/utils/hotspots/set-current-slide.js +0 -2
  62. package/dist/utils/hotspots/toggle-popup-events.js +0 -4
  63. package/dist/utils/hotspots/update-hotspot-icon-position.js +0 -2
  64. package/dist/utils/hotspots/update-hotspots.js +6 -14
  65. package/dist/utils/image-src/generate-images-path.js +8 -17
  66. package/dist/utils/image-src/is-props-change-require-reload.js +0 -5
  67. package/dist/utils/index.js +0 -26
  68. package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +2 -11
  69. package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +0 -8
  70. package/dist/utils/load-images/lazyload/init-lazyload.js +3 -11
  71. package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-folder.js +1 -5
  72. package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-list.js +0 -9
  73. package/dist/utils/load-images/load-image-as-promise.js +8 -46
  74. package/dist/utils/load-images/load-images-relative-to-container-size.js +10 -49
  75. package/dist/utils/load-images/load-original-images.js +23 -37
  76. package/dist/utils/load-images/pad.js +0 -2
  77. package/dist/utils/load-images/preload-images.js +2 -9
  78. package/dist/utils/load-images/preload-original-images.js +2 -9
  79. package/dist/utils/magnify/get-current-original-image.js +0 -6
  80. package/dist/utils/magnify/get-cursor-position.js +0 -2
  81. package/dist/utils/magnify/magnify.js +4 -11
  82. package/dist/utils/magnify/move-magnifier.js +6 -14
  83. package/dist/utils/responsive/contain.js +0 -2
  84. package/dist/utils/responsive/fit.js +0 -4
  85. package/dist/utils/responsive/get-image-aspect-ratio.js +0 -8
  86. package/dist/utils/responsive/get-responsive-width-of-container.js +0 -3
  87. package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +0 -2
  88. package/dist/utils/responsive/get-size-limit.js +0 -2
  89. package/dist/utils/spin-y/get-moving-direction.js +0 -3
  90. package/dist/utils/zoom/generate-zoom-in-steps.js +0 -2
  91. package/dist/utils/zoom/generate-zoom-out-steps.js +0 -2
  92. package/package.json +67 -62
  93. package/yarn-error.log +101 -0
@@ -1,230 +1,230 @@
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;
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
230
  }
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getSpeedFactor = void 0;
7
-
8
7
  var getSpeedFactor = function getSpeedFactor(dragSpeed, amount, containerOffset) {
9
8
  var containerOffsetWidth = Math.max(containerOffset, 600);
10
9
  var speedFactor = dragSpeed / 150 * (36 / amount) * 25 * (containerOffsetWidth / 1500) || 1;
11
10
  return Math.floor(speedFactor);
12
11
  };
13
-
14
12
  exports.getSpeedFactor = getSpeedFactor;
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isCompletedOneCycle = void 0;
7
-
8
7
  var _autoPlayBehavior = require("../../constants/auto-play-behavior");
9
-
10
8
  var isCompletedOneCycle = function isCompletedOneCycle(autoplayBehavior, activeImageX, activeImageY, amountX, amountY, isReversed) {
11
9
  switch (autoplayBehavior) {
12
10
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_XY:
@@ -16,17 +14,14 @@ var isCompletedOneCycle = function isCompletedOneCycle(autoplayBehavior, activeI
16
14
  if (isReachedTheEdge) return true;
17
15
  return false;
18
16
  }
19
-
20
17
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_X:
21
18
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_YX:
22
19
  default:
23
20
  {
24
21
  var _isReachedTheEdge = isReversed ? activeImageX === 1 : activeImageX === amountX;
25
-
26
22
  if (_isReachedTheEdge) return true;
27
23
  return false;
28
24
  }
29
25
  }
30
26
  };
31
-
32
27
  exports.isCompletedOneCycle = isCompletedOneCycle;
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.loop = void 0;
7
-
8
7
  var _autoPlayBehavior = require("../../constants/auto-play-behavior");
9
-
10
8
  var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
11
9
  var bottom = loopTriggers.bottom,
12
- top = loopTriggers.top,
13
- left = loopTriggers.left,
14
- right = loopTriggers.right;
15
-
10
+ top = loopTriggers.top,
11
+ left = loopTriggers.left,
12
+ right = loopTriggers.right;
16
13
  switch (autoplayBehavior) {
17
14
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_Y:
18
15
  if (reversed) {
@@ -20,9 +17,7 @@ var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
20
17
  } else {
21
18
  top();
22
19
  }
23
-
24
20
  break;
25
-
26
21
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_XY:
27
22
  if (spinY) {
28
23
  if (reversed) {
@@ -35,9 +30,7 @@ var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
35
30
  } else {
36
31
  right();
37
32
  }
38
-
39
33
  break;
40
-
41
34
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_YX:
42
35
  if (spinY) {
43
36
  if (reversed) {
@@ -50,9 +43,7 @@ var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
50
43
  } else {
51
44
  right();
52
45
  }
53
-
54
46
  break;
55
-
56
47
  case _autoPlayBehavior.AUTOPLAY_BEHAVIOR.SPIN_X:
57
48
  default:
58
49
  if (reversed) {
@@ -60,8 +51,6 @@ var loop = function loop(autoplayBehavior, spinY, reversed, loopTriggers) {
60
51
  } else {
61
52
  right();
62
53
  }
63
-
64
54
  }
65
55
  };
66
-
67
56
  exports.loop = loop;
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.addClass = void 0;
7
-
8
7
  var addClass = function addClass(el, className) {
9
8
  var element = el || {};
10
-
11
9
  if (element.classList) {
12
10
  element.classList.add(className);
13
11
  } else {
14
12
  element.className += " ".concat(className);
15
13
  }
16
14
  };
17
-
18
15
  exports.addClass = addClass;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.removeClass = void 0;
7
-
8
7
  var removeClass = function removeClass(el, className) {
9
8
  if (el.classList) {
10
9
  el.classList.remove(className);
@@ -12,5 +11,4 @@ var removeClass = function removeClass(el, className) {
12
11
  el.className = el.className.replace(new RegExp("(^|\\b)".concat(className.split(' ').join('|'), "(\\b|$)"), 'gi'), ' ');
13
12
  }
14
13
  };
15
-
16
14
  exports.removeClass = removeClass;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.applyStylesToContainer = void 0;
7
-
8
7
  var applyStylesToContainer = function applyStylesToContainer(container) {
9
8
  container.style.position = 'relative';
10
9
  container.style.width = '100%';
@@ -12,5 +11,4 @@ var applyStylesToContainer = function applyStylesToContainer(container) {
12
11
  container.setAttribute('draggable', 'false');
13
12
  container.className = "".concat(container.className, " initialized");
14
13
  };
15
-
16
14
  exports.applyStylesToContainer = applyStylesToContainer;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.create360ViewCircleIcon = void 0;
7
-
8
7
  var create360ViewCircleIcon = function create360ViewCircleIcon(circleOffset) {
9
8
  var view360CircleIcon = new Image();
10
9
  view360CircleIcon.src = 'https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/assets/img/360.svg';
@@ -12,5 +11,4 @@ var create360ViewCircleIcon = function create360ViewCircleIcon(circleOffset) {
12
11
  view360CircleIcon.className = 'cloudimage-360-view-360-circle';
13
12
  return view360CircleIcon;
14
13
  };
15
-
16
14
  exports.create360ViewCircleIcon = create360ViewCircleIcon;
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.create360ViewIcon = void 0;
7
-
8
7
  var create360ViewIcon = function create360ViewIcon() {
9
8
  var view360Icon = document.createElement('div');
10
9
  view360Icon.className = 'cloudimage-360-view-360-icon';
11
10
  view360Icon.innerText = '0%';
12
11
  return view360Icon;
13
12
  };
14
-
15
13
  exports.create360ViewIcon = create360ViewIcon;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createBoxShadow = void 0;
7
-
8
7
  var createBoxShadow = function createBoxShadow(boxShadow, innerBox) {
9
8
  var nextBoxShadow = document.createElement('div');
10
9
  nextBoxShadow.className = 'cloudimage-360-box-shadow';
@@ -12,5 +11,4 @@ var createBoxShadow = function createBoxShadow(boxShadow, innerBox) {
12
11
  innerBox.appendChild(nextBoxShadow);
13
12
  return nextBoxShadow;
14
13
  };
15
-
16
14
  exports.createBoxShadow = createBoxShadow;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createCanvas = void 0;
7
-
8
7
  var createCanvas = function createCanvas(innerBox) {
9
8
  var canvas = document.createElement('canvas');
10
9
  canvas.style.width = '100%';
@@ -12,5 +11,4 @@ var createCanvas = function createCanvas(innerBox) {
12
11
  innerBox.appendChild(canvas);
13
12
  return canvas;
14
13
  };
15
-
16
14
  exports.createCanvas = createCanvas;
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createCloseFullscreenIcon = void 0;
7
-
8
7
  var createCloseFullscreenIcon = function createCloseFullscreenIcon() {
9
8
  var closeFullscreenIcon = document.createElement('div');
10
9
  closeFullscreenIcon.className = 'cloudimage-360-close-fullscreen-icon';
11
10
  return closeFullscreenIcon;
12
11
  };
13
-
14
12
  exports.createCloseFullscreenIcon = createCloseFullscreenIcon;
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createFullscreenIcon = void 0;
7
-
8
7
  var createFullscreenIcon = function createFullscreenIcon() {
9
8
  var fullscreenIcon = document.createElement('div');
10
9
  fullscreenIcon.className = 'cloudimage-360-fullscreen-icon';
11
10
  return fullscreenIcon;
12
11
  };
13
-
14
12
  exports.createFullscreenIcon = createFullscreenIcon;