aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/float.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2020-01-26 11:29:30 -0800
committerAlex Yatskov <alex@foosoft.net>2020-01-26 11:29:30 -0800
commit0c5b9b1fa1599cbf769d96cdebc226310f9dd8bc (patch)
treee734e2c3005078dbc248b541d357a934baa8a116 /ext/fg/js/float.js
parent2a12036ca305044291f1f4105d6a8d249848b210 (diff)
parent0cf1cf3aa094585bd6db8db2c1f229ba0ea37b6e (diff)
Merge branch 'master' into testing
Diffstat (limited to 'ext/fg/js/float.js')
-rw-r--r--ext/fg/js/float.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 513d246b..8d61d8f6 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -35,7 +35,7 @@ class DisplayFloat extends Display {
onError(error) {
if (this._orphaned) {
- this.setContentOrphaned();
+ this.setContent('orphaned');
} else {
logError(error, true);
}
@@ -89,7 +89,11 @@ class DisplayFloat extends Display {
}
}
- async initialize(options, popupInfo, url, childrenSupported) {
+ setContentScale(scale) {
+ document.body.style.fontSize = `${scale}em`;
+ }
+
+ async initialize(options, popupInfo, url, childrenSupported, scale) {
await super.initialize(options);
const {id, depth, parentFrameId} = popupInfo;
@@ -99,6 +103,8 @@ class DisplayFloat extends Display {
if (childrenSupported) {
popupNestedInitialize(id, depth, parentFrameId, url);
}
+
+ this.setContentScale(scale);
}
}
@@ -116,7 +122,8 @@ DisplayFloat._messageHandlers = new Map([
['setContent', (self, {type, details}) => self.setContent(type, details)],
['clearAutoPlayTimer', (self) => self.clearAutoPlayTimer()],
['setCustomCss', (self, {css}) => self.setCustomCss(css)],
- ['initialize', (self, {options, popupInfo, url, childrenSupported}) => self.initialize(options, popupInfo, url, childrenSupported)]
+ ['initialize', (self, {options, popupInfo, url, childrenSupported, scale}) => self.initialize(options, popupInfo, url, childrenSupported, scale)],
+ ['setContentScale', (self, {scale}) => self.setContentScale(scale)]
]);
DisplayFloat.instance = new DisplayFloat();