🎨 Moved round() to utils
This commit is contained in:
parent
85137b2334
commit
1faad2a01b
9 changed files with 34 additions and 23 deletions
|
@ -39,7 +39,11 @@ export default function Pattern(config = false) {
|
|||
for (let i in config.options) {
|
||||
let option = config.options[i];
|
||||
if (typeof option === "object") {
|
||||
this.options[i] = option.val / 100;
|
||||
if (typeof option.val !== "undefined") this.options[i] = option.val / 100;
|
||||
else if (typeof option.mm !== "undefined") this.options[i] = option.mm;
|
||||
else if (typeof option.angle !== "undefined")
|
||||
this.options[i] = option.angle;
|
||||
else throw "Unknown option type";
|
||||
} else if (typeof option === "number") {
|
||||
this.options[i] = option;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue