UI: minor fixes.
This commit is contained in:
parent
9205f5383b
commit
7cee3bbaee
@ -38,9 +38,9 @@ function DatakeyConfigDialogController($scope, $mdDialog, deviceService, dataKey
|
||||
};
|
||||
|
||||
vm.fetchDeviceKeys = function (deviceAliasId, query, type) {
|
||||
var deviceId = vm.deviceAliases[deviceAliasId];
|
||||
if (deviceId) {
|
||||
return deviceService.getDeviceKeys(deviceId, query, type);
|
||||
var alias = vm.deviceAliases[deviceAliasId];
|
||||
if (alias) {
|
||||
return deviceService.getDeviceKeys(alias.deviceId, query, type);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
||||
@ -112,6 +112,7 @@ export default function AttributeTableDirective($compile, $templateCache, $rootS
|
||||
if (!update) {
|
||||
scope.selectedAttributes = [];
|
||||
}
|
||||
scope.$digest();
|
||||
}
|
||||
|
||||
scope.getDeviceAttributes = function(forceUpdate) {
|
||||
|
||||
@ -314,8 +314,11 @@ export default class TbDigitalGauge {
|
||||
gParams.maxY = gParams.barTop;
|
||||
this.gauge.txtMin.attr({"text-anchor": "start", "x": gParams.minX, "y": gParams.minY });
|
||||
this.gauge.txtMax.attr({"text-anchor": "start", "x": gParams.maxX, "y": gParams.maxY });
|
||||
maxW = Math.max(this.gauge.txtMin.node.getComputedTextLength(), this.gauge.txtMax.node.getComputedTextLength());
|
||||
gParams.prefWidth = gParams.strokeWidth + (maxW + this.localSettings.minMaxFont.size ) * 2;
|
||||
gParams.prefWidth = gParams.strokeWidth;
|
||||
if (!this.localSettings.hideMinMax) {
|
||||
maxW = Math.max(this.gauge.txtMin.node.getComputedTextLength(), this.gauge.txtMax.node.getComputedTextLength());
|
||||
gParams.prefWidth += (maxW + this.localSettings.minMaxFont.size ) * 2;
|
||||
}
|
||||
gParams.viewport.x = (gParams.canvasW - gParams.prefWidth)/2;
|
||||
gParams.viewport.width = gParams.prefWidth;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user