summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Buckley-Houston <tom@tombh.co.uk>2019-06-18 13:41:23 +0300
committerThomas Buckley-Houston <tom@tombh.co.uk>2019-06-18 13:41:23 +0300
commit2b97b29d9105b2de6ae8f49927e3a40575e96144 (patch)
tree21a05b25a9b90f4ffdef4dea1af85f5b6b3b14db
parent554f7f393a40ea1432569134f1e70dadbcb47e58 (diff)
HTTP server: fix for stale DOM dimensions
-rw-r--r--webext/src/dom/dimensions.js4
-rw-r--r--webext/src/dom/text_builder.js1
2 files changed, 2 insertions, 3 deletions
diff --git a/webext/src/dom/dimensions.js b/webext/src/dom/dimensions.js
index fa1b2d2..6b48235 100644
--- a/webext/src/dom/dimensions.js
+++ b/webext/src/dom/dimensions.js
@@ -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}`);
}
diff --git a/webext/src/dom/text_builder.js b/webext/src/dom/text_builder.js
index 0582670..bbdab83 100644
--- a/webext/src/dom/text_builder.js
+++ b/webext/src/dom/text_builder.js
@@ -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();