|
@@ -128,24 +128,24 @@ var Toolbar = function ToolbarClosure() {
|
|
|
return;
|
|
|
}
|
|
|
var selectScaleOption = function selectScaleOption(value, scale) {
|
|
|
- var options = items.scaleSelect.options;
|
|
|
- var predefinedValueFound = false;
|
|
|
- for (var i = 0, ii = options.length; i < ii; i++) {
|
|
|
- var option = options[i];
|
|
|
- if (option.value !== value) {
|
|
|
- option.selected = false;
|
|
|
- continue;
|
|
|
+ var customScale = Math.round(scale * 10000) / 100;
|
|
|
+ _this2.l10n.get('page_scale_percent', { scale: customScale }, '{{scale}}%').then(function (msg) {
|
|
|
+ var options = items.scaleSelect.options;
|
|
|
+ var predefinedValueFound = false;
|
|
|
+ for (var i = 0, ii = options.length; i < ii; i++) {
|
|
|
+ var option = options[i];
|
|
|
+ if (option.value !== value) {
|
|
|
+ option.selected = false;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ option.selected = true;
|
|
|
+ predefinedValueFound = true;
|
|
|
}
|
|
|
- option.selected = true;
|
|
|
- predefinedValueFound = true;
|
|
|
- }
|
|
|
- if (!predefinedValueFound) {
|
|
|
- var customScale = Math.round(scale * 10000) / 100;
|
|
|
- _this2.l10n.get('page_scale_percent', { scale: customScale }, '{{scale}}%').then(function (msg) {
|
|
|
+ if (!predefinedValueFound) {
|
|
|
items.customScaleOption.textContent = msg;
|
|
|
- });
|
|
|
- items.customScaleOption.selected = true;
|
|
|
- }
|
|
|
+ items.customScaleOption.selected = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
var pageNumber = this.pageNumber;
|
|
|
var scaleValue = (this.pageScaleValue || this.pageScale).toString();
|