@inweb/viewer-three 26.10.4 → 26.10.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-three",
3
- "version": "26.10.4",
3
+ "version": "26.10.5",
4
4
  "description": "JavaScript library for rendering CAD and BIM files in a browser using Three.js",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -35,18 +35,18 @@
35
35
  "docs": "typedoc"
36
36
  },
37
37
  "dependencies": {
38
- "@inweb/client": "~26.10.4",
39
- "@inweb/eventemitter2": "~26.10.4",
40
- "@inweb/markup": "~26.10.4",
41
- "@inweb/viewer-core": "~26.10.4"
38
+ "@inweb/client": "~26.10.5",
39
+ "@inweb/eventemitter2": "~26.10.5",
40
+ "@inweb/markup": "~26.10.5",
41
+ "@inweb/viewer-core": "~26.10.5"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/three": "^0.179.0",
44
+ "@types/three": "^0.180.0",
45
45
  "potree-core": "^2.0.11",
46
- "three": "^0.179.1"
46
+ "three": "^0.180.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@types/three": "^0.179.0",
50
- "three": "^0.179.1"
49
+ "@types/three": "^0.180.0",
50
+ "three": "^0.180.0"
51
51
  }
52
52
  }
@@ -30,7 +30,7 @@
30
30
  // published under MIT license
31
31
 
32
32
  /* eslint-disable lines-between-class-members */
33
- /* eslint-disable @typescript-eslint/no-unused-vars */
33
+ /* eslint-disable no-unused-vars */
34
34
  /* eslint-disable prefer-const */
35
35
  /* eslint-disable no-useless-catch */
36
36
 
@@ -285,7 +285,6 @@ class OrbitControls extends EventDispatcher {
285
285
  // internals
286
286
  //
287
287
 
288
- // eslint-disable-next-line @typescript-eslint/no-this-alias
289
288
  const scope = this;
290
289
 
291
290
  scope.state = STATE.NONE;
@@ -367,7 +367,7 @@ class MeasureOverlay {
367
367
  if (!this.canvas.parentElement) return;
368
368
 
369
369
  this.canvas.parentElement.appendChild(this.container);
370
- this.resizeObserver.observe(this.canvas.parentElement);
370
+ this.resizeObserver.observe(this.canvas);
371
371
  }
372
372
 
373
373
  dispose() {
@@ -403,13 +403,16 @@ class MeasureOverlay {
403
403
  this.lines = this.lines.filter((x) => x !== line);
404
404
  }
405
405
 
406
- resizeContainer = (entries: ResizeObserverEntry[]) => {
407
- const { width, height } = entries[0].contentRect;
406
+ resizeContainer = () => {
407
+ const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = this.canvas;
408
408
 
409
- if (!width || !height) return; // <- invisible canvas, or canvas with parent removed
409
+ if (!offsetWidth || !offsetHeight) return; // <- invisible canvas, or canvas with parent removed
410
410
 
411
- this.container.style.width = `${width}px`;
412
- this.container.style.height = `${height}px`;
411
+ this.container.style.left = `${offsetLeft}px`;
412
+ this.container.style.top = `${offsetTop}px`;
413
+
414
+ this.container.style.width = `${offsetWidth}px`;
415
+ this.container.style.height = `${offsetHeight}px`;
413
416
  };
414
417
  }
415
418