js-cloudimage-360-view 3.0.4 → 3.1.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 +7 -0
- package/README.md +11 -0
- package/dist/ci360.service.js +65 -245
- package/dist/ci360.utils.js +2 -14
- package/dist/constants/index.js +0 -4
- package/dist/constants/props-require-reload.js +24 -12
- package/dist/index.js +0 -27
- package/dist/utils/auto-play/get-speed-factor.js +0 -2
- package/dist/utils/auto-play/is-completed-one-cycle.js +0 -5
- package/dist/utils/auto-play/loop.js +3 -14
- package/dist/utils/class-names/add-class.js +0 -3
- package/dist/utils/class-names/remove-class.js +0 -2
- package/dist/utils/container-elements/apply-styles-to-container.js +0 -2
- package/dist/utils/container-elements/create-360-view-circle-icon.js +0 -2
- package/dist/utils/container-elements/create-360-view-icon.js +0 -2
- package/dist/utils/container-elements/create-box-shadow.js +0 -2
- package/dist/utils/container-elements/create-canvas.js +0 -2
- package/dist/utils/container-elements/create-close-fullscreen-icon.js +0 -2
- package/dist/utils/container-elements/create-fullscreen-icon.js +0 -2
- package/dist/utils/container-elements/create-fullscreen-modal.js +0 -2
- package/dist/utils/container-elements/create-icons-container.js +0 -2
- package/dist/utils/container-elements/create-inner-box.js +0 -2
- package/dist/utils/container-elements/create-loader.js +0 -2
- package/dist/utils/container-elements/create-magnifier-icon.js +0 -2
- package/dist/utils/container-elements/index.js +0 -13
- package/dist/utils/container-elements/remove-child-from-parent.js +0 -2
- package/dist/utils/controls/get-item-skipped.js +0 -2
- package/dist/utils/controls/init-controls.js +7 -16
- package/dist/utils/hotspots/attach-events/hide-popup.js +0 -2
- package/dist/utils/hotspots/attach-events/show-popup.js +0 -2
- package/dist/utils/hotspots/configs-error-handler.js +6 -10
- package/dist/utils/hotspots/create-popper-instace.js +1 -4
- package/dist/utils/hotspots/elements/create-carousel-dot.js +0 -6
- package/dist/utils/hotspots/elements/create-carousel-image.js +0 -4
- package/dist/utils/hotspots/elements/create-hotspot-icon.js +3 -14
- package/dist/utils/hotspots/elements/create-hotspot-popup-link.js +2 -6
- package/dist/utils/hotspots/elements/create-hotspots.js +0 -5
- package/dist/utils/hotspots/elements/create-images-carousel.js +0 -4
- package/dist/utils/hotspots/elements/create-modal-description.js +0 -2
- package/dist/utils/hotspots/elements/create-modal-title.js +0 -2
- package/dist/utils/hotspots/elements/create-model-elements.js +8 -25
- package/dist/utils/hotspots/elements/create-popup-arrow.js +0 -2
- package/dist/utils/hotspots/elements/create-popup.js +6 -18
- package/dist/utils/hotspots/elements/create-read-more-btn.js +0 -2
- package/dist/utils/hotspots/fill-empty-coord-with-previous.js +1 -6
- package/dist/utils/hotspots/generate-hotspots-configs.js +11 -21
- package/dist/utils/hotspots/generate-popup-config.js +9 -11
- package/dist/utils/hotspots/get-hotspot-icon.js +0 -2
- package/dist/utils/hotspots/get-hotspot-orientation.js +0 -4
- package/dist/utils/hotspots/get-hotspot-popup-node.js +0 -2
- package/dist/utils/hotspots/get-popup-node.js +0 -2
- package/dist/utils/hotspots/hide-hotspot-icon.js +0 -2
- package/dist/utils/hotspots/hide-hotspots-icons.js +0 -3
- package/dist/utils/hotspots/is-mouse-on-hotspot.js +0 -2
- package/dist/utils/hotspots/prepare-hotspots-positions.js +0 -6
- package/dist/utils/hotspots/set-current-slide.js +0 -2
- package/dist/utils/hotspots/toggle-popup-events.js +0 -4
- package/dist/utils/hotspots/update-hotspot-icon-position.js +0 -2
- package/dist/utils/hotspots/update-hotspots.js +6 -14
- package/dist/utils/image-src/generate-images-path.js +8 -17
- package/dist/utils/image-src/is-props-change-require-reload.js +0 -5
- package/dist/utils/index.js +0 -26
- package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +2 -11
- package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +0 -8
- package/dist/utils/load-images/lazyload/init-lazyload.js +3 -11
- package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-folder.js +1 -5
- package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-list.js +0 -9
- package/dist/utils/load-images/load-image-as-promise.js +8 -46
- package/dist/utils/load-images/load-images-relative-to-container-size.js +10 -49
- package/dist/utils/load-images/load-original-images.js +23 -37
- package/dist/utils/load-images/pad.js +0 -2
- package/dist/utils/load-images/preload-images.js +2 -9
- package/dist/utils/load-images/preload-original-images.js +2 -9
- package/dist/utils/magnify/get-current-original-image.js +0 -6
- package/dist/utils/magnify/get-cursor-position.js +0 -2
- package/dist/utils/magnify/magnify.js +4 -11
- package/dist/utils/magnify/move-magnifier.js +6 -14
- package/dist/utils/responsive/contain.js +0 -2
- package/dist/utils/responsive/fit.js +0 -4
- package/dist/utils/responsive/get-image-aspect-ratio.js +0 -8
- package/dist/utils/responsive/get-responsive-width-of-container.js +0 -3
- package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +0 -2
- package/dist/utils/responsive/get-size-limit.js +0 -2
- package/dist/utils/spin-y/get-moving-direction.js +0 -3
- package/dist/utils/zoom/generate-zoom-in-steps.js +0 -2
- package/dist/utils/zoom/generate-zoom-out-steps.js +0 -2
- package/package.json +2 -2
- package/yarn-error.log +27 -6779
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.preloadImages = void 0;
|
|
7
|
-
|
|
8
7
|
var _loadImagesRelativeToContainerSize = require("./load-images-relative-to-container-size");
|
|
9
|
-
|
|
10
8
|
var _prepareImagesFromFolder = require("./images-from-folder/prepare-images-from-folder");
|
|
11
|
-
|
|
12
9
|
var _prepareImagesFromList = require("./images-from-list/prepare-images-from-list");
|
|
13
|
-
|
|
14
10
|
/* eslint-disable no-console */
|
|
11
|
+
|
|
15
12
|
var preloadImages = function preloadImages(srcConfig, imagesSrc, cb) {
|
|
16
13
|
var _ref = srcConfig || {},
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
imageList = _ref.imageList;
|
|
19
15
|
var imagesSrcs = [];
|
|
20
|
-
|
|
21
16
|
if (imageList) {
|
|
22
17
|
try {
|
|
23
18
|
var images = JSON.parse(imageList);
|
|
@@ -28,8 +23,6 @@ var preloadImages = function preloadImages(srcConfig, imagesSrc, cb) {
|
|
|
28
23
|
} else {
|
|
29
24
|
imagesSrcs = (0, _prepareImagesFromFolder.prepareImagesFromFolder)(imagesSrc, srcConfig);
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
(0, _loadImagesRelativeToContainerSize.loadImagesRelativeToContainerSize)(imagesSrcs, cb);
|
|
33
27
|
};
|
|
34
|
-
|
|
35
28
|
exports.preloadImages = preloadImages;
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.preloadOriginalImages = void 0;
|
|
7
|
-
|
|
8
7
|
var _prepareImagesFromFolder = require("./images-from-folder/prepare-images-from-folder");
|
|
9
|
-
|
|
10
8
|
var _prepareImagesFromList = require("./images-from-list/prepare-images-from-list");
|
|
11
|
-
|
|
12
9
|
var _loadOriginalImages = require("./load-original-images");
|
|
13
|
-
|
|
14
10
|
/* eslint-disable no-console */
|
|
11
|
+
|
|
15
12
|
var preloadOriginalImages = function preloadOriginalImages(srcConfig, imagesSrc, cb) {
|
|
16
13
|
var _ref = srcConfig || {},
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
imageList = _ref.imageList;
|
|
19
15
|
var imagesSrcs = [];
|
|
20
|
-
|
|
21
16
|
if (imageList) {
|
|
22
17
|
try {
|
|
23
18
|
var images = JSON.parse(imageList);
|
|
@@ -28,8 +23,6 @@ var preloadOriginalImages = function preloadOriginalImages(srcConfig, imagesSrc,
|
|
|
28
23
|
} else {
|
|
29
24
|
imagesSrcs = (0, _prepareImagesFromFolder.prepareImagesFromFolder)(imagesSrc, srcConfig, true);
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
(0, _loadOriginalImages.loadOriginalImages)(imagesSrcs, cb);
|
|
33
27
|
};
|
|
34
|
-
|
|
35
28
|
exports.preloadOriginalImages = preloadOriginalImages;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getCurrentOriginalImage = void 0;
|
|
7
|
-
|
|
8
7
|
var _orientations = require("../../constants/orientations");
|
|
9
|
-
|
|
10
8
|
var _regex = require("../../constants/regex");
|
|
11
|
-
|
|
12
9
|
var getCurrentOriginalImage = function getCurrentOriginalImage(movingDirection, imagesX, imagesY, activeImageX, activeImageY) {
|
|
13
10
|
var currentImage = new Image();
|
|
14
11
|
var originalImagesXSrcs = imagesX.map(function (image) {
|
|
@@ -18,12 +15,9 @@ var getCurrentOriginalImage = function getCurrentOriginalImage(movingDirection,
|
|
|
18
15
|
return image.src.replace(_regex.ORGINAL_SIZE_REGEX, '').replace(_regex.AND_SYMBOL_REGEX, '?');
|
|
19
16
|
});
|
|
20
17
|
currentImage.src = originalImagesXSrcs[activeImageX - 1];
|
|
21
|
-
|
|
22
18
|
if (movingDirection === _orientations.ORIENTATIONS.Y) {
|
|
23
19
|
currentImage.src = originalImagesYSrcs[activeImageY - 1];
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
return currentImage;
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
exports.getCurrentOriginalImage = getCurrentOriginalImage;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getCursorPosition = void 0;
|
|
7
|
-
|
|
8
7
|
var getCursorPosition = function getCursorPosition() {
|
|
9
8
|
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;
|
|
10
9
|
var container = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -20,5 +19,4 @@ var getCursorPosition = function getCursorPosition() {
|
|
|
20
19
|
y: y
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
|
-
|
|
24
22
|
exports.getCursorPosition = getCursorPosition;
|
|
@@ -4,16 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.magnify = void 0;
|
|
7
|
-
|
|
8
7
|
var _moveMagnifier = require("./move-magnifier");
|
|
9
|
-
|
|
10
8
|
var magnify = function magnify(container, offset, currentImage, glass, zoom) {
|
|
11
9
|
var _ref = offset || {},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
_ref$x = _ref.x,
|
|
11
|
+
offsetX = _ref$x === void 0 ? 0 : _ref$x,
|
|
12
|
+
_ref$y = _ref.y,
|
|
13
|
+
offsetY = _ref$y === void 0 ? 0 : _ref$y;
|
|
17
14
|
var backgroundSizeX = (container.offsetWidth - offsetX * 2) * zoom;
|
|
18
15
|
var backgroundSizeY = (container.offsetHeight - offsetY * 2) * zoom;
|
|
19
16
|
glass.setAttribute('class', 'cloudimage-360-img-magnifier-glass');
|
|
@@ -32,15 +29,12 @@ var magnify = function magnify(container, offset, currentImage, glass, zoom) {
|
|
|
32
29
|
offsetX: offsetX,
|
|
33
30
|
offsetY: offsetY
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
var MouseMoveHandler = function MouseMoveHandler(event) {
|
|
37
33
|
(0, _moveMagnifier.moveMagnifier)(event, containerConfig, glass);
|
|
38
34
|
};
|
|
39
|
-
|
|
40
35
|
var touchHandler = function touchHandler(event) {
|
|
41
36
|
(0, _moveMagnifier.moveMagnifier)(event, containerConfig, glass);
|
|
42
37
|
};
|
|
43
|
-
|
|
44
38
|
glass.addEventListener('mousemove', MouseMoveHandler);
|
|
45
39
|
container.addEventListener('mousemove', MouseMoveHandler);
|
|
46
40
|
glass.addEventListener('touchmove', touchHandler, {
|
|
@@ -50,5 +44,4 @@ var magnify = function magnify(container, offset, currentImage, glass, zoom) {
|
|
|
50
44
|
passive: true
|
|
51
45
|
});
|
|
52
46
|
};
|
|
53
|
-
|
|
54
47
|
exports.magnify = magnify;
|
|
@@ -4,44 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.moveMagnifier = void 0;
|
|
7
|
-
|
|
8
7
|
var _getCursorPosition = require("./get-cursor-position");
|
|
9
|
-
|
|
10
8
|
var moveMagnifier = function moveMagnifier(e, containerConfig, glass) {
|
|
11
9
|
var container = containerConfig.container,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
w = containerConfig.w,
|
|
11
|
+
h = containerConfig.h,
|
|
12
|
+
zoom = containerConfig.zoom,
|
|
13
|
+
bw = containerConfig.bw,
|
|
14
|
+
offsetX = containerConfig.offsetX,
|
|
15
|
+
offsetY = containerConfig.offsetY;
|
|
18
16
|
var x;
|
|
19
17
|
var y;
|
|
20
18
|
var pos = (0, _getCursorPosition.getCursorPosition)(e, container);
|
|
21
19
|
x = pos.x;
|
|
22
20
|
y = pos.y;
|
|
23
|
-
|
|
24
21
|
if (x > container.offsetWidth - w / zoom) {
|
|
25
22
|
x = container.offsetWidth - w / zoom;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
if (x < w / zoom) {
|
|
29
25
|
x = w / zoom;
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
if (y > container.offsetHeight - h / zoom) {
|
|
33
28
|
y = container.offsetHeight - h / zoom;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
if (y < h / zoom) {
|
|
37
31
|
y = h / zoom;
|
|
38
32
|
}
|
|
39
|
-
|
|
40
33
|
glass.style.left = "".concat(x - w, "px");
|
|
41
34
|
glass.style.top = "".concat(y - h, "px");
|
|
42
35
|
var backgroundPosX = (x - offsetX) * zoom - w + bw;
|
|
43
36
|
var backgroundPosY = (y - offsetY) * zoom - h + bw;
|
|
44
37
|
glass.style.backgroundPosition = "-".concat(backgroundPosX, "px -").concat(backgroundPosY, "px");
|
|
45
38
|
};
|
|
46
|
-
|
|
47
39
|
exports.moveMagnifier = moveMagnifier;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.fit = void 0;
|
|
7
|
-
|
|
8
7
|
var fit = function fit(contains) {
|
|
9
8
|
return function (parentWidth, parentHeight, childWidth, childHeight) {
|
|
10
9
|
var scale = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
@@ -14,13 +13,11 @@ var fit = function fit(contains) {
|
|
|
14
13
|
var parentRatio = parentWidth / parentHeight;
|
|
15
14
|
var width = parentWidth * scale;
|
|
16
15
|
var height = parentHeight * scale;
|
|
17
|
-
|
|
18
16
|
if (contains ? childRatio > parentRatio : childRatio < parentRatio) {
|
|
19
17
|
height = width / childRatio;
|
|
20
18
|
} else {
|
|
21
19
|
width = height * childRatio;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
return {
|
|
25
22
|
width: width,
|
|
26
23
|
height: height,
|
|
@@ -29,5 +26,4 @@ var fit = function fit(contains) {
|
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
28
|
};
|
|
32
|
-
|
|
33
29
|
exports.fit = fit;
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.getImageAspectRatio = void 0;
|
|
9
|
-
|
|
10
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
9
|
var getImageAspectRatio = function getImageAspectRatio(image, providedRatio) {
|
|
13
10
|
try {
|
|
14
11
|
var imageAspectRatio = image.width / image.height;
|
|
15
|
-
|
|
16
12
|
if (typeof providedRatio === 'number') {
|
|
17
13
|
imageAspectRatio = providedRatio;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
if (providedRatio && (0, _typeof2.default)(providedRatio) === 'object') {
|
|
21
16
|
var mediaQueries = Object.keys(providedRatio).sort(function (a, b) {
|
|
22
17
|
return a - b;
|
|
@@ -24,16 +19,13 @@ var getImageAspectRatio = function getImageAspectRatio(image, providedRatio) {
|
|
|
24
19
|
var activeMedia = mediaQueries.find(function (mediaQuery) {
|
|
25
20
|
return window.innerWidth <= parseInt(mediaQuery, 10);
|
|
26
21
|
});
|
|
27
|
-
|
|
28
22
|
if (activeMedia) {
|
|
29
23
|
imageAspectRatio = providedRatio[activeMedia];
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
return imageAspectRatio;
|
|
34
27
|
} catch (_unused) {
|
|
35
28
|
return 1;
|
|
36
29
|
}
|
|
37
30
|
};
|
|
38
|
-
|
|
39
31
|
exports.getImageAspectRatio = getImageAspectRatio;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getResponsiveWidthOfContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _getSizeLimit = require("./get-size-limit");
|
|
9
|
-
|
|
10
8
|
var getResponsiveWidthOfContainer = function getResponsiveWidthOfContainer(width) {
|
|
11
9
|
return (0, _getSizeLimit.getSizeLimit)(width);
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
exports.getResponsiveWidthOfContainer = getResponsiveWidthOfContainer;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getSizeAccordingToPixelRatio = void 0;
|
|
7
|
-
|
|
8
7
|
var getSizeAccordingToPixelRatio = function getSizeAccordingToPixelRatio(size) {
|
|
9
8
|
var splittedSizes = size.toString().split('x');
|
|
10
9
|
var result = [];
|
|
@@ -13,5 +12,4 @@ var getSizeAccordingToPixelRatio = function getSizeAccordingToPixelRatio(size) {
|
|
|
13
12
|
});
|
|
14
13
|
return result.join('x');
|
|
15
14
|
};
|
|
16
|
-
|
|
17
15
|
exports.getSizeAccordingToPixelRatio = getSizeAccordingToPixelRatio;
|
|
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getSizeLimit = void 0;
|
|
7
|
-
|
|
8
7
|
var getSizeLimit = function getSizeLimit(currentSize) {
|
|
9
8
|
if (currentSize <= 25) return '25';
|
|
10
9
|
if (currentSize <= 50) return '50';
|
|
11
10
|
return (Math.ceil(currentSize / 100) * 100).toString();
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
exports.getSizeLimit = getSizeLimit;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getMovingDirection = void 0;
|
|
7
|
-
|
|
8
7
|
var _orientations = require("../../constants/orientations");
|
|
9
|
-
|
|
10
8
|
var getMovingDirection = function getMovingDirection(isStartSpin, allowSpinY, prevPosition, nextPositions, currentMovingDirection) {
|
|
11
9
|
var movingDirection = _orientations.ORIENTATIONS.CENTER;
|
|
12
10
|
if (isStartSpin) return currentMovingDirection;
|
|
@@ -17,5 +15,4 @@ var getMovingDirection = function getMovingDirection(isStartSpin, allowSpinY, pr
|
|
|
17
15
|
if (differenceInPositionY > sensitivity && allowSpinY) movingDirection = _orientations.ORIENTATIONS.Y;
|
|
18
16
|
return movingDirection;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
exports.getMovingDirection = getMovingDirection;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.generateZoomInSteps = void 0;
|
|
7
|
-
|
|
8
7
|
var generateZoomInSteps = function generateZoomInSteps(zoomIntenisty) {
|
|
9
8
|
var transitionStepsFactor = 20;
|
|
10
9
|
return Array.from(Array(transitionStepsFactor)).reduce(function (acc, _, index) {
|
|
@@ -16,5 +15,4 @@ var generateZoomInSteps = function generateZoomInSteps(zoomIntenisty) {
|
|
|
16
15
|
return acc;
|
|
17
16
|
}, []);
|
|
18
17
|
};
|
|
19
|
-
|
|
20
18
|
exports.generateZoomInSteps = generateZoomInSteps;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.generateZoomOutSteps = void 0;
|
|
7
|
-
|
|
8
7
|
var generateZoomOutSteps = function generateZoomOutSteps(zoomIntenisty) {
|
|
9
8
|
var transitionStepsFactor = 20;
|
|
10
9
|
return Array.from(Array(transitionStepsFactor)).reduce(function (acc, _, index) {
|
|
@@ -16,5 +15,4 @@ var generateZoomOutSteps = function generateZoomOutSteps(zoomIntenisty) {
|
|
|
16
15
|
return acc;
|
|
17
16
|
}, []);
|
|
18
17
|
};
|
|
19
|
-
|
|
20
18
|
exports.generateZoomOutSteps = generateZoomOutSteps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-cloudimage-360-view",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "scaleflex",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"clean:demo": "rm -rf examples/dist",
|
|
32
32
|
"build:demo": "npm run clean:demo && webpack --mode production --config config/webpack-demo.config.js",
|
|
33
33
|
"deploy:demo": "gh-pages -d examples/dist",
|
|
34
|
-
"publish:demo": "npm run build
|
|
34
|
+
"publish:demo": "npm run build:demo && npm run deploy:demo"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.17.0",
|