Compare commits

...

4 Commits

Author SHA1 Message Date
zsviczian
60a3584e86
change css back to original 2023-10-07 10:38:46 +02:00
zsviczian
fa0e653236
lint 2023-10-07 10:37:37 +02:00
zsviczian
16de3d9243
add svgContainer offset 2023-10-07 10:35:06 +02:00
zsviczian
c65d6506f7
fix lasertool offset 2023-10-07 08:49:32 +02:00
2 changed files with 7 additions and 1 deletions

View File

@ -106,6 +106,13 @@ export class LaserPathManager {
}
startPath(x: number, y: number) {
if (this.container) {
this.container.style.top = "0px";
this.container.style.left = "0px";
const { x, y } = this.container.getBoundingClientRect();
this.container.style.top = `${-y}px`;
this.container.style.left = `${-x}px`;
}
this.ownState.currentPath = instantiatePath();
this.ownState.currentPath.addPoint([x, y, performance.now()]);
this.updatePath(this.ownState);

View File

@ -6,7 +6,6 @@
position: fixed;
top: 0;
left: 0;
z-index: 2;
.LaserToolOverlayCanvas {