js-cloudimage-360-view 2.7.2-beta.8 → 2.7.6
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 +32 -3
- package/LICENSE +13 -1
- package/README.md +169 -88
- package/dist/ci360.service.js +132 -121
- package/dist/ci360.utils.js +4 -6
- package/dist/constants/auto-play-behavior.js +13 -0
- package/dist/constants/falsy-values.js +8 -0
- package/dist/constants/image-src-props.js +8 -0
- package/dist/constants/index.js +43 -0
- package/dist/constants/orientations.js +12 -0
- package/dist/constants/regex.js +10 -0
- package/dist/index.js +28 -2
- 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/common/add-class.js +18 -0
- package/dist/utils/common/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 +101 -0
- package/dist/utils/controls/get-item-skipped.js +13 -0
- package/dist/utils/controls/init-controls.js +77 -0
- package/dist/utils/hotspot/attach-popup-events.js +63 -0
- package/dist/utils/hotspot/configs-error-handler.js +30 -0
- package/dist/utils/hotspot/create-popper-instace.js +32 -0
- package/dist/utils/hotspot/elements/create-carousel-dot.js +26 -0
- package/dist/utils/hotspot/elements/create-carousel-image.js +21 -0
- package/dist/utils/hotspot/elements/create-hotspot-icon.js +42 -0
- package/dist/utils/hotspot/elements/create-hotspot-popup-link.js +23 -0
- package/dist/utils/hotspot/elements/create-hotspots.js +20 -0
- package/dist/utils/hotspot/elements/create-images-carousel.js +27 -0
- package/dist/utils/hotspot/elements/create-modal-description.js +15 -0
- package/dist/utils/hotspot/elements/create-modal-title.js +15 -0
- package/dist/utils/hotspot/elements/create-model-elements.js +49 -0
- package/dist/utils/hotspot/elements/create-popup-arrow.js +16 -0
- package/dist/utils/hotspot/elements/create-popup.js +60 -0
- package/dist/utils/hotspot/fill-previous-coord-with-previous.js +26 -0
- package/dist/utils/hotspot/generate-hotspots-configs.js +41 -0
- package/dist/utils/hotspot/generate-popup-config.js +34 -0
- package/dist/utils/hotspot/get-hotspot-icon.js +14 -0
- package/dist/utils/hotspot/get-hotspot-orientation.js +21 -0
- package/dist/utils/hotspot/get-hotspot-popup-node.js +19 -0
- package/dist/utils/hotspot/get-hotspot-variant.js +20 -0
- package/dist/utils/hotspot/get-popup-node.js +14 -0
- package/dist/utils/hotspot/hide-hotspot-icon.js +13 -0
- package/dist/utils/hotspot/hide-hotspots-icons.js +18 -0
- package/dist/utils/hotspot/is-mouse-on-hotspot.js +14 -0
- package/dist/utils/hotspot/prepare-hotspots-positions.js +28 -0
- package/dist/utils/hotspot/set-current-slide.js +23 -0
- package/dist/utils/hotspot/update-hotspot-icon-position.js +21 -0
- package/dist/utils/hotspot/update-hotspots.js +60 -0
- package/dist/utils/image-src/generate-images-path.js +40 -0
- package/dist/utils/image-src/is-src-props-changed.js +23 -0
- package/dist/utils/index.js +228 -0
- package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +36 -0
- package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +37 -0
- package/dist/utils/load-images/load-image-as-promise.js +79 -0
- package/dist/utils/load-images/load-image.js +26 -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 +38 -0
- package/dist/utils/load-images/preload-original-images.js +38 -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 +4 -3
- package/.vscode/settings.json +0 -2
- package/dist/ci360.constants.js +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -25,7 +25,36 @@ Types of changes:
|
|
|
25
25
|
- ...
|
|
26
26
|
|
|
27
27
|
-------------
|
|
28
|
-
## 2.7.
|
|
28
|
+
## 2.7.6 - 2022-02-20
|
|
29
|
+
### Fixed
|
|
30
|
+
- drag speed
|
|
31
|
+
- responsive canvas width and height
|
|
32
|
+
|
|
33
|
+
## 2.7.5 - 2022-02-08
|
|
34
|
+
### Added
|
|
35
|
+
- update method to re-render or re-init the plugin
|
|
36
|
+
### Fixed
|
|
37
|
+
- drag speed on mobile
|
|
38
|
+
- error when drag speed is too high
|
|
39
|
+
- error in dependencies
|
|
40
|
+
|
|
41
|
+
## 2.7.4 - 2022-01-26
|
|
42
|
+
### Fixed
|
|
43
|
+
- typo in documentation file
|
|
44
|
+
## 2.7.3 - 2022-01-26
|
|
45
|
+
### Fixed
|
|
46
|
+
- typo in documentation file
|
|
47
|
+
|
|
48
|
+
## 2.7.2 - 2022-01-26
|
|
49
|
+
### Added
|
|
50
|
+
- possibility to fit container relative to its width or height and maintain the aspect ratio
|
|
51
|
+
- possibility to reverse the directions of the keys on the keyboard
|
|
52
|
+
### Fixed
|
|
53
|
+
- pointer zoom behavior
|
|
54
|
+
- error while loading images from lists
|
|
55
|
+
- get the active image index
|
|
56
|
+
|
|
57
|
+
## 2.7.1 - 2021-11-06
|
|
29
58
|
### Added
|
|
30
59
|
- click to reset mouse zoom
|
|
31
60
|
- show 360 logo after play once
|
|
@@ -35,7 +64,7 @@ Types of changes:
|
|
|
35
64
|
### Changed
|
|
36
65
|
- pointer zoom behavior
|
|
37
66
|
|
|
38
|
-
## 2.7.0 -
|
|
67
|
+
## 2.7.0 - 2021-11-04
|
|
39
68
|
### Added
|
|
40
69
|
- play once then stop auto-play
|
|
41
70
|
- spin in the y-direction
|
|
@@ -51,7 +80,7 @@ Types of changes:
|
|
|
51
80
|
- images are not resized when window size changes
|
|
52
81
|
|
|
53
82
|
### Changed
|
|
54
|
-
- migrate CDN URL to V7
|
|
83
|
+
- migrate CDN URL to V7
|
|
55
84
|
|
|
56
85
|
## 2.6.0 - 2020-09-03
|
|
57
86
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
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
|
-
[](https://github.com/scaleflex/js-cloudimage-360-view/releases)
|
|
2
2
|
[](#contributing)
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://www.scaleflex.it/en/home)
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
9
|
<img
|
|
10
|
-
height="175"
|
|
11
10
|
alt="The Lounge"
|
|
12
|
-
src="https://
|
|
11
|
+
src="https://scaleflex.cloudimg.io/v7/cloudimage.io/LOGO+WITH+SCALEFLEX-01.png?vh=f6080d&w=350">
|
|
13
12
|
</p>
|
|
14
13
|
|
|
15
14
|
<h1 align="center">
|
|
@@ -47,7 +46,7 @@ powered by [Cloudimage](https://www.cloudimage.io/)
|
|
|
47
46
|
* [Step 1: Installation](#installation)
|
|
48
47
|
* [Step 2: Initialize](#initialize)
|
|
49
48
|
* [Methods](#methods)
|
|
50
|
-
* [Customize
|
|
49
|
+
* [Customize elements](#customize-elements)
|
|
51
50
|
* [Configuration](#configuration)
|
|
52
51
|
* [Controls](#controls)
|
|
53
52
|
* [Cloudimage responsive integration](#cloudimage-responsive-integration)
|
|
@@ -69,7 +68,7 @@ To see the Cloudimage 360 view plugin in action, please check out the
|
|
|
69
68
|
Add script tag with CDN link to js-cloudimage-360-view lib after all content in body tag
|
|
70
69
|
|
|
71
70
|
```javascript
|
|
72
|
-
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.
|
|
71
|
+
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2.7.5/js-cloudimage-360-view.min.js"></script>
|
|
73
72
|
```
|
|
74
73
|
|
|
75
74
|
## <a name="initialize"></a>Step 2: Initialize
|
|
@@ -81,8 +80,8 @@ After adding the js-cloudimage-360-view lib, simply initialize it with **class n
|
|
|
81
80
|
<div
|
|
82
81
|
class="cloudimage-360"
|
|
83
82
|
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
84
|
-
data-filename="iris-{index}.jpeg"
|
|
85
|
-
data-amount="36"
|
|
83
|
+
data-filename-x="iris-{index}.jpeg"
|
|
84
|
+
data-amount-x="36"
|
|
86
85
|
></div>
|
|
87
86
|
```
|
|
88
87
|
|
|
@@ -106,6 +105,36 @@ window.CI360.init();
|
|
|
106
105
|
> <script src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/2/js-cloudimage-360-view.min.js"></script>
|
|
107
106
|
> <script>window.CI360.init(); // initialize the plugin when you need</script>
|
|
108
107
|
> ```
|
|
108
|
+
### update
|
|
109
|
+
|
|
110
|
+
###### Type: **Function**
|
|
111
|
+
```javascript
|
|
112
|
+
window.CI360.update(idOfInstance, forceUpdate);
|
|
113
|
+
```
|
|
114
|
+
Update cloudimage 360 viewer instance.<br/>
|
|
115
|
+
For any update in source attributes after plugin initialization (e.g. `data-folder`, `data-filename-x`, `data-amount-y`),
|
|
116
|
+
the plugin will re-init.
|
|
117
|
+
### Properties
|
|
118
|
+
#### `idOfInstance`: string
|
|
119
|
+
The id of the instance
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<div
|
|
123
|
+
id="cloudimage-360-car"
|
|
124
|
+
class="cloudimage-360"
|
|
125
|
+
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
126
|
+
data-filename-x="iris-{index}.jpeg"
|
|
127
|
+
data-amount-x="36"
|
|
128
|
+
></div>
|
|
129
|
+
```
|
|
130
|
+
```javascript
|
|
131
|
+
window.CI360.update('cloudimage-360-car');
|
|
132
|
+
```
|
|
133
|
+
#### `forceUpdate`: bool
|
|
134
|
+
Force the plugin to re-init.
|
|
135
|
+
```javascript
|
|
136
|
+
window.CI360.update(null, true);
|
|
137
|
+
```
|
|
109
138
|
|
|
110
139
|
### destroy
|
|
111
140
|
|
|
@@ -126,25 +155,51 @@ window.CI360.destroy();
|
|
|
126
155
|
Get the {index} of the image that is being viewed.
|
|
127
156
|
|
|
128
157
|
```javascript
|
|
129
|
-
window.CI360.getActiveIndexByID(
|
|
158
|
+
window.CI360.getActiveIndexByID(idOfInstance: string, oriantation: string);
|
|
130
159
|
```
|
|
131
|
-
|
|
160
|
+
### Properties
|
|
161
|
+
#### `idOfInstance`: string
|
|
162
|
+
The id of the instance
|
|
163
|
+
|
|
164
|
+
#### `oriantation`: string
|
|
165
|
+
The oriantation of the active index
|
|
132
166
|
|
|
133
|
-
|
|
167
|
+
## <a name="customize-elements"></a> Customize elements
|
|
168
|
+
|
|
169
|
+
You can customize elements by adding the following classes:
|
|
134
170
|
|
|
135
171
|
### Example CSS
|
|
136
172
|
```css
|
|
137
|
-
.cloudimage-360
|
|
138
|
-
|
|
173
|
+
.cloudimage-360-icons-container {
|
|
174
|
+
top: 5px;
|
|
175
|
+
right: 5px;
|
|
176
|
+
}
|
|
177
|
+
.cloudimage-360-fullscreen-modal {
|
|
178
|
+
top: 0;
|
|
179
|
+
bottom: 0;
|
|
139
180
|
}
|
|
140
|
-
.cloudimage-360
|
|
181
|
+
.cloudimage-360-magnifier-icon {
|
|
141
182
|
background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/loupe.svg) 50% 50% / cover no-repeat;
|
|
142
183
|
}
|
|
143
|
-
.cloudimage-360
|
|
184
|
+
.cloudimage-360-close-fullscreen-icon {
|
|
144
185
|
background: url(https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/cross.svg) 50% 50% / cover no-repeat;
|
|
145
186
|
}
|
|
146
|
-
.cloudimage-360
|
|
147
|
-
|
|
187
|
+
.cloudimage-360-view-360-circle {
|
|
188
|
+
margin: auto;
|
|
189
|
+
}
|
|
190
|
+
.cloudimage-360-loader {
|
|
191
|
+
margin: auto;
|
|
192
|
+
}
|
|
193
|
+
.cloudimage-360-view-360-icon {
|
|
194
|
+
background: url(hhttps://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg) 50% 50% / cover no-repeat;
|
|
195
|
+
}
|
|
196
|
+
.cloudimage-360-box-shadow {
|
|
197
|
+
top: 0;
|
|
198
|
+
left: 0;
|
|
199
|
+
}
|
|
200
|
+
.cloudimage-360-img-magnifier-glass {
|
|
201
|
+
border: 3px solid #000;
|
|
202
|
+
border-radius: 50%;
|
|
148
203
|
}
|
|
149
204
|
```
|
|
150
205
|
|
|
@@ -171,24 +226,27 @@ Allow to use a specific version of API.
|
|
|
171
226
|
```javascript
|
|
172
227
|
data-api-version="v7"
|
|
173
228
|
```
|
|
174
|
-
- disable API version
|
|
229
|
+
- disable API version
|
|
175
230
|
```javascript
|
|
176
231
|
data-api-version="null"
|
|
177
232
|
```
|
|
178
233
|
### data-filename (or filename)
|
|
234
|
+
### data-filename-x (or filename-x)
|
|
235
|
+
### ~~data-filename (or filename)~~ [deprecated]
|
|
179
236
|
|
|
180
237
|
###### Type: **String** | Default: **image-{index}.jpg** | _optional_
|
|
181
238
|
|
|
182
|
-
The filename pattern for your 360 image.
|
|
239
|
+
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
240
|
|
|
184
241
|
### data-filename-y (or filename-y)
|
|
185
242
|
|
|
186
243
|
###### Type: **String** | Default: **image-y-{index}.jpg** | _optional_
|
|
187
244
|
|
|
188
|
-
The filename pattern for
|
|
245
|
+
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
246
|
|
|
190
|
-
### <a name="data-amount"></a> data-amount (or amount)
|
|
191
247
|
|
|
248
|
+
### <a name="data-amount-x"></a> data-amount-x (or amount-x)
|
|
249
|
+
### ~~data-amount (or amount-x)~~ [deprecated]
|
|
192
250
|
###### Type: **Number** | Default: **36** | _optional_
|
|
193
251
|
|
|
194
252
|
Amount of images to load for 360 view.
|
|
@@ -205,6 +263,12 @@ Amount of images to load in Y-axis for 360 view.
|
|
|
205
263
|
|
|
206
264
|
Support for 360 spin by pressing arrow keys on keyboard.
|
|
207
265
|
|
|
266
|
+
### data-keys-reverse (or keys-reverse)
|
|
267
|
+
|
|
268
|
+
###### Type: **Bool** | Default: **false** | _optional_
|
|
269
|
+
|
|
270
|
+
invert arrow keys on keyboard.
|
|
271
|
+
|
|
208
272
|
### data-autoplay (or autoplay)
|
|
209
273
|
|
|
210
274
|
###### Type: **Bool** | Default: **false** | _optional_
|
|
@@ -225,8 +289,8 @@ Changing autoplay behavior
|
|
|
225
289
|
|
|
226
290
|
Available behaviors (spin-x, spin-y, spin-xy, spin-yx)
|
|
227
291
|
|
|
228
|
-
### data-
|
|
229
|
-
|
|
292
|
+
### data-fullscreen (or fullscreen)
|
|
293
|
+
### ~~data-full-screen (or full-screen)~~ [deprecated]
|
|
230
294
|
###### Type: **Bool** | Default: **false** | _optional_
|
|
231
295
|
|
|
232
296
|
Open 360 spin view in full screen modal.
|
|
@@ -237,18 +301,49 @@ Open 360 spin view in full screen modal.
|
|
|
237
301
|
|
|
238
302
|
Magnifier to zoom image.
|
|
239
303
|
|
|
240
|
-
### data-
|
|
304
|
+
### data-ratio (or ratio)
|
|
241
305
|
|
|
242
|
-
###### Type: **bool** | Default: **false** | _optional_
|
|
243
306
|
|
|
244
|
-
|
|
307
|
+
###### Type: **Number** (width / height) or JSON object | Default: **none** | _optional_
|
|
308
|
+
#### `ratio`: string
|
|
245
309
|
|
|
246
|
-
|
|
310
|
+
Setting the height relative to the container width according to the provided ratio</br>
|
|
311
|
+
In the following example, the height should be 0.3 the container width
|
|
247
312
|
|
|
248
|
-
|
|
313
|
+
```html
|
|
314
|
+
<div
|
|
315
|
+
id="cloudimage-360-car"
|
|
316
|
+
class="cloudimage-360"
|
|
317
|
+
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
318
|
+
data-filename-x="iris-{index}.jpeg"
|
|
319
|
+
data-amount-x="36"
|
|
320
|
+
data-ratio="2"
|
|
321
|
+
></div>
|
|
322
|
+
```
|
|
323
|
+
<a href="https://codesandbox.io/s/js-cloudimage-360-view-g4wyt1?file=/index.html"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="edit in codesandbox"/></a>
|
|
324
|
+
#### `ratio`: JSON
|
|
325
|
+
Setting the height relative to the container width at any window size.
|
|
249
326
|
|
|
250
|
-
|
|
327
|
+
In the following example, the height should be 1.3 the container width at window size less than or equal to 567px
|
|
328
|
+
and 2.22 at window size less than or equal to 768px.
|
|
251
329
|
|
|
330
|
+
```html
|
|
331
|
+
<div
|
|
332
|
+
id="cloudimage-360-car"
|
|
333
|
+
class="cloudimage-360"
|
|
334
|
+
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
335
|
+
data-filename-x="iris-{index}.jpeg"
|
|
336
|
+
data-amount-x="36"
|
|
337
|
+
data-ratio='{
|
|
338
|
+
"576": "1.3",
|
|
339
|
+
"768": "2.22",
|
|
340
|
+
"992": "2.23",
|
|
341
|
+
"1200": "3",
|
|
342
|
+
"2400": "3.2"
|
|
343
|
+
}'
|
|
344
|
+
></div>
|
|
345
|
+
```
|
|
346
|
+
<a href="https://codesandbox.io/s/js-cloudimage-360-view-5tssb7?file=/index.html"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="edit in codesandbox"/></a>
|
|
252
347
|
### data-autoplay-reverse (or autoplay-reverse)
|
|
253
348
|
|
|
254
349
|
###### Type: **Bool** | Default: **false** | _optional_
|
|
@@ -277,7 +372,7 @@ Speed Factor of changing frames on drag event.
|
|
|
277
372
|
|
|
278
373
|
###### Type: **Bool** | Default: **false** | _optional_
|
|
279
374
|
|
|
280
|
-
Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount).
|
|
375
|
+
Spin direction, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
|
|
281
376
|
|
|
282
377
|
### data-box-shadow (or box-shadow)
|
|
283
378
|
|
|
@@ -297,17 +392,18 @@ Display 360 view line at the bottom of container.
|
|
|
297
392
|
|
|
298
393
|
Hide 360 view icon.
|
|
299
394
|
|
|
300
|
-
### data-logo-src (or logo-src)
|
|
395
|
+
### ~~data-logo-src (or logo-src)~~ [deprecated]
|
|
301
396
|
|
|
302
|
-
###### Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_
|
|
397
|
+
###### ~~Type: **String** | Default: **https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg** | _optional_~~
|
|
303
398
|
|
|
304
|
-
URL of asset to use as the 360 view icon
|
|
399
|
+
~~URL of asset to use as the 360 view icon.~~
|
|
305
400
|
|
|
401
|
+
kindly read [Customize elements](#customize-elements)
|
|
306
402
|
### data-control-reverse (or control-reverse)
|
|
307
403
|
|
|
308
404
|
###### Type: **Bool** | Default: **false** | _optional_
|
|
309
405
|
|
|
310
|
-
Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount).
|
|
406
|
+
Spin direction using controls, by default it uses counterclockwise (image indexes from 1 to data-amount-x).
|
|
311
407
|
|
|
312
408
|
### data-stop-at-edges (or stop-at-edges)
|
|
313
409
|
|
|
@@ -327,74 +423,59 @@ Bottom offset for 360 view line.
|
|
|
327
423
|
|
|
328
424
|
Left zero padding on filename. For example: index-zero-base="4" => image index will be "0004"
|
|
329
425
|
|
|
330
|
-
### data-image-list (or image-list)
|
|
426
|
+
### data-image-list-x (or data-image-list-x)
|
|
427
|
+
### ~~data-image-list (or image-list)~~ [deprecated]
|
|
331
428
|
|
|
332
429
|
###### Type: **Array** | _optional_
|
|
333
430
|
|
|
334
|
-
Option to add list of images instead of `folder` & `
|
|
431
|
+
Option to add list of images in x-oriantation instead of `folder` , `filename-x` & `amount-x`.
|
|
335
432
|
|
|
336
433
|
example:
|
|
337
434
|
|
|
338
435
|
```javascript
|
|
339
436
|
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
340
|
-
data-image-list='[
|
|
437
|
+
data-image-list-x='[
|
|
341
438
|
"iris-1.jpeg",
|
|
342
439
|
"iris-4.jpeg",
|
|
343
440
|
"https://scaleflex.airstore.io/demo/360-car/iris-12.jpeg",
|
|
344
441
|
"https://scaleflex.airstore.io/demo/360-car/iris-15.jpeg"
|
|
345
442
|
]’
|
|
346
443
|
```
|
|
444
|
+
### data-image-list-y (or data-image-list-y)
|
|
347
445
|
|
|
348
|
-
|
|
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
|
|
446
|
+
###### Type: **Array** | _optional_
|
|
377
447
|
|
|
378
|
-
|
|
448
|
+
Option to add list of images in y-oriantation instead of `folder` , `filename-y` & `amount-y`.
|
|
379
449
|
|
|
380
|
-
|
|
450
|
+
example:
|
|
381
451
|
|
|
382
|
-
|
|
452
|
+
```javascript
|
|
453
|
+
data-folder="https://scaleflex.airstore.io/demo/360-car/"
|
|
454
|
+
data-image-list-y='[
|
|
455
|
+
"iris-2-y.jpeg",
|
|
456
|
+
"iris-6-y.jpeg",
|
|
457
|
+
"https://scaleflex.airstore.io/demo/360-car/iris-8-y.jpeg",
|
|
458
|
+
"https://scaleflex.airstore.io/demo/360-car/iris-30-y.jpeg"
|
|
459
|
+
]’
|
|
460
|
+
```
|
|
461
|
+
### data-pointer-zoom (or pointer-zoom)
|
|
383
462
|
|
|
384
|
-
###### Type: **Number** | Default: **
|
|
463
|
+
###### Type: **Number** | Default: **none** | _optional_
|
|
385
464
|
|
|
386
|
-
Pointer zoom
|
|
387
|
-
### data-pinch-zoom-factor (or pinch-zoom-factor)
|
|
465
|
+
Pointer zoom scale
|
|
388
466
|
|
|
389
|
-
|
|
467
|
+
example:
|
|
390
468
|
|
|
391
|
-
|
|
469
|
+
```javascript
|
|
470
|
+
data-pointer-zoom="3"
|
|
471
|
+
```
|
|
472
|
+
when mouse clicked the image scale will be multiplied by 3.
|
|
392
473
|
|
|
393
|
-
### data-
|
|
474
|
+
### data-lazyload (or lazyload)
|
|
394
475
|
|
|
395
|
-
###### Type: **
|
|
476
|
+
###### Type: **Bool** | Default: **false** | _optional_
|
|
396
477
|
|
|
397
|
-
|
|
478
|
+
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
479
|
### data-lazyload-selector (or lazyload-selector)
|
|
399
480
|
|
|
400
481
|
###### Type: **String** | Default: **lazyload** | _optional_
|
|
@@ -404,47 +485,47 @@ Helper class to apply lazy-loading depending on library you choose, see [Lazy lo
|
|
|
404
485
|
|
|
405
486
|
## <a name="controls"></a> Controls
|
|
406
487
|
|
|
407
|
-
You can add controls by adding elements with the following classes: **cloudimage-360-
|
|
488
|
+
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
489
|
|
|
409
490
|
### Example CSS
|
|
410
491
|
```css
|
|
411
|
-
.cloudimage-360 .cloudimage-360-
|
|
492
|
+
.cloudimage-360 .cloudimage-360-left, .cloudimage-360 .cloudimage-360-right {
|
|
412
493
|
padding: 8px;
|
|
413
494
|
background: rgba(255, 255, 255, 0.5);
|
|
414
495
|
border: none;
|
|
415
496
|
border-radius: 4px;
|
|
416
497
|
}
|
|
417
|
-
.cloudimage-360 .cloudimage-360-
|
|
498
|
+
.cloudimage-360 .cloudimage-360-left:focus, .cloudimage-360 .cloudimage-360-right:focus {
|
|
418
499
|
outline: none;
|
|
419
500
|
}
|
|
420
|
-
.cloudimage-360 .cloudimage-360-
|
|
501
|
+
.cloudimage-360 .cloudimage-360-left {
|
|
421
502
|
display: none;
|
|
422
503
|
position: absolute;
|
|
423
504
|
z-index: 100;
|
|
424
505
|
top: calc(50% - 15px);
|
|
425
506
|
left: 20px;
|
|
426
507
|
}
|
|
427
|
-
.cloudimage-360 .cloudimage-360-
|
|
508
|
+
.cloudimage-360 .cloudimage-360-right {
|
|
428
509
|
display: none;
|
|
429
510
|
position: absolute;
|
|
430
511
|
z-index: 100;
|
|
431
512
|
top: calc(50% - 15px);
|
|
432
513
|
right: 20px;
|
|
433
514
|
}
|
|
434
|
-
.cloudimage-360 .cloudimage-360-
|
|
515
|
+
.cloudimage-360 .cloudimage-360-left:before, .cloudimage-360 .cloudimage-360-right:before {
|
|
435
516
|
content: '';
|
|
436
517
|
display: block;
|
|
437
518
|
width: 30px;
|
|
438
519
|
height: 30px;
|
|
439
520
|
background: 50% 50% / cover no-repeat;
|
|
440
521
|
}
|
|
441
|
-
.cloudimage-360 .cloudimage-360-
|
|
522
|
+
.cloudimage-360 .cloudimage-360-left:before {
|
|
442
523
|
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-left.svg');
|
|
443
524
|
}
|
|
444
|
-
.cloudimage-360 .cloudimage-360-
|
|
525
|
+
.cloudimage-360 .cloudimage-360-right:before {
|
|
445
526
|
background-image: url('https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/assets/img/arrow-right.svg');
|
|
446
527
|
}
|
|
447
|
-
.cloudimage-360 .cloudimage-360-
|
|
528
|
+
.cloudimage-360 .cloudimage-360-left.not-active, .cloudimage-360 .cloudimage-360-right.not-active {
|
|
448
529
|
opacity: 0.4;
|
|
449
530
|
cursor: default;
|
|
450
531
|
}
|
|
@@ -454,10 +535,10 @@ You can add controls by adding elements with the following classes: **cloudimage
|
|
|
454
535
|
<div
|
|
455
536
|
class="cloudimage-360"
|
|
456
537
|
data-folder="https://scaleflex.airstore.io/demo/indoor/"
|
|
457
|
-
data-filename="{index}.jpeg"
|
|
538
|
+
data-filename-x="{index}.jpeg"
|
|
458
539
|
>
|
|
459
|
-
<button class="cloudimage-360-
|
|
460
|
-
<button class="cloudimage-360-
|
|
540
|
+
<button class="cloudimage-360-left"></button>
|
|
541
|
+
<button class="cloudimage-360-right"></button>
|
|
461
542
|
<button class="cloudimage-360-top"></button>
|
|
462
543
|
<button class="cloudimage-360-bottom"></button>
|
|
463
544
|
</div>
|