Converted draw actions storage to collapsed representation

Moved to command pattern for action application
This commit is contained in:
Mitchell McCaffrey
2021-02-04 09:11:27 +11:00
parent 2fc7f4f162
commit fa1f6fe18f
16 changed files with 366 additions and 137 deletions

View File

@@ -22,12 +22,8 @@ const cachedMapMax = 15;
const defaultMapState = {
tokens: {},
// An index into the draw actions array to which only actions before the
// index will be performed (used in undo and redo)
mapDrawActionIndex: -1,
mapDrawActions: [],
fogDrawActionIndex: -1,
fogDrawActions: [],
drawShapes: {},
fogShapes: {},
// Flags to determine what other people can edit
editFlags: ["drawing", "tokens", "notes"],
notes: {},