import { mathUtil } from "../Util/MathUtil"; import { svgService } from "../Service/SVGService"; import { listenLayer } from "../ListenLayer"; export default class AddSVG { constructor() { this.newSVG = null; this.center = null; this.value = null; } setCenter(value) { this.center = {}; mathUtil.clonePoint(this.center, value); } setValue(value) { this.value = value; } buildSVG(center) { this.newSVG = svgService.create(center); listenLayer.clear(); } clear() { this.newSVG = null; this.center = null; this.value = null; } } const addSVG = new AddSVG(); export { addSVG };