Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Apr 14, 2024
1 parent c9c0379 commit 725b5d8
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 66 deletions.
77 changes: 45 additions & 32 deletions dist/xeokit-bim-viewer.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -109024,20 +109024,22 @@ class Controller {
const numControllers = controllers.length;
for (let i = 0; i < numControllers; i++) {
const controller = controllers[i];
controller.on("active", (function () {
const _i = i;
return function (active) {
if (!active) {
return;
}
for (let j = 0; j < numControllers; j++) {
if (j === _i) {
continue;
if (controller) {
controller.on("active", (function () {
const _i = i;
return function (active) {
if (!active) {
return;
}
controllers[j].setActive(false);
}
};
})());
for (let j = 0; j < numControllers; j++) {
if (j === _i) {
continue;
}
controllers[j].setActive(false);
}
};
})());
}
}
}

Expand Down Expand Up @@ -113329,7 +113331,7 @@ class BIMViewer extends Controller {
// It is important to consider that each SectionPlane imposes rendering performance, so it is
// recommended to set this value to a quantity that aligns with your expected usage.

numCachedSectionPlanes :4
numCachedSectionPlanes: 4
});

super(null, cfg, server, viewer);
Expand Down Expand Up @@ -113496,15 +113498,18 @@ class BIMViewer extends Controller {
active: false
});

this._measureDistanceTool = new MeasureDistanceTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-distance"),
active: false
});
if (this._enableMeasurements) {

this._measureAngleTool = new MeasureAngleTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-angle"),
active: false
});
this._measureDistanceTool = new MeasureDistanceTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-distance"),
active: false
});

this._measureAngleTool = new MeasureAngleTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-angle"),
active: false
});
}

this._navCubeMode = new NavCubeMode(this, {
navCubeCanvasElement: navCubeCanvasElement,
Expand Down Expand Up @@ -113543,8 +113548,8 @@ class BIMViewer extends Controller {
this._selectionTool,
this._marqueeSelectionTool,
this._sectionTool,
this._measureDistanceTool,
this._measureAngleTool
this._enableMeasurements ? this._measureDistanceTool : null,
this._enableMeasurements ? this._measureAngleTool: null
]);

explorerElement.querySelector(".xeokit-showAllObjects").addEventListener("click", (event) => {
Expand Down Expand Up @@ -115008,8 +115013,10 @@ class BIMViewer extends Controller {
this._selectionTool.setEnabled(enabled);
this._marqueeSelectionTool.setEnabled(enabled);
this._showSpacesMode.setEnabled(enabled);
this._measureDistanceTool.setEnabled(enabled);
this._measureAngleTool.setEnabled(enabled);
if (this._enableMeasurements) {
this._measureDistanceTool.setEnabled(enabled);
this._measureAngleTool.setEnabled(enabled);
}
this._sectionTool.setEnabled(enabled);

if (this._enablePropertiesInspector) {
Expand Down Expand Up @@ -115104,8 +115111,10 @@ class BIMViewer extends Controller {
* Clears measurements.
*/
clearMeasurements() {
this._measureDistanceTool.clear();
this._measureAngleTool.clear();
if (this._enableMeasurements) {
this._measureDistanceTool.clear();
this._measureAngleTool.clear();
}
}

/**
Expand All @@ -115125,7 +115134,9 @@ class BIMViewer extends Controller {
* @param {Boolean} axisVisible Set `true` to show axis wires, else `false` to hide them.
*/
setMeasurementsAxisVisible(axisVisible) {
this._measureDistanceTool.setMeasurementsAxisVisible(axisVisible);
if (this._enableMeasurements) {
this._measureDistanceTool.setMeasurementsAxisVisible(axisVisible);
}
}

/**
Expand All @@ -115136,7 +115147,7 @@ class BIMViewer extends Controller {
* @returns {Boolean} `true` if axis wires are visible, else `false` if hidden.
*/
getMeasurementsAxisVisible() {
return this._measureDistanceTool.getMeasurementsAxisVisible();
return (this._enableMeasurements) ? this._measureDistanceTool.getMeasurementsAxisVisible() : false;
}

/**
Expand All @@ -115145,7 +115156,9 @@ class BIMViewer extends Controller {
* @param {Boolean} snappingEnabled Set `true` to enable snapping, else `false` to disable.
*/
setMeasurementsSnappingEnabled(snappingEnabled) {
this._measureDistanceTool.setSnappingEnabled(snappingEnabled);
if (this._enableMeasurements) {
this._measureDistanceTool.setSnappingEnabled(snappingEnabled);
}
}

/**
Expand All @@ -115154,7 +115167,7 @@ class BIMViewer extends Controller {
* @returns {Boolean} `true` if snapping is enabled, else `false` if disabled.
*/
getMeasurementsSnappingEnabled() {
return this._measureDistanceTool.getSnappingEnabled();
return (this._enableMeasurements) ? this._measureDistanceTool.getSnappingEnabled() : false;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/xeokit-bim-viewer.min.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xeokit-bim-viewer.min.umd.js

Large diffs are not rendered by default.

77 changes: 45 additions & 32 deletions dist/xeokit-bim-viewer.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -109030,20 +109030,22 @@
const numControllers = controllers.length;
for (let i = 0; i < numControllers; i++) {
const controller = controllers[i];
controller.on("active", (function () {
const _i = i;
return function (active) {
if (!active) {
return;
}
for (let j = 0; j < numControllers; j++) {
if (j === _i) {
continue;
if (controller) {
controller.on("active", (function () {
const _i = i;
return function (active) {
if (!active) {
return;
}
controllers[j].setActive(false);
}
};
})());
for (let j = 0; j < numControllers; j++) {
if (j === _i) {
continue;
}
controllers[j].setActive(false);
}
};
})());
}
}
}

Expand Down Expand Up @@ -113335,7 +113337,7 @@
// It is important to consider that each SectionPlane imposes rendering performance, so it is
// recommended to set this value to a quantity that aligns with your expected usage.

numCachedSectionPlanes :4
numCachedSectionPlanes: 4
});

super(null, cfg, server, viewer);
Expand Down Expand Up @@ -113502,15 +113504,18 @@
active: false
});

this._measureDistanceTool = new MeasureDistanceTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-distance"),
active: false
});
if (this._enableMeasurements) {

this._measureAngleTool = new MeasureAngleTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-angle"),
active: false
});
this._measureDistanceTool = new MeasureDistanceTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-distance"),
active: false
});

this._measureAngleTool = new MeasureAngleTool(this, {
buttonElement: toolbarElement.querySelector(".xeokit-measure-angle"),
active: false
});
}

this._navCubeMode = new NavCubeMode(this, {
navCubeCanvasElement: navCubeCanvasElement,
Expand Down Expand Up @@ -113549,8 +113554,8 @@
this._selectionTool,
this._marqueeSelectionTool,
this._sectionTool,
this._measureDistanceTool,
this._measureAngleTool
this._enableMeasurements ? this._measureDistanceTool : null,
this._enableMeasurements ? this._measureAngleTool: null
]);

explorerElement.querySelector(".xeokit-showAllObjects").addEventListener("click", (event) => {
Expand Down Expand Up @@ -115014,8 +115019,10 @@
this._selectionTool.setEnabled(enabled);
this._marqueeSelectionTool.setEnabled(enabled);
this._showSpacesMode.setEnabled(enabled);
this._measureDistanceTool.setEnabled(enabled);
this._measureAngleTool.setEnabled(enabled);
if (this._enableMeasurements) {
this._measureDistanceTool.setEnabled(enabled);
this._measureAngleTool.setEnabled(enabled);
}
this._sectionTool.setEnabled(enabled);

if (this._enablePropertiesInspector) {
Expand Down Expand Up @@ -115110,8 +115117,10 @@
* Clears measurements.
*/
clearMeasurements() {
this._measureDistanceTool.clear();
this._measureAngleTool.clear();
if (this._enableMeasurements) {
this._measureDistanceTool.clear();
this._measureAngleTool.clear();
}
}

/**
Expand All @@ -115131,7 +115140,9 @@
* @param {Boolean} axisVisible Set `true` to show axis wires, else `false` to hide them.
*/
setMeasurementsAxisVisible(axisVisible) {
this._measureDistanceTool.setMeasurementsAxisVisible(axisVisible);
if (this._enableMeasurements) {
this._measureDistanceTool.setMeasurementsAxisVisible(axisVisible);
}
}

/**
Expand All @@ -115142,7 +115153,7 @@
* @returns {Boolean} `true` if axis wires are visible, else `false` if hidden.
*/
getMeasurementsAxisVisible() {
return this._measureDistanceTool.getMeasurementsAxisVisible();
return (this._enableMeasurements) ? this._measureDistanceTool.getMeasurementsAxisVisible() : false;
}

/**
Expand All @@ -115151,7 +115162,9 @@
* @param {Boolean} snappingEnabled Set `true` to enable snapping, else `false` to disable.
*/
setMeasurementsSnappingEnabled(snappingEnabled) {
this._measureDistanceTool.setSnappingEnabled(snappingEnabled);
if (this._enableMeasurements) {
this._measureDistanceTool.setSnappingEnabled(snappingEnabled);
}
}

/**
Expand All @@ -115160,7 +115173,7 @@
* @returns {Boolean} `true` if snapping is enabled, else `false` if disabled.
*/
getMeasurementsSnappingEnabled() {
return this._measureDistanceTool.getSnappingEnabled();
return (this._enableMeasurements) ? this._measureDistanceTool.getSnappingEnabled() : false;
}

/**
Expand Down

0 comments on commit 725b5d8

Please sign in to comment.