aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SnappingManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-10 12:10:48 -0400
committerbobzel <zzzman@gmail.com>2020-10-10 12:10:48 -0400
commitf3d04b73a53d7680092ce925fceede4f910df5bb (patch)
treef5b790ae556d2bdaeaa23c4cd0494c9a2b2e2cf1 /src/client/util/SnappingManager.ts
parentae8dafadcc0c6cea1ac087f17ac84bd302fca39e (diff)
fixes to issues with updating interactively whe groups change. fixes for multiple rapid modifications to list field where values would be overwrriten when sever sendBack stale information. fixes to list.splice() where deleting nothing but adding something didn't result in an addToSet.
Diffstat (limited to 'src/client/util/SnappingManager.ts')
-rw-r--r--src/client/util/SnappingManager.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/util/SnappingManager.ts b/src/client/util/SnappingManager.ts
index fc07e8ab4..d067dff6c 100644
--- a/src/client/util/SnappingManager.ts
+++ b/src/client/util/SnappingManager.ts
@@ -14,6 +14,9 @@ export namespace SnappingManager {
this.horizSnapLines = horizLines;
this.vertSnapLines = vertLines;
}
+
+ @observable cachedGroups: string[] = [];
+ @action setCachedGroups(groups: string[]) { this.cachedGroups = groups; }
}
const manager = new Manager();
@@ -25,5 +28,10 @@ export namespace SnappingManager {
export function SetIsDragging(dragging: boolean) { runInAction(() => manager.IsDragging = dragging); }
export function GetIsDragging() { return manager.IsDragging; }
+
+ /// bcz; argh!! TODO; These do not belong here, but there were include order problems with leaving them in util.ts
+ // need to investigate further what caused the mobx update problems and move to a better location.
+ export function SetCachedGroups(groups: string[]) { manager.setCachedGroups(groups); }
+ export function GetCachedGroups() { return manager.cachedGroups; }
}