12345678910111213141516171819202122232425262728293031323334 |
- import { mathUtil } from "../Util/MathUtil";
- import { textService } from "../Service/TextService";
- import { listenLayer } from "../ListenLayer";
- 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();
- }
- clear() {
- this.newText = null;
- this.center = null;
- this.value = null;
- }
- }
- const addText = new AddText();
- export { addText };
|