Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Feb 2, 2024
1 parent 59dd18f commit d0951b4
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 35 deletions.
12 changes: 5 additions & 7 deletions dist/xeokit-bim-viewer.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -87153,7 +87153,6 @@ class MetaModel {
metaObject.metaModels = [];
}


for (let modelId in metaScene.metaModels) {
const metaModel = metaScene.metaModels[modelId];
for (let i = 0, len = metaModel.metaObjects.length; i < len; i++) {
Expand Down Expand Up @@ -87478,7 +87477,7 @@ class MetaScene {
if (metaModel.metaObjects) {
for (let i = 0, len = metaModel.metaObjects.length; i < len; i++) {
const metaObject = metaModel.metaObjects[i];
const type = metaObject.type;
metaObject.type;
const id = metaObject.id;
if (metaObject.metaModels.length === 1&& metaObject.metaModels[0].id === metaModelId) { // MetaObject owned only by this model, delete
delete this.metaObjects[id];
Expand Down Expand Up @@ -87553,7 +87552,6 @@ class MetaScene {
this.fire("metaModelDestroyed", metaModelId);
}


/**
* Gets the {@link MetaObject#id}s of the {@link MetaObject}s that have the given {@link MetaObject#type}.
*
Expand Down Expand Up @@ -102131,7 +102129,7 @@ class TreeViewPlugin extends Plugin {
buildingNode = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: metaObject.metaModels.length ===0 ? "na" : this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
title: (metaObject.metaModels.length === 0) ? "na" : this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
type: metaObjectType,
parent: null,
numEntities: 0,
Expand All @@ -102151,7 +102149,7 @@ class TreeViewPlugin extends Plugin {
storeyNode = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: metaObject.metaModels.length ===0 ? "na" :(metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
title: (metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
type: metaObjectType,
parent: buildingNode,
numEntities: 0,
Expand Down Expand Up @@ -102234,7 +102232,7 @@ class TreeViewPlugin extends Plugin {
rootNode = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
title: metaObject.metaModels.length === 0 ? "na" : this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
type: metaObjectType,
parent: null,
numEntities: 0,
Expand Down Expand Up @@ -102315,7 +102313,7 @@ class TreeViewPlugin extends Plugin {
const node = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: (!parent) ? (this._rootNames[metaObject.metaModels[0].id] || metaObjectName) : (metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
title: (!parent) ? metaObject.metaModels.length === 0 ? "na" : (this._rootNames[metaObject.metaModels[0].id] || metaObjectName) : (metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
type: metaObjectType,
parent: parent,
numEntities: 0,
Expand Down
4 changes: 2 additions & 2 deletions dist/xeokit-bim-viewer.min.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-bim-viewer.min.umd.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions dist/xeokit-bim-viewer.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -87088,9 +87088,9 @@
external: metaObjectData.external,
});
this.metaScene.metaObjects[id] = metaObject;
this.metaObjects.push(metaObject);
metaObject.metaModels = [];
}
metaObject.metaModels.push(this);
this.metaObjects.push(metaObject);
if (!metaObjectData.parent) {
this.rootMetaObjects.push(metaObject);
metaScene.rootMetaObjects[id] = metaObject;
Expand Down Expand Up @@ -87154,8 +87154,8 @@

// Relink MetaObjects to their MetaModels

for (let objectId in this.metaObjects) {
const metaObject = this.metaObjects[objectId];
for (let objectId in metaScene.metaObjects) {
const metaObject = metaScene.metaObjects[objectId];
metaObject.metaModels = [];
}

Expand Down Expand Up @@ -87450,11 +87450,11 @@
*
* Fires a "metaModelDestroyed" event with the value of the {@link MetaModel#id}.
*
* @param {String} id ID of the target {@link MetaModel}.
* @param {String} metaModelId ID of the target {@link MetaModel}.
*/
destroyMetaModel(id) {
destroyMetaModel(metaModelId) {

const metaModel = this.metaModels[id];
const metaModel = this.metaModels[metaModelId];
if (!metaModel) {
return;
}
Expand All @@ -87464,12 +87464,12 @@
if (metaModel.propertySets) {
for (let i = 0, len = metaModel.propertySets.length; i < len; i++) {
const propertySet = metaModel.propertySets[i];
if (propertySet.metaModels.length === 1) { // Property set owned by one model, delete
if (propertySet.metaModels.length === 1 && propertySet.metaModels[0].id === metaModelId) { // Property set owned only by this model, delete
delete this.propertySets[propertySet.id];
} else {
const newMetaModels = [];
for (let j = 0, lenj = propertySet.metaModels.length; j < lenj; j++) {
if (propertySet.metaModels[j].id !== id) {
if (propertySet.metaModels[j].id !== metaModelId) {
newMetaModels.push(propertySet.metaModels[j]);
}
}
Expand All @@ -87485,7 +87485,7 @@
const metaObject = metaModel.metaObjects[i];
metaObject.type;
const id = metaObject.id;
if (metaObject.metaModels.length === 1) { // MetaObject owned by one model, delete
if (metaObject.metaModels.length === 1&& metaObject.metaModels[0].id === metaModelId) { // MetaObject owned only by this model, delete
delete this.metaObjects[id];
if (!metaObject.parent) {
delete this.rootMetaObjects[id];
Expand Down Expand Up @@ -87538,7 +87538,7 @@
}
}

delete this.metaModels[id];
delete this.metaModels[metaModelId];

// Relink MetaObjects to their MetaModels

Expand All @@ -87555,7 +87555,7 @@
}
}

this.fire("metaModelDestroyed", id);
this.fire("metaModelDestroyed", metaModelId);
}

/**
Expand Down Expand Up @@ -102135,7 +102135,7 @@
buildingNode = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
title: (metaObject.metaModels.length === 0) ? "na" : this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
type: metaObjectType,
parent: null,
numEntities: 0,
Expand Down Expand Up @@ -102238,7 +102238,7 @@
rootNode = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
title: metaObject.metaModels.length === 0 ? "na" : this._rootNames[metaObject.metaModels[0].id] || ((metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType),
type: metaObjectType,
parent: null,
numEntities: 0,
Expand Down Expand Up @@ -102319,7 +102319,7 @@
const node = {
nodeId: `${this._id}-${objectId}`,
objectId: objectId,
title: (!parent) ? (this._rootNames[metaObject.metaModels[0].id] || metaObjectName) : (metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
title: (!parent) ? metaObject.metaModels.length === 0 ? "na" : (this._rootNames[metaObject.metaModels[0].id] || metaObjectName) : (metaObjectName && metaObjectName !== "" && metaObjectName !== "Undefined" && metaObjectName !== "Default") ? metaObjectName : metaObjectType,
type: metaObjectType,
parent: parent,
numEntities: 0,
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0951b4

Please sign in to comment.