hart-estate-widget 0.0.65 → 0.0.66

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.
@@ -141,6 +141,17 @@ var RotationTab = function RotationTab(_ref) {
141
141
  setRotation(newRotation);
142
142
  };
143
143
 
144
+ var onChangeStep = function onChangeStep(index) {
145
+ var _controller$getTransf = controller.getTransform(),
146
+ scale = _controller$getTransf.scale;
147
+
148
+ controller.pause();
149
+ controller.zoomTo(0, 0, 1 / scale);
150
+ controller.moveTo(0, 0);
151
+ controller.resume();
152
+ setCurrentStep(index);
153
+ };
154
+
144
155
  (0, _react.useEffect)(function () {
145
156
  var threesixtyContainer = document.querySelector('.widget-tab__threesixty-container');
146
157
  var defaultContainer = document.querySelector('.widget-tab__isometry-container');
@@ -149,10 +160,6 @@ var RotationTab = function RotationTab(_ref) {
149
160
  beforeMouseDown: function beforeMouseDown(event) {
150
161
  return !event.shiftKey;
151
162
  },
152
- onDoubleClick: function onDoubleClick(e) {
153
- console.log(e);
154
- return true;
155
- },
156
163
  minZoom: 0.5,
157
164
  maxZoom: 3
158
165
  });
@@ -169,7 +176,7 @@ var RotationTab = function RotationTab(_ref) {
169
176
  images: images
170
177
  }), mode === _rotationModes.rotationModes.DEFAULT && /*#__PURE__*/_react.default.createElement(_DefaultView.default, {
171
178
  setActiveIndex: setActiveIndex,
172
- setCurrentStep: setCurrentStep,
179
+ setCurrentStep: onChangeStep,
173
180
  topViewImage: topViewImage,
174
181
  activeIndex: activeIndex,
175
182
  currentStep: currentStep,
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getDevicesByWidth = exports.deviceWidth = void 0;
7
7
  var deviceWidth = {
8
8
  smallMobile: 374,
9
- mobile: 545,
9
+ mobile: 670,
10
10
  tablet: 1100,
11
11
  laptop: 1440
12
12
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "HART Estate widget",
4
4
  "author": "HART",
5
5
  "keywords": [],
6
- "version": "0.0.65",
6
+ "version": "0.0.66",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "module": "build/index.js",