Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
94663f25ea
@ -162,14 +162,12 @@ export default function AppRun($rootScope, $window, $injector, $location, $log,
|
||||
if (forbiddenDialog === null) {
|
||||
$translate(['access.access-forbidden',
|
||||
'access.access-forbidden-text',
|
||||
'access.access-forbidden',
|
||||
'action.cancel',
|
||||
'action.sign-in']).then(function (translations) {
|
||||
if (forbiddenDialog === null) {
|
||||
forbiddenDialog = $mdDialog.confirm()
|
||||
.title(translations['access.access-forbidden'])
|
||||
.htmlContent(translations['access.access-forbidden-text'])
|
||||
.ariaLabel(translations['access.access-forbidden'])
|
||||
.cancel(translations['action.cancel'])
|
||||
.ok(translations['action.sign-in']);
|
||||
$mdDialog.show(forbiddenDialog).then(function () {
|
||||
|
||||
@ -328,6 +328,9 @@ function KnobController($element, $scope, $document) {
|
||||
var textWidth = measureTextWidth(text, fontSize);
|
||||
while (textWidth > maxWidth) {
|
||||
fontSize--;
|
||||
if (fontSize < 0) {
|
||||
break;
|
||||
}
|
||||
textWidth = measureTextWidth(text, fontSize);
|
||||
}
|
||||
element.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
||||
@ -335,7 +338,7 @@ function KnobController($element, $scope, $document) {
|
||||
|
||||
function measureTextWidth(text, fontSize) {
|
||||
textMeasure.css({'fontSize': fontSize+'px', 'lineHeight': fontSize+'px'});
|
||||
textMeasure.text(text);
|
||||
textMeasure.html(text);
|
||||
return textMeasure.width();
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="top"></div>
|
||||
<div class="error-container" ng-style="{'background': vm.error.length ? 'rgba(255,255,255,0.25)' : 'none'}"
|
||||
layout="row" layout-align="center center">
|
||||
<span class="knob-error">{{ vm.error }}</span>
|
||||
<span class="knob-error" ng-bind-html="vm.error"></span>
|
||||
</div>
|
||||
<div class="title-container" layout="row" layout-align="center center">
|
||||
<span class="knob-title">{{ vm.title }}</span>
|
||||
@ -42,4 +42,4 @@
|
||||
<div id="text-measure"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user