js-cloudimage-360-view 2.7.2-beta.7 → 2.7.5

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 (90) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/LICENSE +13 -1
  3. package/README.md +154 -90
  4. package/dist/ci360.service.js +123 -88
  5. package/dist/ci360.utils.js +3 -4
  6. package/dist/constants/auto-play-behavior.js +13 -0
  7. package/dist/constants/falsy-values.js +8 -0
  8. package/dist/constants/image-src-props.js +8 -0
  9. package/dist/constants/index.js +43 -0
  10. package/dist/constants/orientations.js +12 -0
  11. package/dist/constants/regex.js +10 -0
  12. package/dist/index.js +28 -2
  13. package/dist/utils/auto-play/get-speed-factor.js +14 -0
  14. package/dist/utils/auto-play/is-completed-one-cycle.js +32 -0
  15. package/dist/utils/auto-play/loop.js +67 -0
  16. package/dist/utils/common/add-class.js +18 -0
  17. package/dist/utils/common/remove-class.js +16 -0
  18. package/dist/utils/container-elements/apply-styles-to-container.js +16 -0
  19. package/dist/utils/container-elements/create-360-view-circle-icon.js +16 -0
  20. package/dist/utils/container-elements/create-360-view-icon.js +15 -0
  21. package/dist/utils/container-elements/create-box-shadow.js +16 -0
  22. package/dist/utils/container-elements/create-canvas.js +16 -0
  23. package/dist/utils/container-elements/create-close-fullscreen-icon.js +14 -0
  24. package/dist/utils/container-elements/create-fullscreen-icon.js +14 -0
  25. package/dist/utils/container-elements/create-fullscreen-modal.js +20 -0
  26. package/dist/utils/container-elements/create-icons-container.js +15 -0
  27. package/dist/utils/container-elements/create-inner-box.js +15 -0
  28. package/dist/utils/container-elements/create-loader.js +15 -0
  29. package/dist/utils/container-elements/create-magnifier-icon.js +14 -0
  30. package/dist/utils/container-elements/index.js +101 -0
  31. package/dist/utils/controls/get-item-skipped.js +13 -0
  32. package/dist/utils/controls/init-controls.js +77 -0
  33. package/dist/utils/hotspot/attach-popup-events.js +63 -0
  34. package/dist/utils/hotspot/configs-error-handler.js +30 -0
  35. package/dist/utils/hotspot/create-popper-instace.js +32 -0
  36. package/dist/utils/hotspot/elements/create-carousel-dot.js +26 -0
  37. package/dist/utils/hotspot/elements/create-carousel-image.js +21 -0
  38. package/dist/utils/hotspot/elements/create-hotspot-icon.js +42 -0
  39. package/dist/utils/hotspot/elements/create-hotspot-popup-link.js +23 -0
  40. package/dist/utils/hotspot/elements/create-hotspots.js +20 -0
  41. package/dist/utils/hotspot/elements/create-images-carousel.js +27 -0
  42. package/dist/utils/hotspot/elements/create-modal-description.js +15 -0
  43. package/dist/utils/hotspot/elements/create-modal-title.js +15 -0
  44. package/dist/utils/hotspot/elements/create-model-elements.js +49 -0
  45. package/dist/utils/hotspot/elements/create-popup-arrow.js +16 -0
  46. package/dist/utils/hotspot/elements/create-popup.js +60 -0
  47. package/dist/utils/hotspot/fill-previous-coord-with-previous.js +26 -0
  48. package/dist/utils/hotspot/generate-hotspots-configs.js +41 -0
  49. package/dist/utils/hotspot/generate-popup-config.js +34 -0
  50. package/dist/utils/hotspot/get-hotspot-icon.js +14 -0
  51. package/dist/utils/hotspot/get-hotspot-orientation.js +21 -0
  52. package/dist/utils/hotspot/get-hotspot-popup-node.js +19 -0
  53. package/dist/utils/hotspot/get-hotspot-variant.js +20 -0
  54. package/dist/utils/hotspot/get-popup-node.js +14 -0
  55. package/dist/utils/hotspot/hide-hotspot-icon.js +13 -0
  56. package/dist/utils/hotspot/hide-hotspots-icons.js +18 -0
  57. package/dist/utils/hotspot/is-mouse-on-hotspot.js +14 -0
  58. package/dist/utils/hotspot/prepare-hotspots-positions.js +28 -0
  59. package/dist/utils/hotspot/set-current-slide.js +23 -0
  60. package/dist/utils/hotspot/update-hotspot-icon-position.js +21 -0
  61. package/dist/utils/hotspot/update-hotspots.js +60 -0
  62. package/dist/utils/image-src/generate-images-path.js +40 -0
  63. package/dist/utils/image-src/is-src-props-changed.js +23 -0
  64. package/dist/utils/index.js +237 -0
  65. package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +36 -0
  66. package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +37 -0
  67. package/dist/utils/load-images/load-image-as-promise.js +79 -0
  68. package/dist/utils/load-images/load-image.js +26 -0
  69. package/dist/utils/load-images/load-images-relative-to-container-size.js +58 -0
  70. package/dist/utils/load-images/load-original-images.js +58 -0
  71. package/dist/utils/load-images/pad.js +14 -0
  72. package/dist/utils/load-images/preload-images.js +38 -0
  73. package/dist/utils/load-images/preload-original-images.js +38 -0
  74. package/dist/utils/magnify/get-current-original-image.js +29 -0
  75. package/dist/utils/magnify/get-cursor-position.js +24 -0
  76. package/dist/utils/magnify/magnify.js +54 -0
  77. package/dist/utils/magnify/move-magnifier.js +47 -0
  78. package/dist/utils/responsive/contain.js +11 -0
  79. package/dist/utils/responsive/fit.js +33 -0
  80. package/dist/utils/responsive/get-container-responsive-height.js +20 -0
  81. package/dist/utils/responsive/get-container-responsive-width.js +20 -0
  82. package/dist/utils/responsive/get-responsive-width-of-container.js +14 -0
  83. package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +17 -0
  84. package/dist/utils/responsive/get-size-limit.js +14 -0
  85. package/dist/utils/spin-y/get-moving-direction.js +21 -0
  86. package/dist/utils/zoom/generate-zoom-in-steps.js +20 -0
  87. package/dist/utils/zoom/generate-zoom-out-steps.js +20 -0
  88. package/package.json +4 -3
  89. package/.vscode/settings.json +0 -2
  90. package/dist/ci360.constants.js +0 -34
package/CHANGELOG.md CHANGED
@@ -25,7 +25,31 @@ Types of changes:
25
25
  - ...
26
26
 
27
27
  -------------
28
- ## 2.7.1 - 2020-11-06
28
+ ## 2.7.5 - 2022-01-08
29
+ ### Added
30
+ - update method to re-render or re-init the plugin
31
+ ### Fixed
32
+ - drag speed on mobile
33
+ - error when drag speed is too high
34
+ - error in dependencies
35
+
36
+ ## 2.7.4 - 2022-01-26
37
+ ### Fixed
38
+ - typo in documentation file
39
+ ## 2.7.3 - 2022-01-26
40
+ ### Fixed
41
+ - typo in documentation file
42
+
43
+ ## 2.7.2 - 2022-01-26
44
+ ### Added
45
+ - possibility to fit container relative to its width or height and maintain the aspect ratio
46
+ - possibility to reverse the directions of the keys on the keyboard
47
+ ### Fixed
48
+ - pointer zoom behavior
49
+ - error while loading images from lists
50
+ - get the active image index
51
+
52
+ ## 2.7.1 - 2021-11-06
29
53
  ### Added
30
54
  - click to reset mouse zoom
31
55
  - show 360 logo after play once
@@ -35,7 +59,7 @@ Types of changes:
35
59
  ### Changed
36
60
  - pointer zoom behavior
37
61
 
38
- ## 2.7.0 - 2020-11-04
62
+ ## 2.7.0 - 2021-11-04
39
63
  ### Added
40
64
  - play once then stop auto-play
41
65
  - spin in the y-direction
@@ -51,7 +75,7 @@ Types of changes:
51
75
  - images are not resized when window size changes
52
76
 
53
77
  ### Changed
54
- - migrate CDN URL to V7
78
+ - migrate CDN URL to V7
55
79
 
56
80
  ## 2.6.0 - 2020-09-03
57
81
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 scaleflex
3
+ Copyright (c) 2022 SCALEFLEX SAS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,15 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
23
+ ---------------------------------------------------------------------------------
24
+
25
+ Publicity
26
+
27
+ You agree that Scaleflex may reference and use Your name, logos and trademarks in Scaleflex
28
+ marketing and promotional materials, including, but not limited to the Scaleflex Websites, solely for
29
+ purposes of identifying You as a customer of Scaleflex. Otherwise, neither party may use the trade
30
+ names, trademarks, service marks, or logos of the other party without the express written consent of
31
+ the other party.
32
+
33
+
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Release](https://img.shields.io/badge/release-v2.7.1-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases)
1
+ [![Release](https://img.shields.io/badge/release-v2.7.5-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases)
2
2
  [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
3
3
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Scaleflex team](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg)](https://www.scaleflex.it/en/home)
@@ -6,10 +6,16 @@
6
6
  [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Engage%20your%20customers%20with%20a%20stunning%20360%20viewvof%20your%20products&url=https://scaleflex.github.io/js-cloudimage-360-view/&via=cloudimage&hashtags=images,cloudimage)
7
7
 
8
8
  <p align="center">
9
- <img
10
- height="175"
11
- alt="The Lounge"
12
- src="https://assets.scaleflex.com/Marketing/Logos/Cloudimage+Logos/Logotype+with+Scaleflex/LOGO+WITH+SCALEFLEX-01.png?vh=f6080d&force_format=jpg">
9
+ <a href="https://www.cloudimage.io/#gh-light-mode-only">
10
+ <img
11
+ alt="The Lounge"
12
+ src="https://scaleflex.cloudimg.io/v7/cloudimage.io/LOGO+WITH+SCALEFLEX-01.png?vh=f6080d&w=350">
13
+ </a>
14
+ <a href="https://www.cloudimage.io/#gh-dark-mode-only">
15
+ <img
16
+ alt="The Lounge"
17
+ src="https://scaleflex.cloudimg.io/v7/cloudimage.io/cloudimage-logo-light.png?vh=b798ab&w=350">
18
+ </a>
13
19
  </p>
14
20
 
15
21
  <h1 align="center">
@@ -47,7 +53,7 @@ powered by [Cloudimage](https://www.cloudimage.io/)
47
53
  * [Step 1: Installation](#installation)
48
54
  * [Step 2: Initialize](#initialize)
49
55
  * [Methods](#methods)
50
- * [Customize Icons](#customize-icons)
56
+ * [Customize elements](#customize-elements)
51
57
  * [Configuration](#configuration)
52
58
  * [Controls](#controls)
53
59
  * [Cloudimage responsive integration](#cloudimage-responsive-integration)
@@ -69,7 +75,7 @@ To see the Cloudimage 360 view plugin in action, please check out the
69
75
  Add script tag with CDN link to js-cloudimage-360-view lib after all content in body tag
70
76
 
71
77
  ```javascript
72
- <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.1/js-cloudimage-360-view.min.js"></script>
78
+ <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.5/js-cloudimage-360-view.min.js"></script>
73
79
  ```
74
80
 
75
81
  ## <a name="initialize"></a>Step 2: Initialize
@@ -81,8 +87,8 @@ After adding the js-cloudimage-360-view lib, simply initialize it with **class n
81
87
  <div
82
88
  class="cloudimage-360"
83
89
  data-folder="https://scaleflex.airstore.io/demo/360-car/"
84
- data-filename="iris-{index}.jpeg"
85
- data-amount="36"
90
+ data-filename-x="iris-{index}.jpeg"
91
+ data-amount-x="36"
86
92
  ></div>
87
93
  ```
88
94
 
@@ -106,6 +112,36 @@ window.CI360.init();
106
112
  > <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2/js-cloudimage-360-view.min.js"></script>
107
113
  > <script>window.CI360.init(); // initialize the plugin when you need</script>
108
114
  > ```
115
+ ### update
116
+
117
+ ###### Type: **Function**
118
+ ```javascript
119
+ window.CI360.update(idOfInstance, forceUpdate);
120
+ ```
121
+ Update cloudimage 360 viewer instance.<br/>
122
+ For any update in source attributes after plugin initialization (e.g. `data-folder`, `data-filename-x`, `data-amount-y`),
123
+ the plugin will re-init.
124
+ ### Properties
125
+ #### `idOfInstance`: string
126
+ The id of the instance
127
+
128
+ ```html
129
+ <div
130
+ id="cloudimage-360-car"
131
+ class="cloudimage-360"
132
+ data-folder="https://scaleflex.airstore.io/demo/360-car/"
133
+ data-filename-x="iris-{index}.jpeg"
134
+ data-amount-x="36"
135
+ ></div>
136
+ ```
137
+ ```javascript
138
+ window.CI360.update('cloudimage-360-car');
139
+ ```
140
+ #### `forceUpdate`: bool
141
+ Force the plugin to re-init.
142
+ ```javascript
143
+ window.CI360.update(null, true);
144
+ ```
109
145
 
110
146
  ### destroy
111
147
 
@@ -126,25 +162,51 @@ window.CI360.destroy();
126
162
  Get the {index} of the image that is being viewed.
127
163
 
128
164
  ```javascript
129
- window.CI360.getActiveIndexByID('id_of_product');
165
+ window.CI360.getActiveIndexByID(idOfInstance: string, oriantation: string);
130
166
  ```
131
- ## <a name="customize-icons"></a> Customize icons
167
+ ### Properties
168
+ #### `idOfInstance`: string
169
+ The id of the instance
132
170
 
133
- You can customize the icons by adding the following classes:
171
+ #### `oriantation`: string
172
+ The oriantation of the active index
173
+
174
+ ## <a name="customize-elements"></a> Customize elements
175
+
176
+ You can customize elements by adding the following classes:
134
177
 
135
178
  ### Example CSS
136
179
  ```css
137
- .cloudimage-360 .fullscreen-icon {
138
- background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/full_screen.svg) 50% 50% / cover no-repeat;
180
+ .cloudimage-360-icons-container {
181
+ top: 5px;
182
+ right: 5px;
139
183
  }
140
- .cloudimage-360 .magnify-icon {
184
+ .cloudimage-360-fullscreen-modal {
185
+ top: 0;
186
+ bottom: 0;
187
+ }
188
+ .cloudimage-360-magnifier-icon {
141
189
  background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/loupe.svg) 50% 50% / cover no-repeat;
142
190
  }
143
- .cloudimage-360 .close-fullscreen-icon {
191
+ .cloudimage-360-close-fullscreen-icon {
144
192
  background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/cross.svg) 50% 50% / cover no-repeat;
145
193
  }
146
- .cloudimage-360 .reset-zoom-icon {
147
- background: url(https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/ic-resize.svg?vh=248986) 50% 50% / cover no-repeat;
194
+ .cloudimage-360-view-360-circle {
195
+ margin: auto;
196
+ }
197
+ .cloudimage-360-loader {
198
+ margin: auto;
199
+ }
200
+ .cloudimage-360-view-360-icon {
201
+ background: url(hhttps://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg) 50% 50% / cover no-repeat;
202
+ }
203
+ .cloudimage-360-box-shadow {
204
+ top: 0;
205
+ left: 0;
206
+ }
207
+ .cloudimage-360-img-magnifier-glass {
208
+ border: 3px solid #000;
209
+ border-radius: 50%;
148
210
  }
149
211
  ```
150
212
 
@@ -171,24 +233,27 @@ Allow to use a specific version of API.
171
233
  ```javascript
172
234
  data-api-version="v7"
173
235
  ```
174
- - disable API version
236
+ - disable API version
175
237
  ```javascript
176
238
  data-api-version="null"
177
239
  ```
178
240
  ### data-filename (or filename)
241
+ ### data-filename-x (or filename-x)
242
+ ### ~~data-filename (or filename)~~ [deprecated]
179
243
 
180
244
  ###### Type: **String** | Default: **image-{index}.jpg** | _optional_
181
245
 
182
- The filename pattern for your 360 image. Must include {index}, which the library will replace with a number between 1 and [data-amount](#data-amount).
246
+ The filename pattern for your 360 image. Must include {index}, which the library will replace with a number between 1 and [data-amount-x](#data-amount-x).
183
247
 
184
248
  ### data-filename-y (or filename-y)
185
249
 
186
250
  ###### Type: **String** | Default: **image-y-{index}.jpg** | _optional_
187
251
 
188
- The filename pattern for Y-axis images. Must include {index}, which the library will replace with a number between 1 and [data-amount-y](#data-amount-y).
252
+ The filename pattern for y-oriantation images. Must include {index}, which the library will replace with a number between 1 and [data-amount-y](#data-amount-y).
189
253
 
190
- ### <a name="data-amount"></a> data-amount (or amount)
191
254
 
255
+ ### <a name="data-amount-x"></a> data-amount-x (or amount-x)
256
+ ### ~~data-amount (or amount-x)~~ [deprecated]
192
257
  ###### Type: **Number** | Default: **36** | _optional_
193
258
 
194
259
  Amount of images to load for 360 view.
@@ -205,6 +270,12 @@ Amount of images to load in Y-axis for 360 view.
205
270
 
206
271
  Support for 360 spin by pressing arrow keys on keyboard.
207
272
 
273
+ ### data-keys-reverse (or keys-reverse)
274
+
275
+ ###### Type: **Bool** | Default: **false** | _optional_
276
+
277
+ invert arrow keys on keyboard.
278
+
208
279
  ### data-autoplay (or autoplay)
209
280
 
210
281
  ###### Type: **Bool** | Default: **false** | _optional_
@@ -225,8 +296,8 @@ Changing autoplay behavior
225
296
 
226
297
  Available behaviors (spin-x, spin-y, spin-xy, spin-yx)
227
298
 
228
- ### data-full-screen (or full-screen)
229
-
299
+ ### data-fullscreen (or fullscreen)
300
+ ### ~~data-full-screen (or full-screen)~~ [deprecated]
230
301
  ###### Type: **Bool** | Default: **false** | _optional_
231
302
 
232
303
  Open 360 spin view in full screen modal.
@@ -237,17 +308,24 @@ Open 360 spin view in full screen modal.
237
308
 
238
309
  Magnifier to zoom image.
239
310
 
240
- ### data-magnifier-in-fullscreen (or magnifier-in-fullscreen)
311
+ ### ~~data-ratio (or ratio)~~ [deprecated]
241
312
 
242
- ###### Type: **bool** | Default: **false** | _optional_
243
313
 
244
- enable magnifier in fullscreen modal.
314
+ ###### ~~Type: **Number** (height / width) | Default: **none** | _optional_~~
315
+
316
+ ~~Prevents page from jumping.~~
317
+ ### data-width (or width)
318
+
319
+ ###### Type: **Number** | Default: **none** | _optional_
245
320
 
246
- ### data-ratio (or ratio)
321
+ Set a responsive width for the container.
322
+ It will maintain the aspect ratio in respect to width
323
+ ### data-height (or height)
247
324
 
248
- ###### Type: **Number** (height / width) | Default: **none** | _optional_
325
+ ###### Type: **Number** | Default: **none** | _optional_
249
326
 
250
- Prevents page from jumping.
327
+ Set a responsive height for the container.
328
+ It will maintain the aspect ratio in respect to height
251
329
 
252
330
  ### data-autoplay-reverse (or autoplay-reverse)
253
331
 
@@ -277,7 +355,7 @@ Speed Factor of changing frames on drag event.
277
355
 
278
356
  ###### Type: **Bool** | Default: **false** | _optional_
279
357
 
280
- Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount).
358
+ Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
281
359
 
282
360
  ### data-box-shadow (or box-shadow)
283
361
 
@@ -297,17 +375,18 @@ Display 360 view line at the bottom of container.
297
375
 
298
376
  Hide 360 view icon.
299
377
 
300
- ### data-logo-src (or logo-src)
378
+ ### ~~data-logo-src (or logo-src)~~ [deprecated]
301
379
 
302
- ###### Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_
380
+ ###### ~~Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_~~
303
381
 
304
- URL of asset to use as the 360 view icon.
382
+ ~~URL of asset to use as the 360 view icon.~~
305
383
 
384
+ kindly read [Customize elements](#customize-elements)
306
385
  ### data-control-reverse (or control-reverse)
307
386
 
308
387
  ###### Type: **Bool** | Default: **false** | _optional_
309
388
 
310
- Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount).
389
+ Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
311
390
 
312
391
  ### data-stop-at-edges (or stop-at-edges)
313
392
 
@@ -327,74 +406,59 @@ Bottom offset for 360 view line.
327
406
 
328
407
  Left zero padding on filename. For example: index-zero-base="4" => image index will be "0004"
329
408
 
330
- ### data-image-list (or image-list)
409
+ ### data-image-list-x (or data-image-list-x)
410
+ ### ~~data-image-list (or image-list)~~ [deprecated]
331
411
 
332
412
  ###### Type: **Array** | _optional_
333
413
 
334
- Option to add list of images instead of `folder` & `filename`.
414
+ Option to add list of images in x-oriantation instead of `folder` , `filename-x` & `amount-x`.
335
415
 
336
416
  example:
337
417
 
338
418
  ```javascript
339
419
  data-folder="https://scaleflex.airstore.io/demo/360-car/"
340
- data-image-list='[
420
+ data-image-list-x='[
341
421
  "iris-1.jpeg",
342
422
  "iris-4.jpeg",
343
423
  "https://scaleflex.airstore.io/demo/360-car/iris-12.jpeg",
344
424
  "https://scaleflex.airstore.io/demo/360-car/iris-15.jpeg"
345
425
  ]’
346
426
  ```
427
+ ### data-image-list-y (or data-image-list-y)
347
428
 
348
- ### data-lazyload (or lazyload)
349
-
350
- ###### Type: **Bool** | Default: **false** | _optional_
351
-
352
- Only 360 view images close to the client's viewport will be loaded, hence accelerating the page loading time. If set to true, an additional script must be included, see [Lazy loading](#lazy-loading)
353
- ### data-disable-pointer-zoom (or disable-pointer-zoom)
354
-
355
- ###### Type: **bool** | Default: **false** | _optional_
356
-
357
- Disable pointer zoom on desktop
358
-
359
- ### data-disable-pinch-zoom (or disable-pinch-zoom)
360
-
361
- ###### Type: **bool** | Default: **false** | _optional_
362
-
363
- Disable pinch zoom on mobile
364
- ### data-to-start-pointer-zoom (or to-start-pointer-zoom)
365
-
366
- ###### Type: **string** | Default: **click** | _optional_
367
-
368
- Events to start pointer zoom
369
-
370
- Available events (scroll, click)
371
-
372
- ### data-on-mouse-leave (or on-mouse-leave)
373
-
374
- ###### Type: **string** | Default: **none** | _optional_
375
-
376
- Functions called after mouse leave the container
429
+ ###### Type: **Array** | _optional_
377
430
 
378
- Available functions (resetZoom)
431
+ Option to add list of images in y-oriantation instead of `folder` , `filename-y` & `amount-y`.
379
432
 
380
- Multiple functions can be applied, separated by "," (comma)
433
+ example:
381
434
 
382
- ### data-pointer-zoom-factor (or pointer-zoom-factor)
435
+ ```javascript
436
+ data-folder="https://scaleflex.airstore.io/demo/360-car/"
437
+ data-image-list-y='[
438
+ "iris-2-y.jpeg",
439
+ "iris-6-y.jpeg",
440
+ "https://scaleflex.airstore.io/demo/360-car/iris-8-y.jpeg",
441
+ "https://scaleflex.airstore.io/demo/360-car/iris-30-y.jpeg"
442
+ ]’
443
+ ```
444
+ ### data-pointer-zoom (or pointer-zoom)
383
445
 
384
- ###### Type: **Number** | Default: **2** | _optional_
446
+ ###### Type: **Number** | Default: **none** | _optional_
385
447
 
386
- Pointer zoom scaling factor
387
- ### data-pinch-zoom-factor (or pinch-zoom-factor)
448
+ Pointer zoom scale
388
449
 
389
- ###### Type: **Number** | Default: **2** | _optional_
450
+ example:
390
451
 
391
- Pinch zoom scaling factor
452
+ ```javascript
453
+ data-pointer-zoom="3"
454
+ ```
455
+ when mouse clicked the image scale will be multiplied by 3.
392
456
 
393
- ### data-max-scale (or max-scale)
457
+ ### data-lazyload (or lazyload)
394
458
 
395
- ###### Type: **Number** | Default: **none** | _optional_
459
+ ###### Type: **Bool** | Default: **false** | _optional_
396
460
 
397
- Maximum scale that images can be resize to it with pointer or pinch zoom
461
+ Only 360 view images close to the client's viewport will be loaded, hence accelerating the page loading time. If set to true, an additional script must be included, see [Lazy loading](#lazy-loading)
398
462
  ### data-lazyload-selector (or lazyload-selector)
399
463
 
400
464
  ###### Type: **String** | Default: **lazyload** | _optional_
@@ -404,47 +468,47 @@ Helper class to apply lazy-loading depending on library you choose, see [Lazy lo
404
468
 
405
469
  ## <a name="controls"></a> Controls
406
470
 
407
- You can add controls by adding elements with the following classes: **cloudimage-360-prev**, **cloudimage-360-next**, **cloudimage-360-top**, **cloudimage-360-bottom**
471
+ You can add controls by adding elements with the following classes: **cloudimage-360-left**, **cloudimage-360-right**, **cloudimage-360-top**, **cloudimage-360-bottom , ~~**cloudimage-360-prev**, **cloudimage-360-next**~~ [deprecated]
408
472
 
409
473
  ### Example CSS
410
474
  ```css
411
- .cloudimage-360 .cloudimage-360-prev, .cloudimage-360 .cloudimage-360-next {
475
+ .cloudimage-360 .cloudimage-360-left, .cloudimage-360 .cloudimage-360-right {
412
476
  padding: 8px;
413
477
  background: rgba(255, 255, 255, 0.5);
414
478
  border: none;
415
479
  border-radius: 4px;
416
480
  }
417
- .cloudimage-360 .cloudimage-360-prev:focus, .cloudimage-360 .cloudimage-360-next:focus {
481
+ .cloudimage-360 .cloudimage-360-left:focus, .cloudimage-360 .cloudimage-360-right:focus {
418
482
  outline: none;
419
483
  }
420
- .cloudimage-360 .cloudimage-360-prev {
484
+ .cloudimage-360 .cloudimage-360-left {
421
485
  display: none;
422
486
  position: absolute;
423
487
  z-index: 100;
424
488
  top: calc(50% - 15px);
425
489
  left: 20px;
426
490
  }
427
- .cloudimage-360 .cloudimage-360-next {
491
+ .cloudimage-360 .cloudimage-360-right {
428
492
  display: none;
429
493
  position: absolute;
430
494
  z-index: 100;
431
495
  top: calc(50% - 15px);
432
496
  right: 20px;
433
497
  }
434
- .cloudimage-360 .cloudimage-360-prev:before, .cloudimage-360 .cloudimage-360-next:before {
498
+ .cloudimage-360 .cloudimage-360-left:before, .cloudimage-360 .cloudimage-360-right:before {
435
499
  content: '';
436
500
  display: block;
437
501
  width: 30px;
438
502
  height: 30px;
439
503
  background: 50% 50% / cover no-repeat;
440
504
  }
441
- .cloudimage-360 .cloudimage-360-prev:before {
505
+ .cloudimage-360 .cloudimage-360-left:before {
442
506
  background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-left.svg');
443
507
  }
444
- .cloudimage-360 .cloudimage-360-next:before {
508
+ .cloudimage-360 .cloudimage-360-right:before {
445
509
  background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-right.svg');
446
510
  }
447
- .cloudimage-360 .cloudimage-360-prev.not-active, .cloudimage-360 .cloudimage-360-next.not-active {
511
+ .cloudimage-360 .cloudimage-360-left.not-active, .cloudimage-360 .cloudimage-360-right.not-active {
448
512
  opacity: 0.4;
449
513
  cursor: default;
450
514
  }
@@ -454,10 +518,10 @@ You can add controls by adding elements with the following classes: **cloudimage
454
518
  <div
455
519
  class="cloudimage-360"
456
520
  data-folder="https://scaleflex.airstore.io/demo/indoor/"
457
- data-filename="{index}.jpeg"
521
+ data-filename-x="{index}.jpeg"
458
522
  >
459
- <button class="cloudimage-360-prev"></button>
460
- <button class="cloudimage-360-next"></button>
523
+ <button class="cloudimage-360-left"></button>
524
+ <button class="cloudimage-360-right"></button>
461
525
  <button class="cloudimage-360-top"></button>
462
526
  <button class="cloudimage-360-bottom"></button>
463
527
  </div>