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:
|
179
|
+
setCurrentStep: onChangeStep,
|
173
180
|
topViewImage: topViewImage,
|
174
181
|
activeIndex: activeIndex,
|
175
182
|
currentStep: currentStep,
|