Fix redo issue

This commit is contained in:
HarelM committed 2024-02-04 16:37:47 +02:00
1 parent cb77c6b4e2
commit c84c7a7b96
2 files changed
+40 -2

No files matched your search

+5 -2
View File
@@ -19,10 +19,13 @@ export class RevisionStore {
}
addRevision(revision: StyleSpecification & {id: string}) {
//TODO: compare new revision style id with old ones
//and ensure that it is always the same id
// clear any "redo" revisions once a change is made
// and ensure current index is at end of list
this.revisions = this.revisions.slice(0, this.currentIdx + 1);
this.revisions.push(revision)
this.currentIdx++
//}
}
undo() {