Commit 2ebd7ee 1 parent a121aae commit 2ebd7ee Copy full SHA for 2ebd7ee
File tree 1 file changed +12
-3
lines changed
octoprint_prettygcode/static/js
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -609,7 +609,13 @@ $(function () {
609
609
}
610
610
}
611
611
612
- var bedVolume = undefined ;
612
+ var bedVolume = {
613
+ depth : 0 ,
614
+ formFactor : "" ,
615
+ height : 0 ,
616
+ origin : "" ,
617
+ width : 0 ,
618
+ } ;
613
619
var viewInitialized = false ;
614
620
self . onTabChange = function ( current , previous ) {
615
621
@@ -845,9 +851,12 @@ $(function () {
845
851
}
846
852
847
853
function updateBedVolume ( ) {
854
+ var currentProfileData = self . printerProfiles . currentProfileData ( ) ;
855
+ if ( ! currentProfileData || ! currentProfileData . volume ) {
856
+ return ;
857
+ }
848
858
849
- //var volume = ko.mapping.toJS(self.printerProfiles.currentProfileData().volume);
850
- var volume = self . printerProfiles . currentProfileData ( ) . volume ;
859
+ var volume = currentProfileData . volume ;
851
860
//console.log([arguments.callee.name,volume]);
852
861
853
862
if ( typeof volume . custom_box === "function" ) //check for custom bounds.
You can’t perform that action at this time.
0 commit comments