From fa03be528167e7b33153c538f3dc37a2d64bbbbd Mon Sep 17 00:00:00 2001 From: Fay Date: Wed, 28 Aug 2019 14:39:59 +0800 Subject: [PATCH 1/5] changelog --- plugin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin.xml b/plugin.xml index e136b0e..d4ce01a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -8,6 +8,9 @@ 2019-03-01 fay + + ]]> From 9ac71125e47308bd6f81187f95f4db35602e8428 Mon Sep 17 00:00:00 2001 From: Fay Date: Tue, 8 Oct 2019 15:09:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?BI-52775=20fix:=20=E7=A9=BA=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +---- plugin.xml | 2 +- .../com/finebi/plugin/web/plugin.screen_adaptive.js | 12 ++++++++++-- .../resources/com/finebi/plugin/web/scripts/entry.js | 12 ++++++++++-- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6598ca6..c2eddfb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ # BI模板自适应插件 -用户查看模板时可以选择自适应屏幕宽度的查看方式。 - -待解决问题: -1. IE下图表的弹出框错位 \ No newline at end of file +用户查看模板时可以选择自适应屏幕宽度的查看方式。 \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index d4ce01a..fe840d4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ com.finebi.plugin.screenadaptive yes - 1.1.30 + 1.1.31 10.0 2019-03-01 fay 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 72abb68..39749e0 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 @@ -91,13 +91,21 @@ // 获取缩放倍数,原模板宽高 function getScaleBounds() { - var widgts = BI.designConfigure.widgets, + var widgets = BI.designConfigure.widgets, layoutRatio = BI.designConfigure.layoutRatio, freeLayoutRatio = BI.designConfigure.freeLayoutRatio, freeWidgets = BI.designConfigure.freeWidgetIds; + + if (Object.keys(widgets).length === 0) { + return { + scale: 1, + width: html.clientWidth, + height: html.clientHeight + } + } var left = null, right = null, top = null, bottom = null, freeLeft = null, freeRight = null, freeTop = null, freeBottom = null; - BI.each(widgts, function (wId, widget) { + BI.each(widgets, function (wId, widget) { var bounds = widget.bounds || {}; if (BI.contains(freeWidgets, wId)) { freeLeft = BI.isNull(freeLeft) ? bounds.left : Math.min(freeLeft, bounds.left); 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 72abb68..39749e0 100644 --- a/src/main/resources/com/finebi/plugin/web/scripts/entry.js +++ b/src/main/resources/com/finebi/plugin/web/scripts/entry.js @@ -91,13 +91,21 @@ // 获取缩放倍数,原模板宽高 function getScaleBounds() { - var widgts = BI.designConfigure.widgets, + var widgets = BI.designConfigure.widgets, layoutRatio = BI.designConfigure.layoutRatio, freeLayoutRatio = BI.designConfigure.freeLayoutRatio, freeWidgets = BI.designConfigure.freeWidgetIds; + + if (Object.keys(widgets).length === 0) { + return { + scale: 1, + width: html.clientWidth, + height: html.clientHeight + } + } var left = null, right = null, top = null, bottom = null, freeLeft = null, freeRight = null, freeTop = null, freeBottom = null; - BI.each(widgts, function (wId, widget) { + BI.each(widgets, function (wId, widget) { var bounds = widget.bounds || {}; if (BI.contains(freeWidgets, wId)) { freeLeft = BI.isNull(freeLeft) ? bounds.left : Math.min(freeLeft, bounds.left); From b7171b195af061ea7e95152a9be312547090b6ed Mon Sep 17 00:00:00 2001 From: Fay Date: Tue, 15 Oct 2019 17:33:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Djar=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index fe840d4..192ad3a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -5,7 +5,7 @@ yes 1.1.31 10.0 - 2019-03-01 + 2019-08-16 fay Date: Tue, 15 Oct 2019 18:31:56 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Djar=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 192ad3a..95b16d5 100644 --- a/plugin.xml +++ b/plugin.xml @@ -5,7 +5,7 @@ yes 1.1.31 10.0 - 2019-08-16 + 2019-08-26 fay Date: Thu, 24 Oct 2019 15:14:20 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Djar=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 95b16d5..192ad3a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -5,7 +5,7 @@ yes 1.1.31 10.0 - 2019-08-26 + 2019-08-16 fay