import { mathUtil } from "../Util/MathUtil"; import { roadStructureService } from "../Service/RoadStructureService"; import { listenLayer } from "../ListenLayer"; export default class AddRoadStructure { constructor() { this.newRoadStructure = null; this.center = null; this.value = null; } // build(position) { // const roadStructure = uiService.getSelectRoadStructure(); // console.error(roadStructure) // } setCenter(value) { this.center = {}; mathUtil.clonePoint(this.center, value); } setValue(value) { this.value = value; } buildRoadStructure(center, type) { this.newRoadStructure = roadStructureService.create(center, type); listenLayer.clear(); } clear() { this.newRoadStructure = null; this.center = null; this.value = null; } } const addRoadStructure = new AddRoadStructure(); export { addRoadStructure };