@xtctwins/tctwins-core 1.0.9 → 1.0.11

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.
@@ -12061,7 +12061,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12061
12061
 
12062
12062
  _initMarkerDiv() {
12063
12063
  const markerDiv = document.createElement('div');
12064
- markerDiv.setAttribute('id', 'myMarkerDiv');
12064
+ markerDiv.setAttribute('id', 'myAngleMeasureMarker');
12065
12065
  const canvas = this.scene.canvas.canvas;
12066
12066
  canvas.parentNode.insertBefore(markerDiv, canvas);
12067
12067
 
@@ -12079,10 +12079,10 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12079
12079
  }
12080
12080
 
12081
12081
  _destroyMarkerDiv() {
12082
- if (this._markerDiv) {
12083
- const element = document.getElementById('myMarkerDiv');
12082
+ if (this.markerDiv) {
12083
+ const element = document.getElementById('myAngleMeasureMarker');
12084
12084
  element.parentNode.removeChild(element);
12085
- this._markerDiv = null;
12085
+ this.markerDiv = null;
12086
12086
  }
12087
12087
  }
12088
12088
 
@@ -12368,7 +12368,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12368
12368
  if (this.pointerLens) {
12369
12369
  this.pointerLens.visible = false;
12370
12370
  }
12371
- if (this._markerDiv) {
12371
+ if (this.markerDiv) {
12372
12372
  this._destroyMarkerDiv();
12373
12373
  }
12374
12374
  this.reset();
@@ -85493,7 +85493,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
85493
85493
 
85494
85494
  _initMarkerDiv() {
85495
85495
  const markerDiv = document.createElement('div');
85496
- markerDiv.setAttribute('id', 'myMarkerDiv');
85496
+ markerDiv.setAttribute('id', 'myDistanceMarker');
85497
85497
  const canvas = this.scene.canvas.canvas;
85498
85498
  canvas.parentNode.insertBefore(markerDiv, canvas);
85499
85499
  markerDiv.style.background = "black";
@@ -85511,7 +85511,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
85511
85511
 
85512
85512
  _destroyMarkerDiv() {
85513
85513
  if (this._markerDiv) {
85514
- const element = document.getElementById('myMarkerDiv');
85514
+ const element = document.getElementById('myDistanceMarker');
85515
85515
  element.parentNode.removeChild(element);
85516
85516
  this._markerDiv = null;
85517
85517
  }
@@ -105195,6 +105195,7 @@ class Viewer {
105195
105195
  * that it does not clip huge models.
105196
105196
  * @param {Boolean} [cfg.colorTextureEnabled=true] Whether to enable base color texture rendering.
105197
105197
  * @param {Boolean} [cfg.pbrEnabled=false] Whether to enable physically-based rendering.
105198
+ * @param {Boolean} [cfg.edgesEnabled] Whether to show edges
105198
105199
  * @param {LocaleService} [cfg.localeService=null] Optional locale-based translation service.
105199
105200
  * @param {Boolean} [cfg.dtxEnabled=false] Whether to enable data texture-based (DTX) scene representation within the Viewer. When this is true, the Viewer will use data textures to
105200
105201
  * store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
@@ -122211,6 +122212,7 @@ class TreeViewPlugin extends Plugin {
122211
122212
  });
122212
122213
 
122213
122214
  this._switchExpandHandler = (event) => {
122215
+ this.fire("ExpandHandler",event);
122214
122216
  event.preventDefault();
122215
122217
  event.stopPropagation();
122216
122218
  const switchElement = event.target;
@@ -122218,6 +122220,7 @@ class TreeViewPlugin extends Plugin {
122218
122220
  };
122219
122221
 
122220
122222
  this._switchCollapseHandler = (event) => {
122223
+ this.fire("CollapseHandler",event);
122221
122224
  event.preventDefault();
122222
122225
  event.stopPropagation();
122223
122226
  const switchElement = event.target;
@@ -122225,6 +122228,7 @@ class TreeViewPlugin extends Plugin {
122225
122228
  };
122226
122229
 
122227
122230
  this._checkboxChangeHandler = (event) => {
122231
+ this.fire("checkBoxChanged",event);
122228
122232
  if (this._muteTreeEvents) {
122229
122233
  return;
122230
122234
  }
@@ -12057,7 +12057,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12057
12057
 
12058
12058
  _initMarkerDiv() {
12059
12059
  const markerDiv = document.createElement('div');
12060
- markerDiv.setAttribute('id', 'myMarkerDiv');
12060
+ markerDiv.setAttribute('id', 'myAngleMeasureMarker');
12061
12061
  const canvas = this.scene.canvas.canvas;
12062
12062
  canvas.parentNode.insertBefore(markerDiv, canvas);
12063
12063
 
@@ -12075,10 +12075,10 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12075
12075
  }
12076
12076
 
12077
12077
  _destroyMarkerDiv() {
12078
- if (this._markerDiv) {
12079
- const element = document.getElementById('myMarkerDiv');
12078
+ if (this.markerDiv) {
12079
+ const element = document.getElementById('myAngleMeasureMarker');
12080
12080
  element.parentNode.removeChild(element);
12081
- this._markerDiv = null;
12081
+ this.markerDiv = null;
12082
12082
  }
12083
12083
  }
12084
12084
 
@@ -12364,7 +12364,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
12364
12364
  if (this.pointerLens) {
12365
12365
  this.pointerLens.visible = false;
12366
12366
  }
12367
- if (this._markerDiv) {
12367
+ if (this.markerDiv) {
12368
12368
  this._destroyMarkerDiv();
12369
12369
  }
12370
12370
  this.reset();
@@ -85489,7 +85489,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
85489
85489
 
85490
85490
  _initMarkerDiv() {
85491
85491
  const markerDiv = document.createElement('div');
85492
- markerDiv.setAttribute('id', 'myMarkerDiv');
85492
+ markerDiv.setAttribute('id', 'myDistanceMarker');
85493
85493
  const canvas = this.scene.canvas.canvas;
85494
85494
  canvas.parentNode.insertBefore(markerDiv, canvas);
85495
85495
  markerDiv.style.background = "black";
@@ -85507,7 +85507,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
85507
85507
 
85508
85508
  _destroyMarkerDiv() {
85509
85509
  if (this._markerDiv) {
85510
- const element = document.getElementById('myMarkerDiv');
85510
+ const element = document.getElementById('myDistanceMarker');
85511
85511
  element.parentNode.removeChild(element);
85512
85512
  this._markerDiv = null;
85513
85513
  }
@@ -105191,6 +105191,7 @@ class Viewer {
105191
105191
  * that it does not clip huge models.
105192
105192
  * @param {Boolean} [cfg.colorTextureEnabled=true] Whether to enable base color texture rendering.
105193
105193
  * @param {Boolean} [cfg.pbrEnabled=false] Whether to enable physically-based rendering.
105194
+ * @param {Boolean} [cfg.edgesEnabled] Whether to show edges
105194
105195
  * @param {LocaleService} [cfg.localeService=null] Optional locale-based translation service.
105195
105196
  * @param {Boolean} [cfg.dtxEnabled=false] Whether to enable data texture-based (DTX) scene representation within the Viewer. When this is true, the Viewer will use data textures to
105196
105197
  * store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
@@ -122207,6 +122208,7 @@ class TreeViewPlugin extends Plugin {
122207
122208
  });
122208
122209
 
122209
122210
  this._switchExpandHandler = (event) => {
122211
+ this.fire("ExpandHandler",event);
122210
122212
  event.preventDefault();
122211
122213
  event.stopPropagation();
122212
122214
  const switchElement = event.target;
@@ -122214,6 +122216,7 @@ class TreeViewPlugin extends Plugin {
122214
122216
  };
122215
122217
 
122216
122218
  this._switchCollapseHandler = (event) => {
122219
+ this.fire("CollapseHandler",event);
122217
122220
  event.preventDefault();
122218
122221
  event.stopPropagation();
122219
122222
  const switchElement = event.target;
@@ -122221,6 +122224,7 @@ class TreeViewPlugin extends Plugin {
122221
122224
  };
122222
122225
 
122223
122226
  this._checkboxChangeHandler = (event) => {
122227
+ this.fire("checkBoxChanged",event);
122224
122228
  if (this._muteTreeEvents) {
122225
122229
  return;
122226
122230
  }
@@ -2957,7 +2957,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._cornerDot.s
2957
2957
  * @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
2958
2958
  * @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
2959
2959
  */function AngleMeasurementsMouseControl(angleMeasurementsPlugin){var _this18;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,AngleMeasurementsMouseControl);_this18=_super7.call(this,angleMeasurementsPlugin.viewer.scene);_this18.pointerLens=cfg.pointerLens;_this18._active=false;_this18._mouseState=MOUSE_FINDING_ORIGIN;_this18._currentAngleMeasurement=null;// init markerDiv element (think about making its style configurable)
2960
- _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothing=null;_this18._onPickedNothing=null;_this18._onPickedSurface=null;_this18._onInputMouseDown=null;_this18._onInputMouseUp=null;_this18._snapping=cfg.snapping!==false;_this18._attachPlugin(angleMeasurementsPlugin,cfg);return _this18;}_createClass(AngleMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myMarkerDiv');var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this.markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this._markerDiv){var element=document.getElementById('myMarkerDiv');element.parentNode.removeChild(element);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(angleMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
2960
+ _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothing=null;_this18._onPickedNothing=null;_this18._onPickedSurface=null;_this18._onInputMouseDown=null;_this18._onInputMouseUp=null;_this18._snapping=cfg.snapping!==false;_this18._attachPlugin(angleMeasurementsPlugin,cfg);return _this18;}_createClass(AngleMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myAngleMeasureMarker');var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this.markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this.markerDiv){var element=document.getElementById('myAngleMeasureMarker');element.parentNode.removeChild(element);this.markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(angleMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
2961
2961
  * The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsMouseControl.
2962
2962
  *
2963
2963
  * @type {AngleMeasurementsPlugin}
@@ -2992,7 +2992,7 @@ _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothi
2992
2992
  * Deactivates this AngleMeasurementsMouseControl, making it unresponsive to input.
2993
2993
  *
2994
2994
  * Destroys any {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl.
2995
- */},{key:"deactivate",value:function deactivate(){if(!this._active){return;}if(this.pointerLens){this.pointerLens.visible=false;}if(this._markerDiv){this._destroyMarkerDiv();}this.reset();var canvas=this.scene.canvas.canvas;canvas.removeEventListener("mousedown",this._onMouseDown);canvas.removeEventListener("mouseup",this._onMouseUp);var cameraControl=this.angleMeasurementsPlugin.viewer.cameraControl;cameraControl.off(this._onMouseHoverSurface);cameraControl.off(this._onPickedSurface);cameraControl.off(this._onHoverNothing);cameraControl.off(this._onPickedNothing);this._currentAngleMeasurement=null;this._active=false;}/**
2995
+ */},{key:"deactivate",value:function deactivate(){if(!this._active){return;}if(this.pointerLens){this.pointerLens.visible=false;}if(this.markerDiv){this._destroyMarkerDiv();}this.reset();var canvas=this.scene.canvas.canvas;canvas.removeEventListener("mousedown",this._onMouseDown);canvas.removeEventListener("mouseup",this._onMouseUp);var cameraControl=this.angleMeasurementsPlugin.viewer.cameraControl;cameraControl.off(this._onMouseHoverSurface);cameraControl.off(this._onPickedSurface);cameraControl.off(this._onHoverNothing);cameraControl.off(this._onPickedNothing);this._currentAngleMeasurement=null;this._active=false;}/**
2996
2996
  * Resets this AngleMeasurementsMouseControl.
2997
2997
  *
2998
2998
  * Destroys any {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl.
@@ -18930,7 +18930,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
18930
18930
  * @param [cfg] Configuration
18931
18931
  * @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
18932
18932
  * @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
18933
- */function DistanceMeasurementsMouseControl(distanceMeasurementsPlugin){var _this81;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurementsMouseControl);_this81=_super117.call(this,distanceMeasurementsPlugin.viewer.scene);_this81.pointerLens=cfg.pointerLens;_this81._active=false;_this81._currentDistanceMeasurement=null;_this81._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null};_this81._initMarkerDiv();_this81._onCameraControlHoverSnapOrSurface=null;_this81._onCameraControlHoverSnapOrSurfaceOff=null;_this81._onMouseDown=null;_this81._onMouseUp=null;_this81._onCanvasTouchStart=null;_this81._onCanvasTouchEnd=null;_this81._snapping=cfg.snapping!==false;_this81._mouseState=MOUSE_FIRST_CLICK_EXPECTED;_this81._attachPlugin(distanceMeasurementsPlugin,cfg);return _this81;}_createClass(DistanceMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myMarkerDiv');var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this._markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this._markerDiv){var element=document.getElementById('myMarkerDiv');element.parentNode.removeChild(element);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(distanceMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
18933
+ */function DistanceMeasurementsMouseControl(distanceMeasurementsPlugin){var _this81;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurementsMouseControl);_this81=_super117.call(this,distanceMeasurementsPlugin.viewer.scene);_this81.pointerLens=cfg.pointerLens;_this81._active=false;_this81._currentDistanceMeasurement=null;_this81._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null};_this81._initMarkerDiv();_this81._onCameraControlHoverSnapOrSurface=null;_this81._onCameraControlHoverSnapOrSurfaceOff=null;_this81._onMouseDown=null;_this81._onMouseUp=null;_this81._onCanvasTouchStart=null;_this81._onCanvasTouchEnd=null;_this81._snapping=cfg.snapping!==false;_this81._mouseState=MOUSE_FIRST_CLICK_EXPECTED;_this81._attachPlugin(distanceMeasurementsPlugin,cfg);return _this81;}_createClass(DistanceMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myDistanceMarker');var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this._markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this._markerDiv){var element=document.getElementById('myDistanceMarker');element.parentNode.removeChild(element);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(distanceMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
18934
18934
  * The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsMouseControl.
18935
18935
  * @type {DistanceMeasurementsPlugin}
18936
18936
  */this.distanceMeasurementsPlugin=distanceMeasurementsPlugin;/**
@@ -23695,6 +23695,7 @@ var documentBackgroundColor=ownerDocument.documentElement?parseColor(context,get
23695
23695
  * that it does not clip huge models.
23696
23696
  * @param {Boolean} [cfg.colorTextureEnabled=true] Whether to enable base color texture rendering.
23697
23697
  * @param {Boolean} [cfg.pbrEnabled=false] Whether to enable physically-based rendering.
23698
+ * @param {Boolean} [cfg.edgesEnabled] Whether to show edges
23698
23699
  * @param {LocaleService} [cfg.localeService=null] Optional locale-based translation service.
23699
23700
  * @param {Boolean} [cfg.dtxEnabled=false] Whether to enable data texture-based (DTX) scene representation within the Viewer. When this is true, the Viewer will use data textures to
23700
23701
  * store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
@@ -26436,7 +26437,7 @@ _this145._nodeNodes={};// Node ID -> Node
26436
26437
  _this145._rootNames={};// Node ID -> Root name
26437
26438
  _this145._sortNodes=cfg.sortNodes;_this145._pruneEmptyNodes=cfg.pruneEmptyNodes;_this145._showListItemElementId=null;_this145._renderService=cfg.renderService||new RenderService();if(!_this145._renderService){throw new Error('TreeViewPlugin: no render service set');}_this145._containerElement.oncontextmenu=function(e){e.preventDefault();};_this145._onObjectVisibility=_this145._viewer.scene.on("objectVisibility",function(entity){if(_this145._muteSceneEvents){return;}var objectId=entity.id;var node=_this145._objectNodes[objectId];if(!node){return;// Not in this tree
26438
26439
  }var visible=entity.visible;var updated=visible!==node.checked;if(!updated){return;}_this145._muteTreeEvents=true;node.checked=visible;if(visible){node.numVisibleEntities++;}else{node.numVisibleEntities--;}_this145._renderService.setCheckbox(node.nodeId,visible);var parent=node.parent;while(parent){parent.checked=visible;if(visible){parent.numVisibleEntities++;}else{parent.numVisibleEntities--;}_this145._renderService.setCheckbox(parent.nodeId,parent.numVisibleEntities>0);parent=parent.parent;}_this145._muteTreeEvents=false;});_this145._onObjectXrayed=_this145._viewer.scene.on('objectXRayed',function(entity){if(_this145._muteSceneEvents){return;}var objectId=entity.id;var node=_this145._objectNodes[objectId];if(!node){return;// Not in this tree
26439
- }_this145._muteTreeEvents=true;var xrayed=entity.xrayed;var updated=xrayed!==node.xrayed;if(!updated){return;}node.xrayed=xrayed;_this145._renderService.setXRayed(node.nodeId,xrayed);_this145._muteTreeEvents=false;});_this145._switchExpandHandler=function(event){event.preventDefault();event.stopPropagation();var switchElement=event.target;_this145._expandSwitchElement(switchElement);};_this145._switchCollapseHandler=function(event){event.preventDefault();event.stopPropagation();var switchElement=event.target;_this145._collapseSwitchElement(switchElement);};_this145._checkboxChangeHandler=function(event){if(_this145._muteTreeEvents){return;}_this145._muteSceneEvents=true;var checkbox=event.target;var visible=_this145._renderService.isChecked(checkbox);var nodeId=_this145._renderService.getIdFromCheckbox(checkbox);var checkedNode=_this145._nodeNodes[nodeId];var objects=_this145._viewer.scene.objects;var numUpdated=0;_this145._withNodeTree(checkedNode,function(node){var objectId=node.objectId;var entity=objects[objectId];var isLeaf=node.children.length===0;node.numVisibleEntities=visible?node.numEntities:0;if(isLeaf&&visible!==node.checked){numUpdated++;}node.checked=visible;_this145._renderService.setCheckbox(node.nodeId,visible);if(entity){entity.visible=visible;}});var parent=checkedNode.parent;while(parent){parent.checked=visible;if(visible){parent.numVisibleEntities+=numUpdated;}else{parent.numVisibleEntities-=numUpdated;}_this145._renderService.setCheckbox(parent.nodeId,parent.numVisibleEntities>0);parent=parent.parent;}_this145._muteSceneEvents=false;};_this145._hierarchy=cfg.hierarchy||"containment";_this145._autoExpandDepth=cfg.autoExpandDepth||0;if(_this145._autoAddModels){var modelIds=Object.keys(_this145.viewer.metaScene.metaModels);for(var _i565=0,len=modelIds.length;_i565<len;_i565++){var modelId=modelIds[_i565];var metaModel=_this145.viewer.metaScene.metaModels[modelId];if(metaModel.finalized){_this145.addModel(modelId);}}_this145.viewer.scene.on("modelLoaded",function(modelId){if(_this145.viewer.metaScene.metaModels[modelId]){_this145.addModel(modelId);}});}_this145.hierarchy=cfg.hierarchy;return _this145;}/**
26440
+ }_this145._muteTreeEvents=true;var xrayed=entity.xrayed;var updated=xrayed!==node.xrayed;if(!updated){return;}node.xrayed=xrayed;_this145._renderService.setXRayed(node.nodeId,xrayed);_this145._muteTreeEvents=false;});_this145._switchExpandHandler=function(event){_this145.fire("ExpandHandler",event);event.preventDefault();event.stopPropagation();var switchElement=event.target;_this145._expandSwitchElement(switchElement);};_this145._switchCollapseHandler=function(event){_this145.fire("CollapseHandler",event);event.preventDefault();event.stopPropagation();var switchElement=event.target;_this145._collapseSwitchElement(switchElement);};_this145._checkboxChangeHandler=function(event){_this145.fire("checkBoxChanged",event);if(_this145._muteTreeEvents){return;}_this145._muteSceneEvents=true;var checkbox=event.target;var visible=_this145._renderService.isChecked(checkbox);var nodeId=_this145._renderService.getIdFromCheckbox(checkbox);var checkedNode=_this145._nodeNodes[nodeId];var objects=_this145._viewer.scene.objects;var numUpdated=0;_this145._withNodeTree(checkedNode,function(node){var objectId=node.objectId;var entity=objects[objectId];var isLeaf=node.children.length===0;node.numVisibleEntities=visible?node.numEntities:0;if(isLeaf&&visible!==node.checked){numUpdated++;}node.checked=visible;_this145._renderService.setCheckbox(node.nodeId,visible);if(entity){entity.visible=visible;}});var parent=checkedNode.parent;while(parent){parent.checked=visible;if(visible){parent.numVisibleEntities+=numUpdated;}else{parent.numVisibleEntities-=numUpdated;}_this145._renderService.setCheckbox(parent.nodeId,parent.numVisibleEntities>0);parent=parent.parent;}_this145._muteSceneEvents=false;};_this145._hierarchy=cfg.hierarchy||"containment";_this145._autoExpandDepth=cfg.autoExpandDepth||0;if(_this145._autoAddModels){var modelIds=Object.keys(_this145.viewer.metaScene.metaModels);for(var _i565=0,len=modelIds.length;_i565<len;_i565++){var modelId=modelIds[_i565];var metaModel=_this145.viewer.metaScene.metaModels[modelId];if(metaModel.finalized){_this145.addModel(modelId);}}_this145.viewer.scene.on("modelLoaded",function(modelId){if(_this145.viewer.metaScene.metaModels[modelId]){_this145.addModel(modelId);}});}_this145.hierarchy=cfg.hierarchy;return _this145;}/**
26440
26441
  * Sets how the nodes are organized within this tree view.
26441
26442
  *
26442
26443
  * Accepted values are: