js-cloudimage-360-view 2.6.0 → 2.7.2-beta.1
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 +75 -48
- package/LICENSE +21 -21
- package/README.md +572 -435
- package/dist/ci360.constants.js +39 -0
- package/dist/ci360.service.js +1134 -257
- package/dist/ci360.utils.js +85 -137
- package/dist/static/css/style.css +121 -0
- package/package.json +57 -57
package/dist/ci360.utils.js
CHANGED
|
@@ -3,29 +3,48 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.debounce = exports.normalizeZoomFactor = exports.getMaxZoomIntensity = exports.isTwoFingers = exports.pad = exports.removeClass = exports.addClass = exports.contain = exports.getSizeAccordingToPixelRatio = exports.getResponsiveWidthOfContainer = exports.magnify = exports.setView360Icon = exports.get360ViewProps = undefined;
|
|
7
|
+
|
|
8
|
+
var _ci = require('./ci360.constants');
|
|
9
|
+
|
|
10
|
+
//TODO [deprecated]: remove filename, amount in the upcoming versions
|
|
6
11
|
var get360ViewProps = function get360ViewProps(image) {
|
|
7
12
|
return {
|
|
8
13
|
folder: attr(image, 'folder') || attr(image, 'data-folder') || '/',
|
|
9
|
-
|
|
14
|
+
apiVersion: attr(image, 'api-version') || attr(image, 'data-api-version') || attr(image, 'apiVersion') || attr(image, 'data-apiVersion') || "v7",
|
|
15
|
+
filenameX: attr(image, 'filename') || attr(image, 'data-filename') || attr(image, 'filename-x') || attr(image, 'data-filename-x') || 'image-{index}.jpg',
|
|
16
|
+
filenameY: attr(image, 'filename-y') || attr(image, 'data-filename-y') || 'image-y-{index}.jpg',
|
|
10
17
|
imageList: attr(image, 'image-list') || attr(image, 'data-image-list') || null,
|
|
11
18
|
indexZeroBase: parseInt(attr(image, 'index-zero-base') || attr(image, 'data-index-zero-base') || 0, 10),
|
|
12
|
-
|
|
19
|
+
amountX: parseInt(attr(image, 'amount') || attr(image, 'data-amount') || attr(image, 'amount-x') || attr(image, 'data-amount-x') || 36, 10),
|
|
20
|
+
amountY: parseInt(attr(image, 'amount-y') || attr(image, 'data-amount-y') || 0, 10),
|
|
21
|
+
imageOffset: parseInt(attr(image, 'image-offset') || attr(image, 'data-image-offset')),
|
|
13
22
|
speed: parseInt(attr(image, 'speed') || attr(image, 'data-speed') || 80, 10),
|
|
14
23
|
dragSpeed: parseInt(attr(image, 'drag-speed') || attr(image, 'data-drag-speed') || 150, 10),
|
|
15
24
|
keys: isTrue(image, 'keys'),
|
|
16
25
|
boxShadow: attr(image, 'box-shadow') || attr(image, 'data-box-shadow'),
|
|
17
26
|
autoplay: isTrue(image, 'autoplay'),
|
|
27
|
+
autoplayBehavior: attr(image, 'autoplay-behavior') || attr(image, 'data-autoplay-behavior') || _ci.AUTOPLAY_BEHAVIOR.SPIN_X,
|
|
28
|
+
playOnce: isTrue(image, 'play-once'),
|
|
29
|
+
disablePointerZoom: isTrue(image, 'disable-pointer-zoom'),
|
|
30
|
+
disablePinchZoom: isTrue(image, 'disable-pinch-zoom'),
|
|
31
|
+
onMouseLeave: attr(image, 'on-mouse-leave') || attr(image, 'data-on-mouse-leave'),
|
|
32
|
+
toStartPointerZoom: attr(image, 'to-start-pointer-zoom') || attr(image, 'data-to-start-pointer-zoom') || _ci.TO_START_POINTER_ZOOM.CLICK_TO_START,
|
|
33
|
+
pointerZoomFactor: parseInt(attr(image, 'pointer-zoom-factor') || attr(image, 'data-pointer-zoom-factor') || 2, 10),
|
|
34
|
+
pinchZoomFactor: parseInt(attr(image, 'pinch-zoom-factor') || attr(image, 'data-pinch-zoom-factor') || 2, 10),
|
|
35
|
+
maxScale: parseFloat(attr(image, 'max-scale') || attr(image, 'data-max-scale') || 100, 10),
|
|
18
36
|
autoplayReverse: isTrue(image, 'autoplay-reverse'),
|
|
19
37
|
bottomCircle: isTrue(image, 'bottom-circle'),
|
|
20
|
-
|
|
38
|
+
disableDrag: isTrue(image, 'disable-drag'),
|
|
39
|
+
fullscreen: isTrue(image, 'fullscreen') || isTrue(image, 'full-screen'),
|
|
21
40
|
magnifier: (attr(image, 'magnifier') !== null || attr(image, 'data-magnifier') !== null) && parseInt(attr(image, 'magnifier') || attr(image, 'data-magnifier'), 10),
|
|
41
|
+
magnifyInFullscreen: isTrue(image, 'magnify-in-fullscreen') || isTrue(image, 'magnifier-in-fullscreen'),
|
|
22
42
|
bottomCircleOffset: parseInt(attr(image, 'bottom-circle-offset') || attr(image, 'data-bottom-circle-offset') || 5, 10),
|
|
23
43
|
ratio: parseFloat(attr(image, 'ratio') || attr(image, 'data-ratio') || 0) || false,
|
|
24
44
|
responsive: isTrue(image, 'responsive'),
|
|
25
45
|
ciToken: attr(image, 'responsive') || attr(image, 'data-responsive') || 'demo',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
ciFilters: attr(image, 'filters') || attr(image, 'data-filters') || 'q35',
|
|
46
|
+
ciFilters: attr(image, 'filters') || attr(image, 'data-filters'),
|
|
47
|
+
ciTransformation: attr(image, 'transformation') || attr(image, 'data-transformation'),
|
|
29
48
|
lazyload: isTrue(image, 'lazyload'),
|
|
30
49
|
lazySelector: attr(image, 'lazyload-selector') || attr(image, 'data-lazyload-selector') || 'lazyload',
|
|
31
50
|
spinReverse: isTrue(image, 'spin-reverse'),
|
|
@@ -47,134 +66,32 @@ var attr = function attr(element, attribute) {
|
|
|
47
66
|
return element.getAttribute(attribute);
|
|
48
67
|
};
|
|
49
68
|
|
|
50
|
-
var set360ViewIconStyles = function set360ViewIconStyles(view360Icon) {
|
|
51
|
-
view360Icon.style.position = 'absolute';
|
|
52
|
-
view360Icon.style.top = '0';
|
|
53
|
-
view360Icon.style.bottom = '0';
|
|
54
|
-
view360Icon.style.left = '0';
|
|
55
|
-
view360Icon.style.right = '0';
|
|
56
|
-
view360Icon.style.width = '100px';
|
|
57
|
-
view360Icon.style.height = '100px';
|
|
58
|
-
view360Icon.style.margin = 'auto';
|
|
59
|
-
view360Icon.style.backgroundColor = 'rgba(255,255,255,0.8)';
|
|
60
|
-
view360Icon.style.borderRadius = '50%';
|
|
61
|
-
view360Icon.style.boxShadow = 'rgb(255, 255, 255, 0.5) 0px 0px 4px';
|
|
62
|
-
view360Icon.style.transition = '0.5s all';
|
|
63
|
-
view360Icon.style.color = 'rgb(80,80,80)';
|
|
64
|
-
view360Icon.style.textAlign = 'center';
|
|
65
|
-
view360Icon.style.lineHeight = '100px';
|
|
66
|
-
view360Icon.style.zIndex = '2';
|
|
67
|
-
};
|
|
68
|
-
|
|
69
69
|
var setView360Icon = function setView360Icon(view360Icon, logoSrc) {
|
|
70
70
|
view360Icon.style.background = 'rgba(255,255,255,0.8) url(\'' + logoSrc + '\') 50% 50% / contain no-repeat';
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
view360CircleIcon.style.left = '0';
|
|
79
|
-
view360CircleIcon.style.right = '0';
|
|
80
|
-
view360CircleIcon.style.width = '80%';
|
|
81
|
-
view360CircleIcon.style.height = 'auto';
|
|
82
|
-
view360CircleIcon.style.margin = 'auto';
|
|
83
|
-
view360CircleIcon.style.transition = '0.5s all';
|
|
84
|
-
view360CircleIcon.style.zIndex = '2';
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
var setLoaderStyles = function setLoaderStyles(loader) {
|
|
88
|
-
loader.className = 'cloudimage-360-loader';
|
|
89
|
-
loader.style.position = 'absolute';
|
|
90
|
-
loader.style.zIndex = '100';
|
|
91
|
-
loader.style.top = '0';
|
|
92
|
-
loader.style.left = '0';
|
|
93
|
-
loader.style.right = '0';
|
|
94
|
-
loader.style.width = '0%';
|
|
95
|
-
loader.style.height = '8px';
|
|
96
|
-
loader.style.background = 'rgb(165,175,184)';
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var setBoxShadowStyles = function setBoxShadowStyles(boxShadow, boxShadowValue) {
|
|
100
|
-
boxShadow.className = 'cloudimage-360-box-shadow';
|
|
101
|
-
boxShadow.style.position = 'absolute';
|
|
102
|
-
boxShadow.style.zIndex = '99';
|
|
103
|
-
boxShadow.style.top = '0';
|
|
104
|
-
boxShadow.style.left = '0';
|
|
105
|
-
boxShadow.style.right = '0';
|
|
106
|
-
boxShadow.style.bottom = '0';
|
|
107
|
-
boxShadow.style.boxShadow = boxShadowValue;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var setMagnifyIconStyles = function setMagnifyIconStyles(magnifyIcon, fullScreen) {
|
|
111
|
-
magnifyIcon.style.position = 'absolute';
|
|
112
|
-
magnifyIcon.style.top = fullScreen ? '35px' : '5px';
|
|
113
|
-
magnifyIcon.style.right = '5px';
|
|
114
|
-
magnifyIcon.style.width = '25px';
|
|
115
|
-
magnifyIcon.style.height = '25px';
|
|
116
|
-
magnifyIcon.style.zIndex = '101';
|
|
117
|
-
magnifyIcon.style.cursor = 'pointer';
|
|
118
|
-
magnifyIcon.style.background = 'url(\'https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/loupe.svg\') 50% 50% / cover no-repeat';
|
|
119
|
-
};
|
|
73
|
+
var magnify = function magnify(container) {
|
|
74
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
75
|
+
var src = arguments[2];
|
|
76
|
+
var glass = arguments[3];
|
|
77
|
+
var zoom = arguments[4];
|
|
120
78
|
|
|
121
|
-
var setFullScreenModalStyles = function setFullScreenModalStyles(fullScreenModal) {
|
|
122
|
-
fullScreenModal.style.position = 'fixed';
|
|
123
|
-
fullScreenModal.style.top = '0';
|
|
124
|
-
fullScreenModal.style.bottom = '0';
|
|
125
|
-
fullScreenModal.style.left = '0';
|
|
126
|
-
fullScreenModal.style.right = '0';
|
|
127
|
-
fullScreenModal.style.width = '100%';
|
|
128
|
-
fullScreenModal.style.height = '100%';
|
|
129
|
-
fullScreenModal.style.zIndex = '999';
|
|
130
|
-
fullScreenModal.style.background = '#fff';
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
var setFullScreenIconStyles = function setFullScreenIconStyles(fullScreenIcon) {
|
|
134
|
-
fullScreenIcon.style.position = 'absolute';
|
|
135
|
-
fullScreenIcon.style.top = '5px';
|
|
136
|
-
fullScreenIcon.style.right = '5px';
|
|
137
|
-
fullScreenIcon.style.width = '25px';
|
|
138
|
-
fullScreenIcon.style.height = '25px';
|
|
139
|
-
fullScreenIcon.style.zIndex = '101';
|
|
140
|
-
fullScreenIcon.style.cursor = 'pointer';
|
|
141
|
-
fullScreenIcon.style.background = 'url(\'https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/full_screen.svg\') 50% 50% / cover no-repeat';
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
var setCloseFullScreenViewStyles = function setCloseFullScreenViewStyles(closeFullScreenIcon) {
|
|
145
|
-
closeFullScreenIcon.style.position = 'absolute';
|
|
146
|
-
closeFullScreenIcon.style.top = '5px';
|
|
147
|
-
closeFullScreenIcon.style.right = '5px';
|
|
148
|
-
closeFullScreenIcon.style.width = '25px';
|
|
149
|
-
closeFullScreenIcon.style.height = '25px';
|
|
150
|
-
closeFullScreenIcon.style.zIndex = '101';
|
|
151
|
-
closeFullScreenIcon.style.cursor = 'pointer';
|
|
152
|
-
closeFullScreenIcon.style.background = 'url(\'https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/cross.svg\') 50% 50% / cover no-repeat';
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
var magnify = function magnify(container, src, glass, zoom) {
|
|
156
79
|
var w = void 0,
|
|
157
80
|
h = void 0,
|
|
158
81
|
bw = void 0;
|
|
159
|
-
|
|
82
|
+
var _offset$x = offset.x,
|
|
83
|
+
offsetX = _offset$x === undefined ? 0 : _offset$x,
|
|
84
|
+
_offset$y = offset.y,
|
|
85
|
+
offsetY = _offset$y === undefined ? 0 : _offset$y;
|
|
86
|
+
|
|
87
|
+
var backgroundSizeX = (container.offsetWidth - offsetX * 2) * zoom;
|
|
88
|
+
var backgroundSizeY = (container.offsetHeight - offsetY * 2) * zoom;
|
|
89
|
+
|
|
90
|
+
glass.setAttribute("class", "cloudimage-360-img-magnifier-glass");
|
|
160
91
|
container.prepend(glass);
|
|
161
92
|
|
|
162
|
-
glass.style.backgroundColor = '#fff';
|
|
163
93
|
glass.style.backgroundImage = "url('" + src + "')";
|
|
164
|
-
glass.style.
|
|
165
|
-
glass.style.backgroundSize = container.offsetWidth * zoom + "px " + container.offsetHeight * zoom + "px";
|
|
166
|
-
glass.style.position = 'absolute';
|
|
167
|
-
glass.style.border = '3px solid #000';
|
|
168
|
-
glass.style.borderRadius = '50%';
|
|
169
|
-
glass.style.cursor = 'wait';
|
|
170
|
-
glass.style.lineHeight = '200px';
|
|
171
|
-
glass.style.textAlign = 'center';
|
|
172
|
-
glass.style.zIndex = '1000';
|
|
173
|
-
|
|
174
|
-
glass.style.width = '250px';
|
|
175
|
-
glass.style.height = '250px';
|
|
176
|
-
glass.style.top = '-75px';
|
|
177
|
-
glass.style.right = '-85px';
|
|
94
|
+
glass.style.backgroundSize = backgroundSizeX + 'px ' + backgroundSizeY + 'px';
|
|
178
95
|
|
|
179
96
|
bw = 3;
|
|
180
97
|
w = glass.offsetWidth / 2;
|
|
@@ -183,16 +100,14 @@ var magnify = function magnify(container, src, glass, zoom) {
|
|
|
183
100
|
glass.addEventListener("mousemove", moveMagnifier);
|
|
184
101
|
container.addEventListener("mousemove", moveMagnifier);
|
|
185
102
|
|
|
186
|
-
glass.addEventListener("touchmove", moveMagnifier);
|
|
187
|
-
container.addEventListener("touchmove", moveMagnifier);
|
|
103
|
+
glass.addEventListener("touchmove", moveMagnifier, { passive: true });
|
|
104
|
+
container.addEventListener("touchmove", moveMagnifier, { passive: true });
|
|
188
105
|
|
|
189
106
|
function moveMagnifier(e) {
|
|
190
107
|
var pos = void 0,
|
|
191
108
|
x = void 0,
|
|
192
109
|
y = void 0;
|
|
193
110
|
|
|
194
|
-
e.preventDefault();
|
|
195
|
-
|
|
196
111
|
pos = getCursorPos(e);
|
|
197
112
|
x = pos.x;
|
|
198
113
|
y = pos.y;
|
|
@@ -216,7 +131,11 @@ var magnify = function magnify(container, src, glass, zoom) {
|
|
|
216
131
|
glass.style.left = x - w + "px";
|
|
217
132
|
glass.style.top = y - h + "px";
|
|
218
133
|
|
|
219
|
-
|
|
134
|
+
var backgroundPosX = (x - offsetX) * zoom - w + bw;
|
|
135
|
+
|
|
136
|
+
var backgroundPosY = (y - offsetY) * zoom - h + bw;
|
|
137
|
+
|
|
138
|
+
glass.style.backgroundPosition = '-' + backgroundPosX + 'px -' + backgroundPosY + 'px';
|
|
220
139
|
}
|
|
221
140
|
|
|
222
141
|
function getCursorPos(e) {
|
|
@@ -282,6 +201,24 @@ var fit = function fit(contains) {
|
|
|
282
201
|
};
|
|
283
202
|
};
|
|
284
203
|
|
|
204
|
+
var isTwoFingers = function isTwoFingers(event) {
|
|
205
|
+
return event.targetTouches.length === 2;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
var getMaxZoomIntensity = function getMaxZoomIntensity(width, maxScale) {
|
|
209
|
+
var maxWidth = maxScale * width;
|
|
210
|
+
var maxIntensity = maxWidth - width;
|
|
211
|
+
|
|
212
|
+
return maxIntensity;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var normalizeZoomFactor = function normalizeZoomFactor(event, pointerZoomFactor) {
|
|
216
|
+
var scrollEvent = Math.abs(event.deltaY);
|
|
217
|
+
var zoomFactor = scrollEvent < 125 ? -pointerZoomFactor * 10 : -pointerZoomFactor;
|
|
218
|
+
|
|
219
|
+
return zoomFactor;
|
|
220
|
+
};
|
|
221
|
+
|
|
285
222
|
var contain = fit(true);
|
|
286
223
|
|
|
287
224
|
var addClass = function addClass(el, className) {
|
|
@@ -300,20 +237,31 @@ var pad = function pad(n) {
|
|
|
300
237
|
return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
|
|
301
238
|
};
|
|
302
239
|
|
|
240
|
+
var debounce = function debounce(func, timeout) {
|
|
241
|
+
var timer = void 0;
|
|
242
|
+
return function () {
|
|
243
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
244
|
+
args[_key] = arguments[_key];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
clearTimeout(timer);
|
|
248
|
+
|
|
249
|
+
timer = setTimeout(function () {
|
|
250
|
+
func.apply(undefined, args);
|
|
251
|
+
}, timeout);
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
|
|
303
255
|
exports.get360ViewProps = get360ViewProps;
|
|
304
|
-
exports.set360ViewIconStyles = set360ViewIconStyles;
|
|
305
|
-
exports.set360ViewCircleIconStyles = set360ViewCircleIconStyles;
|
|
306
|
-
exports.setLoaderStyles = setLoaderStyles;
|
|
307
|
-
exports.setBoxShadowStyles = setBoxShadowStyles;
|
|
308
256
|
exports.setView360Icon = setView360Icon;
|
|
309
257
|
exports.magnify = magnify;
|
|
310
|
-
exports.setMagnifyIconStyles = setMagnifyIconStyles;
|
|
311
|
-
exports.setFullScreenModalStyles = setFullScreenModalStyles;
|
|
312
|
-
exports.setFullScreenIconStyles = setFullScreenIconStyles;
|
|
313
|
-
exports.setCloseFullScreenViewStyles = setCloseFullScreenViewStyles;
|
|
314
258
|
exports.getResponsiveWidthOfContainer = getResponsiveWidthOfContainer;
|
|
315
259
|
exports.getSizeAccordingToPixelRatio = getSizeAccordingToPixelRatio;
|
|
316
260
|
exports.contain = contain;
|
|
317
261
|
exports.addClass = addClass;
|
|
318
262
|
exports.removeClass = removeClass;
|
|
319
|
-
exports.pad = pad;
|
|
263
|
+
exports.pad = pad;
|
|
264
|
+
exports.isTwoFingers = isTwoFingers;
|
|
265
|
+
exports.getMaxZoomIntensity = getMaxZoomIntensity;
|
|
266
|
+
exports.normalizeZoomFactor = normalizeZoomFactor;
|
|
267
|
+
exports.debounce = debounce;
|
|
@@ -0,0 +1,121 @@
|
|
|
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.ultrafast.io/https://scaleflex.airstore.io/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.ultrafast.io/https://scaleflex.airstore.io/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.ultrafast.io/https://scaleflex.airstore.io/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
|
+
transition: 0.5s all;
|
|
92
|
+
z-index: 2;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.cloudimage-360-fullscreen-modal {
|
|
96
|
+
position: fixed;
|
|
97
|
+
top: 0;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
right: 0;
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
z-index: 999;
|
|
104
|
+
background-color: #FFF;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cloudimage-360-img-magnifier-glass {
|
|
108
|
+
background-color: #FFF;
|
|
109
|
+
background-repeat: no-repeat;
|
|
110
|
+
position: absolute;
|
|
111
|
+
border: 3px solid #000;
|
|
112
|
+
border-radius: 50%;
|
|
113
|
+
cursor: wait;
|
|
114
|
+
line-height: 200px;
|
|
115
|
+
text-align: center;
|
|
116
|
+
z-index: 1000;
|
|
117
|
+
width: 250px;
|
|
118
|
+
height: 250px;
|
|
119
|
+
top: -75px;
|
|
120
|
+
right: -85px;
|
|
121
|
+
}
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "js-cloudimage-360-view",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"description": "",
|
|
6
|
-
"author": "scaleflex",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/scaleflex/js-cloudimage-360-view"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "#readme",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"image",
|
|
15
|
-
"images",
|
|
16
|
-
"cloudimage",
|
|
17
|
-
"360",
|
|
18
|
-
"photo",
|
|
19
|
-
"product",
|
|
20
|
-
"view",
|
|
21
|
-
"viewer",
|
|
22
|
-
"360 product view"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"start-demo": "webpack-dev-server --mode development --config config/webpack-demo.config.js",
|
|
26
|
-
"clean-build": "rm -rf build",
|
|
27
|
-
"build": "npm run clean-build && webpack --mode production --config config/webpack-build.config.js",
|
|
28
|
-
"clean-dist": "rm -rf dist",
|
|
29
|
-
"dist": "npm run clean-dist && babel src -d dist --copy-files",
|
|
30
|
-
"clean-demo": "rm -rf examples/dist",
|
|
31
|
-
"build-demo": "npm run clean-demo && webpack --mode production --config config/webpack-demo.config.js",
|
|
32
|
-
"deploy-demo": "gh-pages -d examples/dist",
|
|
33
|
-
"publish-demo": "npm run build-demo && npm run deploy-demo"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"core-js": "^3.0.0"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"babel-cli": "^6.26.0",
|
|
40
|
-
"babel-core": "^6.26.3",
|
|
41
|
-
"babel-loader": "^7.1.4",
|
|
42
|
-
"babel-plugin-array-includes": "^2.0.3",
|
|
43
|
-
"babel-preset-env": "^1.7.0",
|
|
44
|
-
"babel-preset-es2015": "^6.24.1",
|
|
45
|
-
"babel-preset-minify": "^0.5.0",
|
|
46
|
-
"babel-preset-stage-2": "^6.24.1",
|
|
47
|
-
"css-loader": "^2.1.1",
|
|
48
|
-
"gh-pages": "^2.0.1",
|
|
49
|
-
"highlight.js": "^
|
|
50
|
-
"html-webpack-plugin": "^3.2.0",
|
|
51
|
-
"mobile-detect": "^1.4.3",
|
|
52
|
-
"style-loader": "^0.23.1",
|
|
53
|
-
"webpack": "^4.29.6",
|
|
54
|
-
"webpack-cli": "^3.3.0",
|
|
55
|
-
"webpack-dev-server": "^3.2.1"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "js-cloudimage-360-view",
|
|
3
|
+
"version": "2.7.2-beta.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "scaleflex",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/scaleflex/js-cloudimage-360-view"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "#readme",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"image",
|
|
15
|
+
"images",
|
|
16
|
+
"cloudimage",
|
|
17
|
+
"360",
|
|
18
|
+
"photo",
|
|
19
|
+
"product",
|
|
20
|
+
"view",
|
|
21
|
+
"viewer",
|
|
22
|
+
"360 product view"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"start-demo": "webpack-dev-server --mode development --config config/webpack-demo.config.js",
|
|
26
|
+
"clean-build": "rm -rf build",
|
|
27
|
+
"build": "npm run clean-build && webpack --mode production --config config/webpack-build.config.js",
|
|
28
|
+
"clean-dist": "rm -rf dist",
|
|
29
|
+
"dist": "npm run clean-dist && babel src -d dist --copy-files",
|
|
30
|
+
"clean-demo": "rm -rf examples/dist",
|
|
31
|
+
"build-demo": "npm run clean-demo && webpack --mode production --config config/webpack-demo.config.js",
|
|
32
|
+
"deploy-demo": "gh-pages -d examples/dist",
|
|
33
|
+
"publish-demo": "npm run build-demo && npm run deploy-demo"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"core-js": "^3.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"babel-cli": "^6.26.0",
|
|
40
|
+
"babel-core": "^6.26.3",
|
|
41
|
+
"babel-loader": "^7.1.4",
|
|
42
|
+
"babel-plugin-array-includes": "^2.0.3",
|
|
43
|
+
"babel-preset-env": "^1.7.0",
|
|
44
|
+
"babel-preset-es2015": "^6.24.1",
|
|
45
|
+
"babel-preset-minify": "^0.5.0",
|
|
46
|
+
"babel-preset-stage-2": "^6.24.1",
|
|
47
|
+
"css-loader": "^2.1.1",
|
|
48
|
+
"gh-pages": "^2.0.1",
|
|
49
|
+
"highlight.js": "^10.4.1",
|
|
50
|
+
"html-webpack-plugin": "^3.2.0",
|
|
51
|
+
"mobile-detect": "^1.4.3",
|
|
52
|
+
"style-loader": "^0.23.1",
|
|
53
|
+
"webpack": "^4.29.6",
|
|
54
|
+
"webpack-cli": "^3.3.0",
|
|
55
|
+
"webpack-dev-server": "^3.2.1"
|
|
56
|
+
}
|
|
57
|
+
}
|