Skip to content

Commit

Permalink
fix: length measurement visualization (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
HoyosJuan authored Jan 16, 2024
1 parent 83fc9ec commit 8997b2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
12 changes: 2 additions & 10 deletions resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -108684,12 +108684,7 @@ class SimpleDimensionLine {
this.label.visible = value;
this._endpoints[0].visible = value;
this._endpoints[1].visible = value;
if (value) {
this._components.scene.get().add(this._root);
}
else {
this._root.removeFromParent();
}
this._root.visible = value;
}
set endPoint(point) {
this.end = point;
Expand Down Expand Up @@ -108823,11 +108818,8 @@ class LengthMeasurement extends Component {
/** {@link Hideable.visible} */
set visible(value) {
this._visible = value;
if (!this._visible) {
this.enabled = false;
}
for (const dimension of this._measurements) {
dimension.visible = this._visible;
dimension.visible = value;
}
}
/**
Expand Down
5 changes: 1 addition & 4 deletions src/measurement/LengthMeasurement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ export class LengthMeasurement
/** {@link Hideable.visible} */
set visible(value: boolean) {
this._visible = value;
if (!this._visible) {
this.enabled = false;
}
for (const dimension of this._measurements) {
dimension.visible = this._visible;
dimension.visible = value;
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/measurement/LengthMeasurement/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ export class SimpleDimensionLine {
this.label.visible = value;
this._endpoints[0].visible = value;
this._endpoints[1].visible = value;
if (value) {
this._components.scene.get().add(this._root);
} else {
this._root.removeFromParent();
}
this._root.visible = value;
}

set endPoint(point: THREE.Vector3) {
Expand Down

0 comments on commit 8997b2a

Please sign in to comment.