js-cloudimage-360-view 2.7.2-beta.6 → 2.7.4

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 (88) hide show
  1. package/CHANGELOG.md +19 -3
  2. package/LICENSE +13 -1
  3. package/README.md +112 -90
  4. package/dist/ci360.service.js +82 -81
  5. package/dist/ci360.utils.js +2 -2
  6. package/dist/constants/auto-play-behavior.js +13 -0
  7. package/dist/constants/falsy-values.js +8 -0
  8. package/dist/constants/index.js +43 -0
  9. package/dist/constants/orientations.js +12 -0
  10. package/dist/constants/regex.js +10 -0
  11. package/dist/index.js +6 -2
  12. package/dist/utils/auto-play/get-speed-factor.js +14 -0
  13. package/dist/utils/auto-play/is-completed-one-cycle.js +32 -0
  14. package/dist/utils/auto-play/loop.js +67 -0
  15. package/dist/utils/common/add-class.js +18 -0
  16. package/dist/utils/common/remove-class.js +16 -0
  17. package/dist/utils/container-elements/apply-styles-to-container.js +16 -0
  18. package/dist/utils/container-elements/create-360-view-circle-icon.js +16 -0
  19. package/dist/utils/container-elements/create-360-view-icon.js +15 -0
  20. package/dist/utils/container-elements/create-box-shadow.js +16 -0
  21. package/dist/utils/container-elements/create-canvas.js +16 -0
  22. package/dist/utils/container-elements/create-close-fullscreen-icon.js +14 -0
  23. package/dist/utils/container-elements/create-fullscreen-icon.js +14 -0
  24. package/dist/utils/container-elements/create-fullscreen-modal.js +20 -0
  25. package/dist/utils/container-elements/create-icons-container.js +15 -0
  26. package/dist/utils/container-elements/create-inner-box.js +15 -0
  27. package/dist/utils/container-elements/create-loader.js +15 -0
  28. package/dist/utils/container-elements/create-magnifier-icon.js +14 -0
  29. package/dist/utils/container-elements/index.js +101 -0
  30. package/dist/utils/controls/get-item-skipped.js +13 -0
  31. package/dist/utils/controls/init-controls.js +77 -0
  32. package/dist/utils/hotspot/attach-popup-events.js +63 -0
  33. package/dist/utils/hotspot/configs-error-handler.js +30 -0
  34. package/dist/utils/hotspot/create-popper-instace.js +32 -0
  35. package/dist/utils/hotspot/elements/create-carousel-dot.js +26 -0
  36. package/dist/utils/hotspot/elements/create-carousel-image.js +21 -0
  37. package/dist/utils/hotspot/elements/create-hotspot-icon.js +42 -0
  38. package/dist/utils/hotspot/elements/create-hotspot-popup-link.js +23 -0
  39. package/dist/utils/hotspot/elements/create-hotspots.js +20 -0
  40. package/dist/utils/hotspot/elements/create-images-carousel.js +27 -0
  41. package/dist/utils/hotspot/elements/create-modal-description.js +15 -0
  42. package/dist/utils/hotspot/elements/create-modal-title.js +15 -0
  43. package/dist/utils/hotspot/elements/create-model-elements.js +49 -0
  44. package/dist/utils/hotspot/elements/create-popup-arrow.js +16 -0
  45. package/dist/utils/hotspot/elements/create-popup.js +60 -0
  46. package/dist/utils/hotspot/fill-previous-coord-with-previous.js +26 -0
  47. package/dist/utils/hotspot/generate-hotspots-configs.js +41 -0
  48. package/dist/utils/hotspot/generate-popup-config.js +34 -0
  49. package/dist/utils/hotspot/get-hotspot-icon.js +14 -0
  50. package/dist/utils/hotspot/get-hotspot-orientation.js +21 -0
  51. package/dist/utils/hotspot/get-hotspot-popup-node.js +19 -0
  52. package/dist/utils/hotspot/get-hotspot-variant.js +20 -0
  53. package/dist/utils/hotspot/get-popup-node.js +14 -0
  54. package/dist/utils/hotspot/hide-hotspot-icon.js +13 -0
  55. package/dist/utils/hotspot/hide-hotspots-icons.js +18 -0
  56. package/dist/utils/hotspot/is-mouse-on-hotspot.js +14 -0
  57. package/dist/utils/hotspot/prepare-hotspots-positions.js +28 -0
  58. package/dist/utils/hotspot/set-current-slide.js +23 -0
  59. package/dist/utils/hotspot/update-hotspot-icon-position.js +21 -0
  60. package/dist/utils/hotspot/update-hotspots.js +60 -0
  61. package/dist/utils/image-src/generate-images-path.js +40 -0
  62. package/dist/utils/index.js +228 -0
  63. package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +36 -0
  64. package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +37 -0
  65. package/dist/utils/load-images/load-image-as-promise.js +79 -0
  66. package/dist/utils/load-images/load-image.js +26 -0
  67. package/dist/utils/load-images/load-images-relative-to-container-size.js +58 -0
  68. package/dist/utils/load-images/load-original-images.js +58 -0
  69. package/dist/utils/load-images/pad.js +14 -0
  70. package/dist/utils/load-images/preload-images.js +38 -0
  71. package/dist/utils/load-images/preload-original-images.js +38 -0
  72. package/dist/utils/magnify/get-current-original-image.js +29 -0
  73. package/dist/utils/magnify/get-cursor-position.js +24 -0
  74. package/dist/utils/magnify/magnify.js +54 -0
  75. package/dist/utils/magnify/move-magnifier.js +47 -0
  76. package/dist/utils/responsive/contain.js +11 -0
  77. package/dist/utils/responsive/fit.js +33 -0
  78. package/dist/utils/responsive/get-container-responsive-height.js +20 -0
  79. package/dist/utils/responsive/get-container-responsive-width.js +20 -0
  80. package/dist/utils/responsive/get-responsive-width-of-container.js +14 -0
  81. package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +17 -0
  82. package/dist/utils/responsive/get-size-limit.js +14 -0
  83. package/dist/utils/spin-y/get-moving-direction.js +21 -0
  84. package/dist/utils/zoom/generate-zoom-in-steps.js +20 -0
  85. package/dist/utils/zoom/generate-zoom-out-steps.js +20 -0
  86. package/package.json +3 -3
  87. package/.vscode/settings.json +0 -2
  88. package/dist/ci360.constants.js +0 -34
package/CHANGELOG.md CHANGED
@@ -25,7 +25,23 @@ Types of changes:
25
25
  - ...
26
26
 
27
27
  -------------
28
- ## 2.7.1 - 2020-11-06
28
+ ## 2.7.4 - 2022-01-26
29
+ ### Fixed
30
+ - typo in documentation file
31
+ ## 2.7.3 - 2022-01-26
32
+ ### Fixed
33
+ - typo in documentation file
34
+
35
+ ## 2.7.2 - 2022-01-26
36
+ ### Added
37
+ - possibility to fit container relative to its width or height and maintain the aspect ratio
38
+ - possibility to reverse the directions of the keys on the keyboard
39
+ ### Fixed
40
+ - pointer zoom behavior
41
+ - error while loading images from lists
42
+ - get the active image index
43
+
44
+ ## 2.7.1 - 2021-11-06
29
45
  ### Added
30
46
  - click to reset mouse zoom
31
47
  - show 360 logo after play once
@@ -35,7 +51,7 @@ Types of changes:
35
51
  ### Changed
36
52
  - pointer zoom behavior
37
53
 
38
- ## 2.7.0 - 2020-11-04
54
+ ## 2.7.0 - 2021-11-04
39
55
  ### Added
40
56
  - play once then stop auto-play
41
57
  - spin in the y-direction
@@ -51,7 +67,7 @@ Types of changes:
51
67
  - images are not resized when window size changes
52
68
 
53
69
  ### Changed
54
- - migrate CDN URL to V7
70
+ - migrate CDN URL to V7
55
71
 
56
72
  ## 2.6.0 - 2020-09-03
57
73
 
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.4-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,11 @@
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/">
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>
13
14
  </p>
14
15
 
15
16
  <h1 align="center">
@@ -47,7 +48,7 @@ powered by [Cloudimage](https://www.cloudimage.io/)
47
48
  * [Step 1: Installation](#installation)
48
49
  * [Step 2: Initialize](#initialize)
49
50
  * [Methods](#methods)
50
- * [Customize Icons](#customize-icons)
51
+ * [Customize elements](#customize-elements)
51
52
  * [Configuration](#configuration)
52
53
  * [Controls](#controls)
53
54
  * [Cloudimage responsive integration](#cloudimage-responsive-integration)
@@ -69,7 +70,7 @@ To see the Cloudimage 360 view plugin in action, please check out the
69
70
  Add script tag with CDN link to js-cloudimage-360-view lib after all content in body tag
70
71
 
71
72
  ```javascript
72
- <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.1/js-cloudimage-360-view.min.js"></script>
73
+ <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.4/js-cloudimage-360-view.min.js"></script>
73
74
  ```
74
75
 
75
76
  ## <a name="initialize"></a>Step 2: Initialize
@@ -81,8 +82,8 @@ After adding the js-cloudimage-360-view lib, simply initialize it with **class n
81
82
  <div
82
83
  class="cloudimage-360"
83
84
  data-folder="https://scaleflex.airstore.io/demo/360-car/"
84
- data-filename="iris-{index}.jpeg"
85
- data-amount="36"
85
+ data-filename-x="iris-{index}.jpeg"
86
+ data-amount-x="36"
86
87
  ></div>
87
88
  ```
88
89
 
@@ -126,25 +127,44 @@ window.CI360.destroy();
126
127
  Get the {index} of the image that is being viewed.
127
128
 
128
129
  ```javascript
129
- window.CI360.getActiveIndexByID('id_of_product');
130
+ window.CI360.getActiveIndexByID('id_of_product', oriantation = 'x');
130
131
  ```
131
- ## <a name="customize-icons"></a> Customize icons
132
+ ## <a name="customize-elements"></a> Customize elements
132
133
 
133
- You can customize the icons by adding the following classes:
134
+ You can customize elements by adding the following classes:
134
135
 
135
136
  ### Example CSS
136
137
  ```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;
138
+ .cloudimage-360-icons-container {
139
+ top: 5px;
140
+ right: 5px;
139
141
  }
140
- .cloudimage-360 .magnify-icon {
142
+ .cloudimage-360-fullscreen-modal {
143
+ top: 0;
144
+ bottom: 0;
145
+ }
146
+ .cloudimage-360-magnifier-icon {
141
147
  background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/loupe.svg) 50% 50% / cover no-repeat;
142
148
  }
143
- .cloudimage-360 .close-fullscreen-icon {
149
+ .cloudimage-360-close-fullscreen-icon {
144
150
  background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/cross.svg) 50% 50% / cover no-repeat;
145
151
  }
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;
152
+ .cloudimage-360-view-360-circle {
153
+ margin: auto;
154
+ }
155
+ .cloudimage-360-loader {
156
+ margin: auto;
157
+ }
158
+ .cloudimage-360-view-360-icon {
159
+ background: url(hhttps://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg) 50% 50% / cover no-repeat;
160
+ }
161
+ .cloudimage-360-box-shadow {
162
+ top: 0;
163
+ left: 0;
164
+ }
165
+ .cloudimage-360-img-magnifier-glass {
166
+ border: 3px solid #000;
167
+ border-radius: 50%;
148
168
  }
149
169
  ```
150
170
 
@@ -171,24 +191,27 @@ Allow to use a specific version of API.
171
191
  ```javascript
172
192
  data-api-version="v7"
173
193
  ```
174
- - disable API version
194
+ - disable API version
175
195
  ```javascript
176
196
  data-api-version="null"
177
197
  ```
178
198
  ### data-filename (or filename)
199
+ ### data-filename-x (or filename-x)
200
+ ### ~~data-filename (or filename)~~ [deprecated]
179
201
 
180
202
  ###### Type: **String** | Default: **image-{index}.jpg** | _optional_
181
203
 
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).
204
+ 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
205
 
184
206
  ### data-filename-y (or filename-y)
185
207
 
186
208
  ###### Type: **String** | Default: **image-y-{index}.jpg** | _optional_
187
209
 
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).
210
+ 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
211
 
190
- ### <a name="data-amount"></a> data-amount (or amount)
191
212
 
213
+ ### <a name="data-amount-x"></a> data-amount-x (or amount-x)
214
+ ### ~~data-amount (or amount-x)~~ [deprecated]
192
215
  ###### Type: **Number** | Default: **36** | _optional_
193
216
 
194
217
  Amount of images to load for 360 view.
@@ -205,6 +228,12 @@ Amount of images to load in Y-axis for 360 view.
205
228
 
206
229
  Support for 360 spin by pressing arrow keys on keyboard.
207
230
 
231
+ ### data-keys-reverse (or keys-reverse)
232
+
233
+ ###### Type: **Bool** | Default: **false** | _optional_
234
+
235
+ invert arrow keys on keyboard.
236
+
208
237
  ### data-autoplay (or autoplay)
209
238
 
210
239
  ###### Type: **Bool** | Default: **false** | _optional_
@@ -225,8 +254,8 @@ Changing autoplay behavior
225
254
 
226
255
  Available behaviors (spin-x, spin-y, spin-xy, spin-yx)
227
256
 
228
- ### data-full-screen (or full-screen)
229
-
257
+ ### data-fullscreen (or fullscreen)
258
+ ### ~~data-full-screen (or full-screen)~~ [deprecated]
230
259
  ###### Type: **Bool** | Default: **false** | _optional_
231
260
 
232
261
  Open 360 spin view in full screen modal.
@@ -237,17 +266,24 @@ Open 360 spin view in full screen modal.
237
266
 
238
267
  Magnifier to zoom image.
239
268
 
240
- ### data-magnifier-in-fullscreen (or magnifier-in-fullscreen)
269
+ ### ~~data-ratio (or ratio)~~ [deprecated]
241
270
 
242
- ###### Type: **bool** | Default: **false** | _optional_
243
271
 
244
- enable magnifier in fullscreen modal.
272
+ ###### ~~Type: **Number** (height / width) | Default: **none** | _optional_~~
245
273
 
246
- ### data-ratio (or ratio)
274
+ ~~Prevents page from jumping.~~
275
+ ### data-width (or width)
247
276
 
248
- ###### Type: **Number** (height / width) | Default: **none** | _optional_
277
+ ###### Type: **Number** | Default: **none** | _optional_
278
+
279
+ Set a responsive width for the container.
280
+ It will maintain the aspect ratio in respect to width
281
+ ### data-height (or height)
282
+
283
+ ###### Type: **Number** | Default: **none** | _optional_
249
284
 
250
- Prevents page from jumping.
285
+ Set a responsive height for the container.
286
+ It will maintain the aspect ratio in respect to height
251
287
 
252
288
  ### data-autoplay-reverse (or autoplay-reverse)
253
289
 
@@ -277,7 +313,7 @@ Speed Factor of changing frames on drag event.
277
313
 
278
314
  ###### Type: **Bool** | Default: **false** | _optional_
279
315
 
280
- Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount).
316
+ Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
281
317
 
282
318
  ### data-box-shadow (or box-shadow)
283
319
 
@@ -297,17 +333,18 @@ Display 360 view line at the bottom of container.
297
333
 
298
334
  Hide 360 view icon.
299
335
 
300
- ### data-logo-src (or logo-src)
336
+ ### ~~data-logo-src (or logo-src)~~ [deprecated]
301
337
 
302
- ###### Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_
338
+ ###### ~~Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_~~
303
339
 
304
- URL of asset to use as the 360 view icon.
340
+ ~~URL of asset to use as the 360 view icon.~~
305
341
 
342
+ kindly read [Customize elements](#customize-elements)
306
343
  ### data-control-reverse (or control-reverse)
307
344
 
308
345
  ###### Type: **Bool** | Default: **false** | _optional_
309
346
 
310
- Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount).
347
+ Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
311
348
 
312
349
  ### data-stop-at-edges (or stop-at-edges)
313
350
 
@@ -327,74 +364,59 @@ Bottom offset for 360 view line.
327
364
 
328
365
  Left zero padding on filename. For example: index-zero-base="4" => image index will be "0004"
329
366
 
330
- ### data-image-list (or image-list)
367
+ ### data-image-list-x (or data-image-list-x)
368
+ ### ~~data-image-list (or image-list)~~ [deprecated]
331
369
 
332
370
  ###### Type: **Array** | _optional_
333
371
 
334
- Option to add list of images instead of `folder` & `filename`.
372
+ Option to add list of images in x-oriantation instead of `folder` , `filename-x` & `amount-x`.
335
373
 
336
374
  example:
337
375
 
338
376
  ```javascript
339
377
  data-folder="https://scaleflex.airstore.io/demo/360-car/"
340
- data-image-list='[
378
+ data-image-list-x='[
341
379
  "iris-1.jpeg",
342
380
  "iris-4.jpeg",
343
381
  "https://scaleflex.airstore.io/demo/360-car/iris-12.jpeg",
344
382
  "https://scaleflex.airstore.io/demo/360-car/iris-15.jpeg"
345
383
  ]’
346
384
  ```
385
+ ### data-image-list-y (or data-image-list-y)
347
386
 
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
387
+ ###### Type: **Array** | _optional_
377
388
 
378
- Available functions (resetZoom)
389
+ Option to add list of images in y-oriantation instead of `folder` , `filename-y` & `amount-y`.
379
390
 
380
- Multiple functions can be applied, separated by "," (comma)
391
+ example:
381
392
 
382
- ### data-pointer-zoom-factor (or pointer-zoom-factor)
393
+ ```javascript
394
+ data-folder="https://scaleflex.airstore.io/demo/360-car/"
395
+ data-image-list-y='[
396
+ "iris-2-y.jpeg",
397
+ "iris-6-y.jpeg",
398
+ "https://scaleflex.airstore.io/demo/360-car/iris-8-y.jpeg",
399
+ "https://scaleflex.airstore.io/demo/360-car/iris-30-y.jpeg"
400
+ ]’
401
+ ```
402
+ ### data-pointer-zoom (or pointer-zoom)
383
403
 
384
- ###### Type: **Number** | Default: **2** | _optional_
404
+ ###### Type: **Number** | Default: **none** | _optional_
385
405
 
386
- Pointer zoom scaling factor
387
- ### data-pinch-zoom-factor (or pinch-zoom-factor)
406
+ Pointer zoom scale
388
407
 
389
- ###### Type: **Number** | Default: **2** | _optional_
408
+ example:
390
409
 
391
- Pinch zoom scaling factor
410
+ ```javascript
411
+ data-pointer-zoom="3"
412
+ ```
413
+ when mouse clicked the image scale will be multiplied by 3.
392
414
 
393
- ### data-max-scale (or max-scale)
415
+ ### data-lazyload (or lazyload)
394
416
 
395
- ###### Type: **Number** | Default: **none** | _optional_
417
+ ###### Type: **Bool** | Default: **false** | _optional_
396
418
 
397
- Maximum scale that images can be resize to it with pointer or pinch zoom
419
+ 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
420
  ### data-lazyload-selector (or lazyload-selector)
399
421
 
400
422
  ###### Type: **String** | Default: **lazyload** | _optional_
@@ -404,47 +426,47 @@ Helper class to apply lazy-loading depending on library you choose, see [Lazy lo
404
426
 
405
427
  ## <a name="controls"></a> Controls
406
428
 
407
- You can add controls by adding elements with the following classes: **cloudimage-360-prev**, **cloudimage-360-next**, **cloudimage-360-top**, **cloudimage-360-bottom**
429
+ 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
430
 
409
431
  ### Example CSS
410
432
  ```css
411
- .cloudimage-360 .cloudimage-360-prev, .cloudimage-360 .cloudimage-360-next {
433
+ .cloudimage-360 .cloudimage-360-left, .cloudimage-360 .cloudimage-360-right {
412
434
  padding: 8px;
413
435
  background: rgba(255, 255, 255, 0.5);
414
436
  border: none;
415
437
  border-radius: 4px;
416
438
  }
417
- .cloudimage-360 .cloudimage-360-prev:focus, .cloudimage-360 .cloudimage-360-next:focus {
439
+ .cloudimage-360 .cloudimage-360-left:focus, .cloudimage-360 .cloudimage-360-right:focus {
418
440
  outline: none;
419
441
  }
420
- .cloudimage-360 .cloudimage-360-prev {
442
+ .cloudimage-360 .cloudimage-360-left {
421
443
  display: none;
422
444
  position: absolute;
423
445
  z-index: 100;
424
446
  top: calc(50% - 15px);
425
447
  left: 20px;
426
448
  }
427
- .cloudimage-360 .cloudimage-360-next {
449
+ .cloudimage-360 .cloudimage-360-right {
428
450
  display: none;
429
451
  position: absolute;
430
452
  z-index: 100;
431
453
  top: calc(50% - 15px);
432
454
  right: 20px;
433
455
  }
434
- .cloudimage-360 .cloudimage-360-prev:before, .cloudimage-360 .cloudimage-360-next:before {
456
+ .cloudimage-360 .cloudimage-360-left:before, .cloudimage-360 .cloudimage-360-right:before {
435
457
  content: '';
436
458
  display: block;
437
459
  width: 30px;
438
460
  height: 30px;
439
461
  background: 50% 50% / cover no-repeat;
440
462
  }
441
- .cloudimage-360 .cloudimage-360-prev:before {
463
+ .cloudimage-360 .cloudimage-360-left:before {
442
464
  background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-left.svg');
443
465
  }
444
- .cloudimage-360 .cloudimage-360-next:before {
466
+ .cloudimage-360 .cloudimage-360-right:before {
445
467
  background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-right.svg');
446
468
  }
447
- .cloudimage-360 .cloudimage-360-prev.not-active, .cloudimage-360 .cloudimage-360-next.not-active {
469
+ .cloudimage-360 .cloudimage-360-left.not-active, .cloudimage-360 .cloudimage-360-right.not-active {
448
470
  opacity: 0.4;
449
471
  cursor: default;
450
472
  }
@@ -454,10 +476,10 @@ You can add controls by adding elements with the following classes: **cloudimage
454
476
  <div
455
477
  class="cloudimage-360"
456
478
  data-folder="https://scaleflex.airstore.io/demo/indoor/"
457
- data-filename="{index}.jpeg"
479
+ data-filename-x="{index}.jpeg"
458
480
  >
459
- <button class="cloudimage-360-prev"></button>
460
- <button class="cloudimage-360-next"></button>
481
+ <button class="cloudimage-360-left"></button>
482
+ <button class="cloudimage-360-right"></button>
461
483
  <button class="cloudimage-360-top"></button>
462
484
  <button class="cloudimage-360-bottom"></button>
463
485
  </div>