three-cad-viewer 2.2.1 → 2.2.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.
|
@@ -62860,7 +62860,7 @@ class Camera {
|
|
|
62860
62860
|
}
|
|
62861
62861
|
}
|
|
62862
62862
|
|
|
62863
|
-
const version = "2.2.
|
|
62863
|
+
const version = "2.2.2";
|
|
62864
62864
|
|
|
62865
62865
|
class Viewer {
|
|
62866
62866
|
/**
|
|
@@ -63965,6 +63965,9 @@ class Viewer {
|
|
|
63965
63965
|
|
|
63966
63966
|
this.display.autoCollapse();
|
|
63967
63967
|
|
|
63968
|
+
// ensure all for all deselected objects the stencil planes are invisible
|
|
63969
|
+
this.setObjects(this.states, true, true);
|
|
63970
|
+
|
|
63968
63971
|
//
|
|
63969
63972
|
// show the rendering
|
|
63970
63973
|
//
|
|
@@ -64129,12 +64132,12 @@ class Viewer {
|
|
|
64129
64132
|
* @param {States} states
|
|
64130
64133
|
* @param {boolean} [notify=true] - whether to send notification or not.
|
|
64131
64134
|
*/
|
|
64132
|
-
setObjects = (states, notify = true) => {
|
|
64135
|
+
setObjects = (states, force = false, notify = true) => {
|
|
64133
64136
|
for (var key in this.states) {
|
|
64134
64137
|
var oldState = this.states[key];
|
|
64135
64138
|
var newState = states[key];
|
|
64136
64139
|
var objectGroup = this.nestedGroup.groups[key];
|
|
64137
|
-
if (oldState[0] != newState[0]) {
|
|
64140
|
+
if (force || oldState[0] != newState[0]) {
|
|
64138
64141
|
objectGroup.setShapeVisible(newState[0] === 1);
|
|
64139
64142
|
this.states[key][0] = newState[0];
|
|
64140
64143
|
}
|
|
@@ -64890,6 +64893,17 @@ class Viewer {
|
|
|
64890
64893
|
return this.states;
|
|
64891
64894
|
}
|
|
64892
64895
|
|
|
64896
|
+
/**
|
|
64897
|
+
* Get state of a treeview leafs for a path.
|
|
64898
|
+
* separator can be / or |
|
|
64899
|
+
* @param {string} path - path of the object
|
|
64900
|
+
* @returns {number[]} state value in the form of [mesh, edges] = [0/1, 0/1]
|
|
64901
|
+
**/
|
|
64902
|
+
getState(path) {
|
|
64903
|
+
var p = path.replaceAll("|", "/");
|
|
64904
|
+
return this.getStates()[p];
|
|
64905
|
+
}
|
|
64906
|
+
|
|
64893
64907
|
/**
|
|
64894
64908
|
* Set states of a treeview leafs
|
|
64895
64909
|
* @function
|