Skip to content

Commit

Permalink
HTTP server: fix for stale DOM dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 18, 2019
1 parent 554f7f3 commit 2b97b29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions webext/src/dom/dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,7 @@ export default class extends utils.mixins(CommonMixin) {
dom_rect.height != this._pre_calculated_char.height
) {
this.log(
`Using char dims ${this._pre_calculated_char.width}x${
this._pre_calculated_char.height
}`
`Using char dims ${this._pre_calculated_char.width}x${this._pre_calculated_char.height}`
);
this.log(`Actual char dims ${dom_rect.width}x${dom_rect.height}`);
}
Expand Down
1 change: 1 addition & 0 deletions webext/src/dom/text_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default class extends utils.mixins(CommonMixin, SerialiseMixin) {
buildFormattedText(callback) {
this._updateState();
this.graphics_builder.getOnOffScreenshots(() => {
this.dimensions.update();
this._getTextNodes();
this._positionTextNodes();
callback();
Expand Down

0 comments on commit 2b97b29

Please sign in to comment.