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