22 lines
738 B
TypeScript
22 lines
738 B
TypeScript
import * as Types from "../../../../types/world/worldTypes";
|
|
|
|
function removeReferenceLine(
|
|
floorPlanGroup: Types.RefGroup,
|
|
ReferenceLineMesh: Types.RefMesh,
|
|
LineCreated: Types.RefBoolean,
|
|
line: Types.RefLine
|
|
): void {
|
|
|
|
////////// Removes Dangling reference line if the draw mode is ended or any other case //////////
|
|
|
|
line.current = [];
|
|
if (ReferenceLineMesh.current) {
|
|
(<any>ReferenceLineMesh.current.material).dispose();
|
|
(<any>ReferenceLineMesh.current.geometry).dispose();
|
|
floorPlanGroup.current.remove(ReferenceLineMesh.current);
|
|
LineCreated.current = false;
|
|
ReferenceLineMesh.current = undefined;
|
|
}
|
|
}
|
|
|
|
export default removeReferenceLine; |