chili3d 0.7.11 → 0.7.12

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.
Files changed (2) hide show
  1. package/index.js +18 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -87403,7 +87403,13 @@ class LayoutViewport extends HTMLElement {
87403
87403
  };
87404
87404
  createViewport(view) {
87405
87405
  const viewport = new Viewport(view, this.showViewControls);
87406
- viewport.classList.add(layoutViewport_style.viewport, layoutViewport_style.hidden);
87406
+ // 只添加非空的样式类名
87407
+ if (layoutViewport_style.viewport) {
87408
+ viewport.classList.add(layoutViewport_style.viewport);
87409
+ }
87410
+ if (layoutViewport_style.hidden) {
87411
+ viewport.classList.add(layoutViewport_style.hidden);
87412
+ }
87407
87413
  this.appendChild(viewport);
87408
87414
  this._viewports.set(view, viewport);
87409
87415
  return viewport;
@@ -87411,9 +87417,15 @@ class LayoutViewport extends HTMLElement {
87411
87417
  _handleActiveViewChanged = (view)=>{
87412
87418
  this._viewports.forEach((v)=>{
87413
87419
  if (v.view === view) {
87414
- v.classList.remove(layoutViewport_style.hidden);
87420
+ // 只移除非空的样式类名
87421
+ if (layoutViewport_style.hidden) {
87422
+ v.classList.remove(layoutViewport_style.hidden);
87423
+ }
87415
87424
  } else {
87416
- v.classList.add(layoutViewport_style.hidden);
87425
+ // 只添加非空的样式类名
87426
+ if (layoutViewport_style.hidden) {
87427
+ v.classList.add(layoutViewport_style.hidden);
87428
+ }
87417
87429
  }
87418
87430
  });
87419
87431
  };
@@ -87486,7 +87498,9 @@ class Editor extends HTMLElement {
87486
87498
  super(), this.app = app;
87487
87499
  this.ribbonContent = new RibbonDataContent(app, editor_quickCommands, tabs.map(RibbonTabData.fromProfile));
87488
87500
  const viewport = new LayoutViewport(app);
87489
- viewport.classList.add(editor_style.viewport);
87501
+ if (editor_style.viewport) {
87502
+ viewport.classList.add(editor_style.viewport);
87503
+ }
87490
87504
  this._selectionController = new OKCancel();
87491
87505
  this._viewportContainer = div({
87492
87506
  className: editor_style.viewportContainer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chili3d",
3
- "version": "0.7.11",
3
+ "version": "0.7.12",
4
4
  "description": "Chili3D - A 3D modeling and visualization framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",