AddSVG.js 524 B

123456789101112131415161718192021222324252627
  1. import { mathUtil } from "../Util/MathUtil";
  2. import { svgService } from "../Service/SVGService";
  3. import { listenLayer } from "../ListenLayer";
  4. export default class AddSVG {
  5. constructor() {
  6. this.newSVG = null;
  7. this.center = null;
  8. }
  9. setCenter(value) {
  10. this.center = {};
  11. mathUtil.clonePoint(this.center, value);
  12. }
  13. buildSVG(center) {
  14. this.newSVG = svgService.create(center);
  15. }
  16. clear() {
  17. this.newSVG = null;
  18. this.center = null;
  19. }
  20. }
  21. const addSVG = new AddSVG();
  22. export { addSVG };