Skip to content

Commit

Permalink
fix: hacks that edit images correctly clearing cache for extended pal…
Browse files Browse the repository at this point in the history
…ettes
  • Loading branch information
seleb committed Dec 25, 2021
1 parent ba719ab commit 97dde43
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/helpers/edit image at runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ export { getImage };
inject(
/\/\/ TODO : reset render cache for this image/,
`
// TODO: clear extended palettes
drawingCache.render[drawingId+"_0"] = undefined;
drawingCache.render[drawingId+"_1"] = undefined;
drawingCache.render[drawingId+"_2"] = undefined;
Object.keys(drawingCache.render)
.filter(function (i) { return i.split('_').slice(0, -1).join('_') === drawingId; })
.forEach(function(i) { drawingCache.render[i] = undefined; })
`
);

Expand Down

0 comments on commit 97dde43

Please sign in to comment.