mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: simplify zoom by removing zoom.translation
(#4477)
This commit is contained in:
parent
e4edda4555
commit
79d323fab1
16 changed files with 152 additions and 408 deletions
|
@ -87,8 +87,8 @@ export class Keyboard {
|
|||
}
|
||||
|
||||
export class Pointer {
|
||||
private clientX = 0;
|
||||
private clientY = 0;
|
||||
public clientX = 0;
|
||||
public clientY = 0;
|
||||
|
||||
constructor(
|
||||
private readonly pointerType: "mouse" | "touch" | "pen",
|
||||
|
@ -156,7 +156,7 @@ export class Pointer {
|
|||
// absolute coords
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
moveTo(x: number, y: number) {
|
||||
moveTo(x: number = this.clientX, y: number = this.clientY) {
|
||||
this.clientX = x;
|
||||
this.clientY = y;
|
||||
fireEvent.pointerMove(GlobalTestState.canvas, this.getEvent());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue