summaryrefslogtreecommitdiff
path: root/ext/fg/js/float.js
diff options
context:
space:
mode:
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();