From f2300031de0940d63f0af5315f1cf09e644c1d4b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 2 Apr 2020 17:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=99=A4=E9=AD=94=E6=9C=AF=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/style/VanChartPlotLegendPane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index acfc7811e..faa112952 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -337,9 +337,13 @@ public class VanChartPlotLegendPane extends BasicPane { } protected boolean isVisibleLayoutPane() { - int locationIndex = getLegendLocation().getSelectedIndex(); + if (customFloatPositionButton.isSelected()) { + return false; + } + + int locationIntValue = getLegendLocation().getSelectedItem(); - return !getCustomFloatPositionButton().isSelected() && (locationIndex == 0 || locationIndex == 1); + return locationIntValue == Constants.TOP || locationIntValue == Constants.BOTTOM; } //检查显示策略界面是否可用