checkpoint new print rendering
This commit is contained in:
parent
e7a050e03e
commit
37e32ebedf
10 changed files with 300 additions and 229 deletions
|
|
@ -107,23 +107,27 @@ KIRI.worker = {
|
|||
},
|
||||
|
||||
printSetup: function(data, send) {
|
||||
let widgets = [], key;
|
||||
for (key in cache) {
|
||||
if (cache.hasOwnProperty(key)) widgets.push(cache[key]);
|
||||
// create widget array from id:widget cache
|
||||
const widgets = [];
|
||||
for (let key in cache) {
|
||||
if (cache.hasOwnProperty(key)) {
|
||||
widgets.push(cache[key]);
|
||||
}
|
||||
}
|
||||
|
||||
// let client know we've started
|
||||
send.data({update:0.05, updateStatus:"preview"});
|
||||
|
||||
current.print = KIRI.newPrint(data.settings, widgets, data.id);
|
||||
current.print.setup(false, function(update, msg) {
|
||||
current.print.setup(false, function(progress, message) {
|
||||
send.data({
|
||||
update: update,
|
||||
updateStatus: msg
|
||||
progress,
|
||||
message
|
||||
});
|
||||
}, function() {
|
||||
send.done({
|
||||
done: true,
|
||||
output: current.print.encodeOutput()
|
||||
output: KIRI.codec.encode(current.print.output)
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue