TryToSeparate controller
This commit is contained in:
@@ -80,7 +80,7 @@ $(function () {
|
||||
type: "error",
|
||||
hide: false
|
||||
});
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
self.tempRestart = function () {
|
||||
@@ -130,6 +130,6 @@ $(function () {
|
||||
// instantiation via the parameters argument
|
||||
dependencies: ["loginStateViewModel", "settingsViewModel", "controlViewModel", "terminalViewModel", "accessViewModel"],
|
||||
// Finally, this is the list of selectors for all elements we want this view model to be bound to.
|
||||
elements: ["#tab_plugin_CalibrationTools"]
|
||||
elements: ["#calibration_eSteps"]
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
$(function () {
|
||||
function CalibrationToolsPIDTuneViewModel(parameters) {
|
||||
var self = this;
|
||||
|
||||
self.bedCurrentTemp = ko.observable(0);
|
||||
self.bedCurrentTarget = ko.observable(0);
|
||||
|
||||
OctoPrint.printer.getBedState().done(function (bedState) {
|
||||
self.bedCurrentTemp(bedState.bed.actual);
|
||||
self.bedCurrentTarget(bedState.bed.target);
|
||||
});
|
||||
}
|
||||
OCTOPRINT_VIEWMODELS.push({
|
||||
// This is the constructor to call for instantiating the plugin
|
||||
construct: CalibrationToolsPIDTuneViewModel,
|
||||
// This is a list of dependencies to inject into the plugin, the order which you request
|
||||
// here is the order in which the dependencies will be injected into your view model upon
|
||||
// instantiation via the parameters argument
|
||||
dependencies: ["loginStateViewModel", "settingsViewModel", "controlViewModel", "terminalViewModel", "accessViewModel"],
|
||||
// Finally, this is the list of selectors for all elements we want this view model to be bound to.
|
||||
elements: ["#calibration_pid"]
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user