Skip to content

Commit

Permalink
fix config bug introduced in v1.1.3 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
abebeos authored May 21, 2023
1 parent cd94ceb commit 43dc9da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
35 changes: 16 additions & 19 deletions main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
}
}

var cfgval = config.get();
window.DeepNest.config(cfgval);
updateForm(cfgval);
var cfgvalues = config.getSync();
window.DeepNest.config(cfgvalues);
updateForm(cfgvalues);

var inputs = document.querySelectorAll('#config input, #config select');

Expand Down Expand Up @@ -133,19 +133,17 @@
// add a spinner during saving to indicate activity
i.parentNode.className = 'progress';

config.set(key, val).then(() => {
config.getSync().then(val => {
window.DeepNest.config(val);
updateForm(val);
i.parentNode.className = '';
config.setSync(key, val);
var cfgvalues = config.getSync();
window.DeepNest.config(cfgvalues);
updateForm(cfgvalues);

i.parentNode.className = '';

if(key == 'units'){
ractive.update('getUnits');
ractive.update('dimensionLabel');
}
});
});
if(key == 'units'){
ractive.update('getUnits');
ractive.update('dimensionLabel');
}
});
});

Expand All @@ -157,10 +155,9 @@
config.resetToDefaultsSync();
config.setSync('access_token', tempaccess);
config.setSync('id_token', tempid);
config.getSync().then(val => {
window.DeepNest.config(val);
updateForm(val);
});
var cfgvalues = config.getSync();
window.DeepNest.config(cfgvalues);
updateForm(cfgvalues);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deepnest",
"version": "1.1.3",
"version": "1.1.4",
"description": "Deep nesting for Laser and CNC",
"main": "main.js",
"license": "MIT",
Expand Down

0 comments on commit 43dc9da

Please sign in to comment.