fix: id at wrong place

This commit is contained in:
Felix Roos 2024-03-23 12:14:36 +01:00
parent f83a156317
commit a629c5c931

View File

@ -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) => {