🚧 Ongoing work on components and pattern info
This commit is contained in:
parent
a3ae718632
commit
ea41dc0106
168 changed files with 17518 additions and 14384 deletions
|
@ -6,9 +6,7 @@ const defaultGist = {
|
|||
paperless: false,
|
||||
locale: "en",
|
||||
units: "metric",
|
||||
margin: 2,
|
||||
measurements: {},
|
||||
options: {}
|
||||
margin: 2
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
import defaultGist from "./defaultGist";
|
||||
import optionDefault from "./optionDefault";
|
||||
|
||||
const gistDefaults = (config, gist = false) => {
|
||||
const gistDefaults = (options, gist = false) => {
|
||||
if (!gist) gist = defaultGist;
|
||||
let options = {};
|
||||
for (let option of Object.keys(config.options)) {
|
||||
for (let option of Object.keys(options)) {
|
||||
if (
|
||||
typeof gist.options !== "undefined" &&
|
||||
typeof gist.options[option] !== undefined
|
||||
)
|
||||
options[option] = gist.options[option];
|
||||
else options[option] = optionDefault(config.options[option]);
|
||||
else options[option] = optionDefault(options[option]);
|
||||
}
|
||||
delete gist.options;
|
||||
let settings = JSON.parse(JSON.stringify(defaultGist.settings));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue