commit ad2ae7d69629c94ae96a0217871cebb7e683df4e parent e6693c8906c503b258c1705f61bc4cfcc3e29fb2 Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Mon, 23 Sep 2024 11:53:35 -0700 Fix history compression algorithm If we're on a mark we don't want to compress to the previous mark. Diffstat:
| M | files/floorplans/floorplan/backend.js | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js @@ -102,7 +102,9 @@ class BackendHistory { } } - if (op === "add" && oldDiff != undefined && this.diffMark(oldDiff) == this.diffMark()) { + let m = this.diffMark() + if (op === "add" && oldDiff != undefined && this.marks[m] != this.place && + this.diffMark(oldDiff) === m) { let d = this.diffs[oldDiff] d.value = value d.time = Date.now()