make spiral size param 3 in one
This commit is contained in:
parent
21f5d639a3
commit
49e381f258
1 changed files with 2 additions and 1 deletions
|
|
@ -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 });
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue