ocp-viewer-core 1.0.3 → 1.0.4
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 +1 -1
- package/src/page.js +11 -0
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/page.js
CHANGED
|
@@ -484,6 +484,17 @@ export function createPage({
|
|
|
484
484
|
for (const key of applied) {
|
|
485
485
|
_config[key] = data.config[key];
|
|
486
486
|
}
|
|
487
|
+
// Glass and tools decide whether the tree sits over the canvas or
|
|
488
|
+
// beside it, and three-cad-viewer re-lays out with the `cadWidth`
|
|
489
|
+
// it was given: leaving glass mode grows the viewer by `treeWidth`
|
|
490
|
+
// where the canvas should have shrunk by it, so it overflows the
|
|
491
|
+
// pane until something else happens to resize it. The host owns
|
|
492
|
+
// the other two dimensions, so it re-derives all three here, the
|
|
493
|
+
// way a window resize does - `_config` carries the new value by
|
|
494
|
+
// now, which is what `normalizeWidth` reads.
|
|
495
|
+
if (applied.includes("glass") || applied.includes("tools")) {
|
|
496
|
+
resize();
|
|
497
|
+
}
|
|
487
498
|
} else if (data.type === "animation") {
|
|
488
499
|
// Explode goes off first: both transform the same objects,
|
|
489
500
|
// and animating an already-displaced model is wrong.
|
package/src/version.js
CHANGED