moved reset override slider functionality to separate method.
This commit is contained in:
parent
d7b5fae614
commit
e5c600e972
1 changed files with 9 additions and 5 deletions
|
|
@ -216,7 +216,7 @@ $(function() {
|
||||||
$("#confirmation_dialog .confirmation_dialog_acknowledge").click(
|
$("#confirmation_dialog .confirmation_dialog_acknowledge").click(
|
||||||
function (e) {
|
function (e) {
|
||||||
if (typeof callback === 'function') {
|
if (typeof callback === 'function') {
|
||||||
self.onEventPrintDone();
|
self.resetOverrideSlider();
|
||||||
callback(e);
|
callback(e);
|
||||||
$("#confirmation_dialog").modal("hide");
|
$("#confirmation_dialog").modal("hide");
|
||||||
$("#confirmation_dialog .confirmation_dialog_message").html('');
|
$("#confirmation_dialog .confirmation_dialog_message").html('');
|
||||||
|
|
@ -333,15 +333,19 @@ $(function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onEventPrintDone = function(){
|
self.onEventPrintDone = function(){
|
||||||
self.feedrateOverrideSlider.slider('setValue', 100);
|
self.resetOverrideSlider();
|
||||||
self.intensityOverrideSlider.slider('setValue', 100);
|
|
||||||
self.intensityOverride(100);
|
|
||||||
self.feedrateOverride(100);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onStartup = function() {
|
self.onStartup = function() {
|
||||||
self._configureOverrideSliders();
|
self._configureOverrideSliders();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.resetOverrideSlider = function() {
|
||||||
|
self.feedrateOverrideSlider.slider('setValue', 100);
|
||||||
|
self.intensityOverrideSlider.slider('setValue', 100);
|
||||||
|
self.intensityOverride(100);
|
||||||
|
self.feedrateOverride(100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OCTOPRINT_VIEWMODELS.push([
|
OCTOPRINT_VIEWMODELS.push([
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue