diff --git a/packages/codemirror/widget.mjs b/packages/codemirror/widget.mjs index 814813c7..606c76b0 100644 --- a/packages/codemirror/widget.mjs +++ b/packages/codemirror/widget.mjs @@ -106,7 +106,7 @@ function getCanvasWidget(id, options = {}) { registerWidget('_pianoroll', (id, options = {}, pat) => { const ctx = getCanvasWidget(id, options).getContext('2d'); - return pat.pianoroll({ fold: 1, ...options, ctx, id }); + return pat.id(id).pianoroll({ fold: 1, ...options, ctx, id }); }); registerWidget('_punchcard', (id, options = {}, pat) => { @@ -123,5 +123,5 @@ registerWidget('_spiral', (id, options = {}, pat) => { registerWidget('_scope', (id, options = {}, pat) => { options = { width: 500, height: 60, pos: 0.5, scale: 1, ...options }; const ctx = getCanvasWidget(id, options).getContext('2d'); - return pat.scope({ ...options, ctx, id }); + return pat.id(id).scope({ ...options, ctx, id }); });