|
@@ -5,6 +5,7 @@ import { floorplanService } from "./Service/FloorplanService";
|
|
|
import { tagService } from "./Service/TagService";
|
|
|
import { tableService } from "./Service/TableService";
|
|
|
import { historyService } from "./Service/HistoryService";
|
|
|
+import { throttle } from "@/util";
|
|
|
|
|
|
import UIControl from "./Controls/UIControl";
|
|
|
import { moveTag } from "./Controls/MoveTag";
|
|
@@ -39,7 +40,6 @@ import { customImageService } from "./Service/CustomImageService.js";
|
|
|
import { moveCustomImage } from "./Controls/MoveCustomImage.js";
|
|
|
import { moveBgImage } from "./Controls/MoveBgImage.js";
|
|
|
import { rectangleService } from "./Service/RectangleService.js";
|
|
|
-
|
|
|
export default class Layer {
|
|
|
constructor() {
|
|
|
//super()
|
|
@@ -82,7 +82,6 @@ export default class Layer {
|
|
|
this.canvas.addEventListener("mousewheel", this.onWheel.bind(this));
|
|
|
this.canvas.addEventListener("DOMMouseScroll", this.onWheel.bind(this));
|
|
|
}
|
|
|
-
|
|
|
onMouseDown(e) {
|
|
|
this.startX = e.offsetX || e.layerX;
|
|
|
this.startY = e.offsetY || e.layerY;
|
|
@@ -162,6 +161,7 @@ export default class Layer {
|
|
|
}
|
|
|
|
|
|
onMouseMove(e) {
|
|
|
+ console.log("mousemove", e);
|
|
|
const X = e.offsetX || e.layerX;
|
|
|
const Y = e.offsetY || e.layerY;
|
|
|
if (this.lastX == null) {
|
|
@@ -990,7 +990,8 @@ export default class Layer {
|
|
|
history.save();
|
|
|
}
|
|
|
else if(eventName == LayerEvents.AddingIcon){
|
|
|
- floorplanService.deleteIcon(addIcon.currentVectorId);
|
|
|
+ //floorplanService.deleteIcon(addIcon.currentVectorId);
|
|
|
+ iconService.deleteIcon(addIcon.currentVectorId);
|
|
|
stateService.clearEventName();
|
|
|
addIcon.clear();
|
|
|
history.save();
|