diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 54ff1c76d..49079b515 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -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; }