WEBSITE - WIP - icon shapes - track global shape changes for undo / redo

This commit is contained in:
Alex Sim committed 2026-10-12 05:22:36 +02:00
1 parent e2ac7d2380
commit 3a2918dfa0
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ description: >-
url: "https://alesimula.github.io"
baseurl: ""
version: "1.0.42" #Website version - increase to invalidate cached resources
version: "1.0.43" #Website version - increase to invalidate cached resources
github_repo: "alesimula/Murine-launcher"
icon_url: "https://raw.githubusercontent.com/alesimula/Murine-launcher/refs/heads/main/image/app_icon/icon_browser_fullsize.svg"
icon_freeform_url: "https://raw.githubusercontent.com/alesimula/Murine-launcher/refs/heads/main/image/app_icon/icon_freeform.svg"
+2 -1
View File
@@ -1146,7 +1146,8 @@
if (!drag) return;
if (drag.kind === 'point' && (drag.start || drag.pending) && !drag.moved) selectOnly(drag.i); // a tap: just this corner
// A press that changed nothing (a tap, or a drag back to where it started) leaves no undo step behind.
if (undo.length && JSON.stringify(JSON.parse(undo[undo.length - 1]).shapes) === JSON.stringify(shapes)) {
const top = undo.length && JSON.parse(undo[undo.length - 1]); // the shapes and the Global transform (see snapshot)
if (top && JSON.stringify([top.shapes, top.whole ?? null]) === JSON.stringify([shapes, whole])) {
undo.pop(); redo.push(...drag.redoKept);
}
drag = null; render();