mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-24 02:09:17 +00:00
Fix didPan() avoid automatic saving when clicked
This commit is contained in:
parent
f85d553a57
commit
4f60141604
@ -284,7 +284,7 @@ export default function Canvas() {
|
||||
};
|
||||
|
||||
const didPan = () =>
|
||||
!(transform.pan.x === panning.x && transform.pan.y === panning.y);
|
||||
!(transform.pan.x === panning.panStart.x && transform.pan.y === panning.panStart.y);
|
||||
|
||||
const getMovedElementDetails = () => {
|
||||
switch (dragging.element) {
|
||||
@ -345,7 +345,7 @@ export default function Canvas() {
|
||||
...prev,
|
||||
{
|
||||
action: Action.PAN,
|
||||
undo: { x: panning.x, y: panning.y },
|
||||
undo: { x: panning.panStart.x, y: panning.panStart.y },
|
||||
redo: transform.pan,
|
||||
message: t("move_element", {
|
||||
coords: `(${transform?.pan.x}, ${transform?.pan.y})`,
|
||||
|
Loading…
Reference in New Issue
Block a user