make sure draw logic works with multiple repls
This commit is contained in:
parent
827993a8c9
commit
375c68775c
7 changed files with 20 additions and 16 deletions
|
|
@ -154,9 +154,9 @@ export class StrudelMirror {
|
|||
|
||||
this.prebaked = prebake();
|
||||
autodraw && this.drawFirstFrame();
|
||||
|
||||
this.repl = repl({
|
||||
...replOptions,
|
||||
id,
|
||||
onToggle: (started) => {
|
||||
replOptions?.onToggle?.(started);
|
||||
if (started) {
|
||||
|
|
@ -171,11 +171,11 @@ export class StrudelMirror {
|
|||
} else {
|
||||
this.drawer.stop();
|
||||
updateMiniLocations(this.editor, []);
|
||||
cleanupDraw(false);
|
||||
cleanupDraw(false, id);
|
||||
}
|
||||
},
|
||||
beforeEval: async () => {
|
||||
cleanupDraw();
|
||||
cleanupDraw(true, id);
|
||||
this.painters = [];
|
||||
const self = this;
|
||||
// this is similar to repl.mjs > injectPatternMethods
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue