import { mathUtil } from "../Util/MathUtil"; import { textService } from "../Service/TextService"; export default class AddText { constructor() { this.newText = null; this.center = null; this.value = null; } setCenter(value) { this.center = {}; mathUtil.clonePoint(this.center, value); } setValue(value) { this.value = value; } buildText(center) { this.newText = textService.create(center); listenLayer.clear(); this.clear(); } clear() { this.newText = null; this.center = null; this.value = null; } } const addText = new AddText(); export { addText };