@smarterplan/ngx-smarterplan-core 1.1.9 → 1.1.10

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.
@@ -1556,28 +1556,30 @@ class MatterportService {
1556
1556
  this.getCursorPositionButton.style.display = 'none';
1557
1557
  };
1558
1558
  this.config = config;
1559
- // TODO: only for admins!
1560
- this.intervalCursorPointerPosition = setInterval(() => {
1561
- if (!this.poseMatterport) {
1562
- return;
1563
- }
1564
- const nextShow = this.poseMatterport.time + 1000;
1565
- if (new Date().getTime() > nextShow) {
1566
- if (this.cursorPositionButtonDisplayed) {
1559
+ // TODO: only for dev!
1560
+ if (document.location.href.indexOf('-dev') !== -1) {
1561
+ this.intervalCursorPointerPosition = setInterval(() => {
1562
+ if (!this.poseMatterport) {
1567
1563
  return;
1568
1564
  }
1569
- const size = {
1570
- w: this.container.clientWidth,
1571
- h: this.container.clientHeight,
1572
- };
1573
- const coord = this.sdk.Conversion.worldToScreen(this.poseMatterport.position, this.poseCamera, size);
1574
- this.getCursorPositionButton.style.left = `${coord.x - 25}px`;
1575
- this.getCursorPositionButton.style.top = `${coord.y - 22}px`;
1576
- this.getCursorPositionButton.style.display = 'block';
1577
- // this.textDisplayCursorPositionPanel.style.display = 'none';
1578
- this.cursorPositionButtonDisplayed = true;
1579
- }
1580
- }, 500);
1565
+ const nextShow = this.poseMatterport.time + 1000;
1566
+ if (new Date().getTime() > nextShow) {
1567
+ if (this.cursorPositionButtonDisplayed) {
1568
+ return;
1569
+ }
1570
+ const size = {
1571
+ w: this.container.clientWidth,
1572
+ h: this.container.clientHeight,
1573
+ };
1574
+ const coord = this.sdk.Conversion.worldToScreen(this.poseMatterport.position, this.poseCamera, size);
1575
+ this.getCursorPositionButton.style.left = `${coord.x - 25}px`;
1576
+ this.getCursorPositionButton.style.top = `${coord.y - 22}px`;
1577
+ this.getCursorPositionButton.style.display = 'block';
1578
+ // this.textDisplayCursorPositionPanel.style.display = 'none';
1579
+ this.cursorPositionButtonDisplayed = true;
1580
+ }
1581
+ }, 500);
1582
+ }
1581
1583
  }
1582
1584
  get currentSpaceID() {
1583
1585
  return this._currentSpaceID;
@@ -2608,7 +2610,10 @@ class MatterportService {
2608
2610
  if (this.getCursorPositionButton) {
2609
2611
  this.getCursorPositionButton.removeEventListener('auxclick', this.pointerMiddleClickHandler);
2610
2612
  }
2611
- clearInterval(this.intervalCursorPointerPosition);
2613
+ // TODO: only for dev!
2614
+ if (document.location.href.indexOf('-dev') !== -1) {
2615
+ clearInterval(this.intervalCursorPointerPosition);
2616
+ }
2612
2617
  }
2613
2618
  async removeForbiddenSweeps(forbiddenSweeps) {
2614
2619
  this.forbiddenSweeps = [...forbiddenSweeps];