mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
make spiral size param 3 in one
This commit is contained in:
@@ -115,7 +115,8 @@ registerWidget('_punchcard', (id, options = {}, pat) => {
|
||||
});
|
||||
|
||||
registerWidget('_spiral', (id, options = {}, pat) => {
|
||||
options = { width: 200, height: 200, size: 36, ...options };
|
||||
let _size = options.size || 275;
|
||||
options = { width: _size, height: _size, ...options, size: _size / 5 };
|
||||
const ctx = getCanvasWidget(id, options).getContext('2d');
|
||||
return pat.id(id).spiral({ ...options, ctx, id });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user