add option for screenshot/thumbnail in gcode export

This commit is contained in:
Stewart Allen 2021-07-09 20:31:37 -04:00
commit 5ae6b74a3f
6 changed files with 47 additions and 6 deletions

View file

@ -170,7 +170,7 @@
return this.filter(v => isNaN(v)).length > 0;
};
for(let i in AP){
for (let i in AP) {
Object.defineProperty(Array.prototype, i, {
value: AP[i],
enumerable: false
@ -193,6 +193,14 @@
return o ? JSON.parse(JSON.stringify(o)) : o;
};
Object.toArray = function(o) {
let ret = [];
for (let [key,value] of Object.entries(o)) {
ret.push({key, value});
}
return ret;
};
Math.bound = function(val,min,max) {
return Math.max(min,Math.min(max,val));
};