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 b36779c commit 5879892Copy full SHA for 5879892
octoprint_gcodethumbs/static/js/gcode-preview-viewmodel.js
@@ -88,10 +88,9 @@ $(function() {
88
}
89
90
function enrichWithPreview(element) {
91
- const pathEl = document.querySelector('.back-path [data-bind*=currentPath]');
92
- let path = pathEl? pathEl.innerText+'/' : '';
93
- if (path == '/') path = '';
94
- const filename = path+extractKey(element);
+ const path = self.filesViewModel.currentPath();
+ const prefix = path ? path+'/' : '';
+ const filename = prefix + extractKey(element);
95
96
if (previews[filename]) {
97
insertAfter(previews[filename].canvas, element.querySelector('.title'));
0 commit comments