diff options
author | bobzel <zzzman@gmail.com> | 2020-10-12 10:23:29 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-12 10:23:29 -0400 |
commit | d1959f141a777397bd5eeb5d40bcfe7195538557 (patch) | |
tree | 704f7ea15f3e62b52d9eea49e1d68da35cb39c5b /src/client/util/SnappingManager.ts | |
parent | 9f6dba274539a78a541afd398c73a17dec996319 (diff) |
fixed computedFn()'s to be used correctly in several places. fixed major memory leak in PDFs
Diffstat (limited to 'src/client/util/SnappingManager.ts')
-rw-r--r-- | src/client/util/SnappingManager.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/util/SnappingManager.ts b/src/client/util/SnappingManager.ts index a615f0247..069f81d38 100644 --- a/src/client/util/SnappingManager.ts +++ b/src/client/util/SnappingManager.ts @@ -32,9 +32,8 @@ export namespace SnappingManager { /// 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. + const getCachedGroupByNameCache = computedFn(function (name: string) { return manager.cachedGroups.includes(name); }, true); + export function GetCachedGroupByName(name: string) { return getCachedGroupByNameCache(name); } export function SetCachedGroups(groups: string[]) { manager.setCachedGroups(groups); } - export function GetCachedGroupByName(name: string) { - return computedFn(function (name: string) { return manager.cachedGroups.includes(name); }, true)(name); - } } |