three-cad-viewer 1.4.1 → 1.4.2
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/dist/three-cad-viewer.esm.js +15 -10
- package/dist/three-cad-viewer.esm.min.js +1 -1
- package/dist/three-cad-viewer.js +15 -10
- package/dist/three-cad-viewer.min.js +1 -1
- package/package.json +1 -1
- package/src/display.js +15 -10
|
@@ -51844,7 +51844,10 @@ class Display {
|
|
|
51844
51844
|
* @param {string} tab - name of the tab "tree" or "clip"
|
|
51845
51845
|
*/
|
|
51846
51846
|
selectTabByName(tab) {
|
|
51847
|
-
|
|
51847
|
+
if (!["clip", "tree"].includes(tab)) {
|
|
51848
|
+
return;
|
|
51849
|
+
}
|
|
51850
|
+
|
|
51848
51851
|
if (tab === "tree" && this.activeTab !== "tree") {
|
|
51849
51852
|
this.cadTree.style.display = "block";
|
|
51850
51853
|
this.cadTreeToggles.style.display = "block";
|
|
@@ -51855,24 +51858,26 @@ class Display {
|
|
|
51855
51858
|
var lastPlaneState = this.viewer.getClipPlaneHelpers();
|
|
51856
51859
|
this.viewer.setClipPlaneHelpers(false);
|
|
51857
51860
|
this.lastPlaneState = lastPlaneState;
|
|
51858
|
-
|
|
51859
|
-
}
|
|
51860
|
-
if (tab === "clip" && this.activeTab !== "clip") {
|
|
51861
|
+
} else if (tab === "clip" && this.activeTab !== "clip") {
|
|
51861
51862
|
this.cadTree.style.display = "none";
|
|
51862
51863
|
this.cadTreeToggles.style.display = "none";
|
|
51863
51864
|
this.cadClip.style.display = "block";
|
|
51864
51865
|
this.viewer.nestedGroup.setBackVisible(true);
|
|
51865
51866
|
this.viewer.setLocalClipping(true);
|
|
51866
51867
|
this.viewer.setClipPlaneHelpers(this.lastPlaneState);
|
|
51867
|
-
changed = true;
|
|
51868
51868
|
}
|
|
51869
51869
|
this.activeTab = tab;
|
|
51870
51870
|
this.viewer.checkChanges({ tab: tab });
|
|
51871
|
-
if (
|
|
51872
|
-
this.tabTree.classList.
|
|
51873
|
-
this.tabTree.classList.
|
|
51874
|
-
this.tabClip.classList.
|
|
51875
|
-
this.tabClip.classList.
|
|
51871
|
+
if (tab == "tree") {
|
|
51872
|
+
this.tabTree.classList.add("tcv_tab-selected");
|
|
51873
|
+
this.tabTree.classList.remove("tcv_tab-unselected");
|
|
51874
|
+
this.tabClip.classList.remove("tcv_tab-selected");
|
|
51875
|
+
this.tabClip.classList.add("tcv_tab-unselected");
|
|
51876
|
+
} else {
|
|
51877
|
+
this.tabTree.classList.remove("tcv_tab-selected");
|
|
51878
|
+
this.tabTree.classList.add("tcv_tab-unselected");
|
|
51879
|
+
this.tabClip.classList.add("tcv_tab-selected");
|
|
51880
|
+
this.tabClip.classList.remove("tcv_tab-unselected");
|
|
51876
51881
|
}
|
|
51877
51882
|
}
|
|
51878
51883
|
|