mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 21:18:49 +00:00
make spiral size param 3 in one
This commit is contained in:
parent
21f5d639a3
commit
49e381f258
@ -115,7 +115,8 @@ registerWidget('_punchcard', (id, options = {}, pat) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
registerWidget('_spiral', (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');
|
const ctx = getCanvasWidget(id, options).getContext('2d');
|
||||||
return pat.id(id).spiral({ ...options, ctx, id });
|
return pat.id(id).spiral({ ...options, ctx, id });
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user