[DE] Check selected page size preset depending on page orientation.
This commit is contained in:
parent
73f5efae27
commit
a3117efe05
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue