summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy-host.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-23 17:12:09 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-22 20:38:21 -0500
commite740965d4f39a34eecf8a211f22eddf56d185fed (patch)
treebe3f02ded6213fb1abc5d4cdc646eeaa5a991892 /ext/fg/js/popup-proxy-host.js
parent22afab2f47bcc1e5e9ac0db35d2f1b168becf76e (diff)
Scale popup based on current page zoom factor
Diffstat (limited to 'ext/fg/js/popup-proxy-host.js')
-rw-r--r--ext/fg/js/popup-proxy-host.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index c4f0c6ff..427172c6 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -41,7 +41,8 @@ class PopupProxyHost {
['containsPoint', ({id, x, y}) => this._onApiContainsPoint(id, x, y)],
['showContent', ({id, elementRect, writingMode, type, details}) => this._onApiShowContent(id, elementRect, writingMode, type, details)],
['setCustomCss', ({id, css}) => this._onApiSetCustomCss(id, css)],
- ['clearAutoPlayTimer', ({id}) => this._onApiClearAutoPlayTimer(id)]
+ ['clearAutoPlayTimer', ({id}) => this._onApiClearAutoPlayTimer(id)],
+ ['setContentScale', ({id, scale}) => this._onApiSetContentScale(id, scale)]
]));
}
@@ -97,6 +98,11 @@ class PopupProxyHost {
return popup.clearAutoPlayTimer();
}
+ async _onApiSetContentScale(id, scale) {
+ const popup = this._getPopup(id);
+ return popup.setContentScale(scale);
+ }
+
// Private functions
_createPopupInternal(parentId, depth) {