1
0
Fork 0

🎨 Moved round() to utils

This commit is contained in:
Joost De Cock 2018-08-31 09:44:12 +02:00
parent 85137b2334
commit 1faad2a01b
9 changed files with 34 additions and 23 deletions

View file

@ -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;
}