fixed panning bug
This commit is contained in:
parent
4f1dfae696
commit
4f88d404d6
@ -120,6 +120,7 @@ export class Pointer {
|
||||
}
|
||||
|
||||
handlePointerDown({x: clientX, y: clientY}) {
|
||||
this.updatePointer({x: clientX, y: clientY});
|
||||
if (this.sim.isCurrentMode(MODE_MASS_GENERATION)) {
|
||||
const {x, y} = this.sim.screenToSim(clientX, clientY)
|
||||
this.sim.objects.handlePointerDown({x, y});
|
||||
@ -130,7 +131,7 @@ export class Pointer {
|
||||
viewOriginStart: this.sim.display.viewOrigin,
|
||||
pointerStart: {x: clientX, y: clientY},
|
||||
pointerCurrent: {x: clientX, y: clientY},
|
||||
velocity: this.getPointerVelocity(),
|
||||
velocity: {x: 0, y: 0},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +72,6 @@ export class Sim {
|
||||
this.pointer.clearPointerHistory();
|
||||
if (this.pointer.panning) {
|
||||
this.pointer.panning = undefined;
|
||||
// TODO: Maybe show velocity vectors relative to view velocity
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user