We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cc8eb4 commit f3d20e3Copy full SHA for f3d20e3
octoprint_gcodethumbs/static/js/gcode-preview-viewmodel.js
@@ -35,7 +35,7 @@ $(function() {
35
if (elements.length)
36
enrichWithPreview(elements[0]);
37
else
38
- timer = setTimeout(monitorDom, 1000);
+ timer = setTimeout(monitorDom, 100);
39
}
40
41
function getElements() {
@@ -89,8 +89,14 @@ $(function() {
89
90
function enrichWithPreview(element) {
91
const filename = extractKey(element);
92
- downloading = true;
+
93
+ if (previews[filename]) {
94
+ insertAfter(previews[filename].canvas, element.querySelector('.title'));
95
+ timer = setTimeout(monitorDom, 10);
96
+ return;
97
+ }
98
99
+ downloading = true;
100
console.log('[GCodePreview] downloading ' + filename);
101
102
// TODO: show spinner while downloading
0 commit comments