diff --git a/packages/codemirror/widget.mjs b/packages/codemirror/widget.mjs index cf26b209..814813c7 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.id(id).pianoroll({ fold: 1, ...options, ctx, id }); + return pat.pianoroll({ fold: 1, ...options, ctx, id }); }); registerWidget('_punchcard', (id, options = {}, pat) => { @@ -117,7 +117,7 @@ registerWidget('_punchcard', (id, options = {}, pat) => { registerWidget('_spiral', (id, options = {}, pat) => { options = { width: 200, height: 200, size: 36, ...options }; const ctx = getCanvasWidget(id, options).getContext('2d'); - return pat.spiral({ ...options, ctx, id }); + return pat.id(id).spiral({ ...options, ctx, id }); }); registerWidget('_scope', (id, options = {}, pat) => {