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