@colijnit/homedecorator 256.1.32 → 256.1.33

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.
@@ -1749,9 +1749,10 @@
1749
1749
  };
1750
1750
  RelativePositionUtils.GetClientTouchPosition = function (event, canvas) {
1751
1751
  var touch = event.touches[0];
1752
- var x = touch.clientX;
1753
- var y = touch.clientY;
1754
- return new THREE__namespace.Vector2(x, y);
1752
+ var rect = canvas.getBoundingClientRect();
1753
+ var xOffset = touch.clientX - rect.left;
1754
+ var yOffset = touch.clientY - rect.top;
1755
+ return new THREE__namespace.Vector2(xOffset, yOffset);
1755
1756
  };
1756
1757
  RelativePositionUtils.GetElementRect = function (element, handleAppOffset) {
1757
1758
  var rect;
@@ -22664,6 +22665,7 @@
22664
22665
  case SceneEventState.ROTATING:
22665
22666
  this._clickDragged();
22666
22667
  this._markSceneToUpdate();
22668
+ this._eventService.objectMovingOrRotating.next();
22667
22669
  break;
22668
22670
  }
22669
22671
  }
@@ -22741,11 +22743,8 @@
22741
22743
  return this._intersectionService.getIntersections(mouseVector, objects, options);
22742
22744
  };
22743
22745
  SceneEventService.prototype._setMousePositionFromTouchEvent = function (event) {
22744
- var touch = event.touches[0];
22745
- if (touch) {
22746
- var canvas = event.target;
22747
- this._mousePosition.set(touch.pageX - (canvas ? canvas.offsetLeft : 0), touch.pageY - (canvas ? canvas.offsetTop : 0));
22748
- }
22746
+ var canvas = this._element;
22747
+ this._mousePosition = RelativePositionUtils.GetClientTouchPosition(event, canvas);
22749
22748
  };
22750
22749
  SceneEventService.prototype._touchStartEvent = function (event) {
22751
22750
  var _this = this;