mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
[DE] Check selected page size preset depending on page orientation.
This commit is contained in:
@ -581,6 +581,8 @@ define([
|
||||
},
|
||||
|
||||
onApiPageSize: function(w, h) {
|
||||
var width = this._state.pgorient ? w : h,
|
||||
height = this._state.pgorient ? h : w;
|
||||
if (Math.abs(this._state.pgsize[0] - w) > 0.01 ||
|
||||
Math.abs(this._state.pgsize[1] - h) > 0.01) {
|
||||
this._state.pgsize = [w, h];
|
||||
@ -588,7 +590,7 @@ define([
|
||||
this._clearChecked(this.toolbar.mnuPageSize);
|
||||
_.each(this.toolbar.mnuPageSize.items, function(item){
|
||||
if (item.value && typeof(item.value) == 'object' &&
|
||||
Math.abs(item.value[0] - w) < 0.01 && Math.abs(item.value[1] - h) < 0.01) {
|
||||
Math.abs(item.value[0] - width) < 0.01 && Math.abs(item.value[1] - height) < 0.01) {
|
||||
item.setChecked(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user