From 3a9ba966983648f3650747469213b384b5e06eef Mon Sep 17 00:00:00 2001 From: Fay Date: Tue, 26 Nov 2019 17:10:57 +0800 Subject: [PATCH] =?UTF-8?q?BI-56250=20fix=EF=BC=9A=E7=BC=A9=E5=B0=8F?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E6=9C=89=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/finebi/plugin/web/plugin.screen_adaptive.js | 8 ++++++++ src/main/resources/com/finebi/plugin/web/scripts/entry.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js b/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js index 1eb30a4..fc6f736 100644 --- a/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js +++ b/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js @@ -64,6 +64,11 @@ document.body.style.overflowY = "auto"; html.style.backgroundColor = "#ffffff"; + if (scale < 1) { + document.body.style.width = bounds.width + "px"; + document.body.style.height = bounds.height + "px"; + } + window.scale = window.devicePixelRatio * scale; } @@ -82,6 +87,9 @@ document.body.style.overflowY = "hidden"; html.style.backgroundColor = "#ffffff"; + document.body.style.width = "100%"; + document.body.style.height = "100%"; + scale = 1; window.scale = window.devicePixelRatio / scale; } diff --git a/src/main/resources/com/finebi/plugin/web/scripts/entry.js b/src/main/resources/com/finebi/plugin/web/scripts/entry.js index 1eb30a4..fc6f736 100644 --- a/src/main/resources/com/finebi/plugin/web/scripts/entry.js +++ b/src/main/resources/com/finebi/plugin/web/scripts/entry.js @@ -64,6 +64,11 @@ document.body.style.overflowY = "auto"; html.style.backgroundColor = "#ffffff"; + if (scale < 1) { + document.body.style.width = bounds.width + "px"; + document.body.style.height = bounds.height + "px"; + } + window.scale = window.devicePixelRatio * scale; } @@ -82,6 +87,9 @@ document.body.style.overflowY = "hidden"; html.style.backgroundColor = "#ffffff"; + document.body.style.width = "100%"; + document.body.style.height = "100%"; + scale = 1; window.scale = window.devicePixelRatio / scale; }