Some Changed to the temperature.js file
This commit is contained in:
1 parent
9804e3eca0
commit
ce2463588d
1 file changed
+10
-21
@@ -68,9 +68,6 @@ $(function() {
|
||||
};
|
||||
self.changeOffsetDialog = undefined;
|
||||
|
||||
// TODO: find some nicer way to update plot AFTER graph becomes visible
|
||||
self.loginStateSubscription = undefined;
|
||||
|
||||
self.tools = ko.observableArray([]);
|
||||
|
||||
self.hasBed = ko.observable(true);
|
||||
@@ -155,25 +152,17 @@ $(function() {
|
||||
self.settingsViewModel.printerProfiles.currentProfileData().heatedBed.subscribe(self._printerProfileUpdated);
|
||||
});
|
||||
|
||||
// TODO: find some nicer way to update plot AFTER graph becomes visible
|
||||
self.access.permissions.permissionsList.subscribe(function(values) {
|
||||
if (self.loginStateSubscription !== undefined) {
|
||||
self.loginStateSubscription.dispose();
|
||||
self.loginStateSubscription = undefined;
|
||||
}
|
||||
|
||||
self.loginStateSubscription = self.loginState.hasPermissionKo(self.access.permissions.STATUS).subscribe(function(value) {
|
||||
var graph = $("#temp, #temp_link");
|
||||
if (graph.length) {
|
||||
if (value) {
|
||||
graph.removeAttr("style");
|
||||
}
|
||||
else {
|
||||
graph.hide();
|
||||
}
|
||||
self.loginState.hasPermissionKo(self.access.permissions.STATUS).subscribe(function(value) {
|
||||
var graph = $("#temp, #temp_link");
|
||||
if (graph.length) {
|
||||
if (value) {
|
||||
graph.removeAttr("style");
|
||||
}
|
||||
self.updatePlot();
|
||||
});
|
||||
else {
|
||||
graph.hide();
|
||||
}
|
||||
}
|
||||
self.updatePlot();
|
||||
});
|
||||
|
||||
self.temperatures = [];
|
||||
|
||||
Reference in new issue
Block a user