js-cloudimage-360-view 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/LICENSE +21 -0
- package/README.md +547 -0
- package/dist/ci360.constants.js +31 -0
- package/dist/ci360.service.js +1637 -0
- package/dist/ci360.utils.js +250 -0
- package/dist/index.js +57 -0
- package/dist/static/css/style.css +121 -0
- package/package.json +59 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
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
|
|
11
|
+
var get360ViewProps = function get360ViewProps(image) {
|
|
12
|
+
return {
|
|
13
|
+
folder: attr(image, 'folder') || attr(image, 'data-folder') || '/',
|
|
14
|
+
filenameX: attr(image, 'filename') || attr(image, 'data-filename') || attr(image, 'filename-x') || attr(image, 'data-filename-x') || 'image-{index}.jpg',
|
|
15
|
+
filenameY: attr(image, 'filename-y') || attr(image, 'data-filename-y') || 'image-y-{index}.jpg',
|
|
16
|
+
imageList: attr(image, 'image-list') || attr(image, 'data-image-list') || null,
|
|
17
|
+
indexZeroBase: parseInt(attr(image, 'index-zero-base') || attr(image, 'data-index-zero-base') || 0, 10),
|
|
18
|
+
amountX: parseInt(attr(image, 'amount') || attr(image, 'data-amount') || attr(image, 'amount-x') || attr(image, 'data-amount-x') || 36, 10),
|
|
19
|
+
amountY: parseInt(attr(image, 'amount-y') || attr(image, 'data-amount-y') || 0, 10),
|
|
20
|
+
imageOffset: parseInt(attr(image, 'image-offset') || attr(image, 'data-image-offset')),
|
|
21
|
+
speed: parseInt(attr(image, 'speed') || attr(image, 'data-speed') || 80, 10),
|
|
22
|
+
dragSpeed: parseInt(attr(image, 'drag-speed') || attr(image, 'data-drag-speed') || 150, 10),
|
|
23
|
+
keys: isTrue(image, 'keys'),
|
|
24
|
+
boxShadow: attr(image, 'box-shadow') || attr(image, 'data-box-shadow'),
|
|
25
|
+
autoplay: isTrue(image, 'autoplay'),
|
|
26
|
+
autoplayBehavior: attr(image, 'autoplay-behavior') || attr(image, 'data-autoplay-behavior') || _ci.AUTOPLAY_BEHAVIOR.SPIN_X,
|
|
27
|
+
playOnce: isTrue(image, 'play-once'),
|
|
28
|
+
disablePointerZoom: isTrue(image, 'disable-pointer-zoom'),
|
|
29
|
+
disablePinchZoom: isTrue(image, 'disable-pinch-zoom'),
|
|
30
|
+
onMouseLeave: attr(image, 'on-mouse-leave') || attr(image, 'data-on-mouse-leave'),
|
|
31
|
+
toStartPointerZoom: attr(image, 'to-start-pointer-zoom') || attr(image, 'data-to-start-pointer-zoom') || _ci.TO_START_POINTER_ZOOM.SCROLL_TO_START,
|
|
32
|
+
pointerZoomFactor: parseInt(attr(image, 'pointer-zoom-factor') || attr(image, 'data-pointer-zoom-factor') || 2, 10),
|
|
33
|
+
pinchZoomFactor: parseInt(attr(image, 'pinch-zoom-factor') || attr(image, 'data-pinch-zoom-factor') || 2, 10),
|
|
34
|
+
maxScale: parseFloat(attr(image, 'max-scale') || attr(image, 'data-max-scale') || 100, 10),
|
|
35
|
+
autoplayReverse: isTrue(image, 'autoplay-reverse'),
|
|
36
|
+
bottomCircle: isTrue(image, 'bottom-circle'),
|
|
37
|
+
disableDrag: isTrue(image, 'disable-drag'),
|
|
38
|
+
fullscreen: isTrue(image, 'fullscreen'),
|
|
39
|
+
magnifier: (attr(image, 'magnifier') !== null || attr(image, 'data-magnifier') !== null) && parseInt(attr(image, 'magnifier') || attr(image, 'data-magnifier'), 10),
|
|
40
|
+
magnifyInFullscreen: isTrue(image, 'magnify-in-fullscreen'),
|
|
41
|
+
bottomCircleOffset: parseInt(attr(image, 'bottom-circle-offset') || attr(image, 'data-bottom-circle-offset') || 5, 10),
|
|
42
|
+
ratio: parseFloat(attr(image, 'ratio') || attr(image, 'data-ratio') || 0) || false,
|
|
43
|
+
responsive: isTrue(image, 'responsive'),
|
|
44
|
+
ciToken: attr(image, 'responsive') || attr(image, 'data-responsive') || 'demo',
|
|
45
|
+
ciFilters: attr(image, 'filters') || attr(image, 'data-filters'),
|
|
46
|
+
ciTransformation: attr(image, 'transformation') || attr(image, 'data-transformation'),
|
|
47
|
+
lazyload: isTrue(image, 'lazyload'),
|
|
48
|
+
lazySelector: attr(image, 'lazyload-selector') || attr(image, 'data-lazyload-selector') || 'lazyload',
|
|
49
|
+
spinReverse: isTrue(image, 'spin-reverse'),
|
|
50
|
+
controlReverse: isTrue(image, 'control-reverse'),
|
|
51
|
+
stopAtEdges: isTrue(image, 'stop-at-edges'),
|
|
52
|
+
hide360Logo: isTrue(image, 'hide-360-logo'),
|
|
53
|
+
logoSrc: attr(image, 'logo-src') || 'https://scaleflex.ultrafast.io/https://scaleflex.airstore.io/filerobot/js-cloudimage-360-view/360_view.svg'
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var isTrue = function isTrue(image, type) {
|
|
58
|
+
var imgProp = attr(image, type);
|
|
59
|
+
var imgDataProp = attr(image, 'data-' + type);
|
|
60
|
+
|
|
61
|
+
return imgProp !== null && imgProp !== 'false' || imgDataProp !== null && imgDataProp !== 'false';
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var attr = function attr(element, attribute) {
|
|
65
|
+
return element.getAttribute(attribute);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var setView360Icon = function setView360Icon(view360Icon, logoSrc) {
|
|
69
|
+
view360Icon.style.background = 'rgba(255,255,255,0.8) url(\'' + logoSrc + '\') 50% 50% / contain no-repeat';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var magnify = function magnify(container) {
|
|
73
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
74
|
+
var src = arguments[2];
|
|
75
|
+
var glass = arguments[3];
|
|
76
|
+
var zoom = arguments[4];
|
|
77
|
+
|
|
78
|
+
var w = void 0,
|
|
79
|
+
h = void 0,
|
|
80
|
+
bw = void 0;
|
|
81
|
+
var _offset$x = offset.x,
|
|
82
|
+
offsetX = _offset$x === undefined ? 0 : _offset$x,
|
|
83
|
+
_offset$y = offset.y,
|
|
84
|
+
offsetY = _offset$y === undefined ? 0 : _offset$y;
|
|
85
|
+
|
|
86
|
+
var backgroundSizeX = (container.offsetWidth - offsetX * 2) * zoom;
|
|
87
|
+
var backgroundSizeY = (container.offsetHeight - offsetY * 2) * zoom;
|
|
88
|
+
|
|
89
|
+
glass.setAttribute("class", "cloudimage-360-img-magnifier-glass");
|
|
90
|
+
container.prepend(glass);
|
|
91
|
+
|
|
92
|
+
glass.style.backgroundImage = "url('" + src + "')";
|
|
93
|
+
glass.style.backgroundSize = backgroundSizeX + 'px ' + backgroundSizeY + 'px';
|
|
94
|
+
|
|
95
|
+
bw = 3;
|
|
96
|
+
w = glass.offsetWidth / 2;
|
|
97
|
+
h = glass.offsetHeight / 2;
|
|
98
|
+
|
|
99
|
+
glass.addEventListener("mousemove", moveMagnifier);
|
|
100
|
+
container.addEventListener("mousemove", moveMagnifier);
|
|
101
|
+
|
|
102
|
+
glass.addEventListener("touchmove", moveMagnifier, { passive: true });
|
|
103
|
+
container.addEventListener("touchmove", moveMagnifier, { passive: true });
|
|
104
|
+
|
|
105
|
+
function moveMagnifier(e) {
|
|
106
|
+
var pos = void 0,
|
|
107
|
+
x = void 0,
|
|
108
|
+
y = void 0;
|
|
109
|
+
|
|
110
|
+
pos = getCursorPos(e);
|
|
111
|
+
x = pos.x;
|
|
112
|
+
y = pos.y;
|
|
113
|
+
|
|
114
|
+
if (x > container.offsetWidth - w / zoom) {
|
|
115
|
+
x = container.offsetWidth - w / zoom;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (x < w / zoom) {
|
|
119
|
+
x = w / zoom;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (y > container.offsetHeight - h / zoom) {
|
|
123
|
+
y = container.offsetHeight - h / zoom;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (y < h / zoom) {
|
|
127
|
+
y = h / zoom;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
glass.style.left = x - w + "px";
|
|
131
|
+
glass.style.top = y - h + "px";
|
|
132
|
+
|
|
133
|
+
var backgroundPosX = (x - offsetX) * zoom - w + bw;
|
|
134
|
+
|
|
135
|
+
var backgroundPosY = (y - offsetY) * zoom - h + bw;
|
|
136
|
+
|
|
137
|
+
glass.style.backgroundPosition = '-' + backgroundPosX + 'px -' + backgroundPosY + 'px';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function getCursorPos(e) {
|
|
141
|
+
var a = void 0,
|
|
142
|
+
x = 0,
|
|
143
|
+
y = 0;
|
|
144
|
+
e = e || window.event;
|
|
145
|
+
a = container.getBoundingClientRect();
|
|
146
|
+
x = e.pageX - a.left;
|
|
147
|
+
y = e.pageY - a.top;
|
|
148
|
+
x = x - window.pageXOffset;
|
|
149
|
+
y = y - window.pageYOffset;
|
|
150
|
+
|
|
151
|
+
return { x: x, y: y };
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var getSizeLimit = function getSizeLimit(currentSize) {
|
|
156
|
+
if (currentSize <= 25) return '25';
|
|
157
|
+
if (currentSize <= 50) return '50';
|
|
158
|
+
|
|
159
|
+
return (Math.ceil(currentSize / 100) * 100).toString();
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var getSizeAccordingToPixelRatio = function getSizeAccordingToPixelRatio(size) {
|
|
163
|
+
var splittedSizes = size.toString().split('x');
|
|
164
|
+
var result = [];
|
|
165
|
+
|
|
166
|
+
[].forEach.call(splittedSizes, function (size) {
|
|
167
|
+
result.push(size * Math.round(window.devicePixelRatio || 1));
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return result.join('x');
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
var getResponsiveWidthOfContainer = function getResponsiveWidthOfContainer(width) {
|
|
174
|
+
return getSizeLimit(width);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
var fit = function fit(contains) {
|
|
178
|
+
return function (parentWidth, parentHeight, childWidth, childHeight) {
|
|
179
|
+
var scale = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
180
|
+
var offsetX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0.5;
|
|
181
|
+
var offsetY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0.5;
|
|
182
|
+
|
|
183
|
+
var childRatio = childWidth / childHeight;
|
|
184
|
+
var parentRatio = parentWidth / parentHeight;
|
|
185
|
+
var width = parentWidth * scale;
|
|
186
|
+
var height = parentHeight * scale;
|
|
187
|
+
|
|
188
|
+
if (contains ? childRatio > parentRatio : childRatio < parentRatio) {
|
|
189
|
+
height = width / childRatio;
|
|
190
|
+
} else {
|
|
191
|
+
width = height * childRatio;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
width: width,
|
|
196
|
+
height: height,
|
|
197
|
+
offsetX: (parentWidth - width) * offsetX,
|
|
198
|
+
offsetY: (parentHeight - height) * offsetY
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
var isTwoFingers = function isTwoFingers(event) {
|
|
204
|
+
return event.targetTouches.length === 2;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
var getMaxZoomIntensity = function getMaxZoomIntensity(width, maxScale) {
|
|
208
|
+
var maxWidth = maxScale * width;
|
|
209
|
+
var maxIntensity = maxWidth - width;
|
|
210
|
+
|
|
211
|
+
return maxIntensity;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var normalizeZoomFactor = function normalizeZoomFactor(event, pointerZoomFactor) {
|
|
215
|
+
var scrollEvent = Math.abs(event.deltaY);
|
|
216
|
+
var zoomFactor = scrollEvent < 125 ? -pointerZoomFactor * 10 : -pointerZoomFactor;
|
|
217
|
+
|
|
218
|
+
return zoomFactor;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
var contain = fit(true);
|
|
222
|
+
|
|
223
|
+
var addClass = function addClass(el, className) {
|
|
224
|
+
if (el.classList) el.classList.add(className);else el.className += ' ' + className;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
var removeClass = function removeClass(el, className) {
|
|
228
|
+
if (el.classList) el.classList.remove(className);else el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
var pad = function pad(n) {
|
|
232
|
+
var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
233
|
+
|
|
234
|
+
n = n + '';
|
|
235
|
+
|
|
236
|
+
return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
exports.get360ViewProps = get360ViewProps;
|
|
240
|
+
exports.setView360Icon = setView360Icon;
|
|
241
|
+
exports.magnify = magnify;
|
|
242
|
+
exports.getResponsiveWidthOfContainer = getResponsiveWidthOfContainer;
|
|
243
|
+
exports.getSizeAccordingToPixelRatio = getSizeAccordingToPixelRatio;
|
|
244
|
+
exports.contain = contain;
|
|
245
|
+
exports.addClass = addClass;
|
|
246
|
+
exports.removeClass = removeClass;
|
|
247
|
+
exports.pad = pad;
|
|
248
|
+
exports.isTwoFingers = isTwoFingers;
|
|
249
|
+
exports.getMaxZoomIntensity = getMaxZoomIntensity;
|
|
250
|
+
exports.normalizeZoomFactor = normalizeZoomFactor;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('core-js/features/array/for-each');
|
|
4
|
+
|
|
5
|
+
require('core-js/features/array/filter');
|
|
6
|
+
|
|
7
|
+
require('core-js/features/array/includes');
|
|
8
|
+
|
|
9
|
+
var _ci = require('./ci360.service');
|
|
10
|
+
|
|
11
|
+
var _ci2 = _interopRequireDefault(_ci);
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function init() {
|
|
16
|
+
var viewers = [];
|
|
17
|
+
var view360Array = document.querySelectorAll('.cloudimage-360:not(.initialized)');
|
|
18
|
+
|
|
19
|
+
[].slice.call(view360Array).forEach(function (container) {
|
|
20
|
+
viewers.push(new _ci2.default(container));
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
window.CI360._viewers = viewers;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function destroy() {
|
|
27
|
+
if (isNoViewers()) return;
|
|
28
|
+
|
|
29
|
+
window.CI360._viewers.forEach(function (viewer) {
|
|
30
|
+
viewer.destroy();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
window.CI360._viewers = [];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getActiveIndexByID(id) {
|
|
37
|
+
if (isNoViewers()) return;
|
|
38
|
+
|
|
39
|
+
var currentViewer = window.CI360._viewers.filter(function (viewer) {
|
|
40
|
+
return viewer.id === id;
|
|
41
|
+
})[0];
|
|
42
|
+
|
|
43
|
+
return currentViewer && currentViewer.activeImage - 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function isNoViewers() {
|
|
47
|
+
return !(window.CI360._viewers && window.CI360._viewers.length > 0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
window.CI360 = window.CI360 || {};
|
|
51
|
+
window.CI360.init = init;
|
|
52
|
+
window.CI360.destroy = destroy;
|
|
53
|
+
window.CI360.getActiveIndexByID = getActiveIndexByID;
|
|
54
|
+
|
|
55
|
+
if (!window.CI360.notInitOnLoad) {
|
|
56
|
+
init();
|
|
57
|
+
}
|
|
@@ -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: rgb(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
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "js-cloudimage-360-view",
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
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": "rd /s /q build",
|
|
27
|
+
"build": "npm run clean-build && webpack --mode production --config config/webpack-build.config.js",
|
|
28
|
+
"clean-dist": "rimraf 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
|
+
"mkdirp": "^1.0.4",
|
|
52
|
+
"mobile-detect": "^1.4.3",
|
|
53
|
+
"rimraf": "^3.0.2",
|
|
54
|
+
"style-loader": "^0.23.1",
|
|
55
|
+
"webpack": "^4.29.6",
|
|
56
|
+
"webpack-cli": "^3.3.0",
|
|
57
|
+
"webpack-dev-server": "^3.2.1"
|
|
58
|
+
}
|
|
59
|
+
}
|