Converted draw actions storage to collapsed representation
Moved to command pattern for action application
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { applyChange, diff as deepDiff } from "deep-diff";
|
||||
import { applyChange, revertChange, diff as deepDiff } from "deep-diff";
|
||||
|
||||
export function applyChanges(target, changes) {
|
||||
for (let change of changes) {
|
||||
@@ -6,4 +6,10 @@ export function applyChanges(target, changes) {
|
||||
}
|
||||
}
|
||||
|
||||
export function revertChanges(target, changes) {
|
||||
for (let change of changes) {
|
||||
revertChange(target, true, change);
|
||||
}
|
||||
}
|
||||
|
||||
export const diff = deepDiff;
|
||||
|
||||
Reference in New Issue
Block a user