Skip to content

Commit

Permalink
feat(brushModule): Method to add an element by UID to bust bitmap cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyrb committed Jul 25, 2019
1 parent 419c520 commit a99aebd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/store/modules/brushModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const state = {
visibleSegmentations: {},
imageBitmapCache: {},
segmentationMetadata: {},
//
invalidatedEnabledElements: [],
};

const setters = {
Expand All @@ -25,6 +27,12 @@ const setters = {
state.radius = Math.min(Math.max(radius, state.minRadius), state.maxRadius);
},

forceUpdateImageForElement(enabledElementUID) {
if (!state.invalidatedEnabledElements.includes(enabledElementUID)) {
state.invalidatedEnabledElements.push(enabledElementUID);
}
},

/**
* TODO: Should this be a init config property?
* Sets the brush color map to something other than the default
Expand Down

0 comments on commit a99aebd

Please sign in to comment.