Skip to content

Commit

Permalink
Fix problem that when fixed page size is given the specified viewport…
Browse files Browse the repository at this point in the history
… size causes wrong page resizing
  • Loading branch information
MurakamiShinyu committed Mar 31, 2019
1 parent 1382926 commit e0e6966
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/adapt/vtree.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ adapt.vtree.Page.prototype.finish = function(triggers, clientLayout) {
const list = this.delayedItems;
for (var i = 0; i < list.length; i++) {
const item = list[i];
if (item.target === this.container && item.name === "transform" && !this.isAutoPageWidth && !this.isAutoPageHeight) {
// When fixed page size is specified, cancel the transform property
// set at OPFView.makePage() for the specified viewport size
// (e.g. `<meta name="viewport" content="width=1307, height=1920"/>`)
// to avoid wrong page resizing.
continue;
}
adapt.base.setCSSProperty(item.target, item.name, item.value.toString());
}

Expand Down

0 comments on commit e0e6966

Please sign in to comment.