Remove bug related to topography visiblity in clip box
This commit is contained in:
parent
618979ad52
commit
523cf0945a
2 changed files with 2 additions and 14 deletions
|
@ -166,13 +166,12 @@ export function Form() {
|
||||||
if (!sceneView) return;
|
if (!sceneView) return;
|
||||||
|
|
||||||
sceneView.toggleLayerVisibility(name);
|
sceneView.toggleLayerVisibility(name);
|
||||||
sceneView.dispatchChangeEvent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChangeTopography() {
|
function handleChangeTopography() {
|
||||||
if (!sceneView) return;
|
if (!sceneView) return;
|
||||||
|
|
||||||
sceneView.toggleTopography();
|
sceneView.toggleLayerVisibility("Topography");
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDrilling(e: ChangeEvent) {
|
function handleDrilling(e: ChangeEvent) {
|
||||||
|
|
|
@ -129,7 +129,7 @@ export class SceneView extends EventTarget {
|
||||||
|
|
||||||
if (capMeshGroup) {
|
if (capMeshGroup) {
|
||||||
for (const m of capMeshGroup.children) {
|
for (const m of capMeshGroup.children) {
|
||||||
if (m.name === layerName && m) {
|
if (m && m.name === layerName) {
|
||||||
m.visible = !m.visible;
|
m.visible = !m.visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,13 +171,6 @@ export class SceneView extends EventTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleTopography() {
|
|
||||||
const topo = this._scene.getObjectByName("Topography");
|
|
||||||
if (topo) {
|
|
||||||
topo.visible = !topo.visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private _onPointerClick(event: MouseEvent) {
|
private _onPointerClick(event: MouseEvent) {
|
||||||
// Convert screen position to NDC (-1 to +1 range)
|
// Convert screen position to NDC (-1 to +1 range)
|
||||||
const pointer = new Vector2();
|
const pointer = new Vector2();
|
||||||
|
@ -434,10 +427,6 @@ export class SceneView extends EventTarget {
|
||||||
this._resetClippingBox();
|
this._resetClippingBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatchChangeEvent() {
|
|
||||||
this._orbitControls.dispatchEvent({ type: "change" });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init(container: HTMLElement, modelId = MODEL_ID) {
|
async function init(container: HTMLElement, modelId = MODEL_ID) {
|
||||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue