use other view model push method

http://docs.octoprint.org/en/master/plugins/viewmodels.html#registering-custom-viewmodels says the other way is depreciated
This commit is contained in:
ntoff 2017-11-11 21:41:07 +10:00
parent 0e71971e66
commit 7bdd260617

View File

@ -62,8 +62,12 @@ $(function() {
fanSpeed(self.settings.settings.plugins.fanspeedslider.defaultFanSpeed());
}
}
OCTOPRINT_VIEWMODELS.push([
FanSliderPluginViewModel,
["settingsViewModel", "controlViewModel", "loginStateViewModel"]
]);
});
OCTOPRINT_VIEWMODELS.push({
construct: FanSliderPluginViewModel,
additionalNames: [],
dependencies: ["settingsViewModel", "controlViewModel", "loginStateViewModel"],
optional: [],
elements: []
});
});