From b390deeec22dd3524e077c63fd1cd419af4a6d30 Mon Sep 17 00:00:00 2001 From: "coral.chen@fanruan.com" Date: Mon, 15 May 2023 10:39:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-94629=20=E6=9B=B4=E6=96=B0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 4f7e0a1366..1f139bbabf 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -259,7 +259,9 @@ public class XCardSwitchButton extends XButton { *

是否进入点击关闭按钮区域 *

计算逻辑: *

先得到鼠标的绝对坐标 -> tab布局的绝对坐标 -> 得到鼠标相对tab的坐标(有参数面板时要减去参数面板的高度) - *

再计算删除区域位置的相对坐标,通过对比判定鼠标是否在点击关闭按钮区域内 + *

再计算删除区域位置的相对坐标,通过对比判定鼠标是否在点击关闭按钮区域内,即,鼠标的位置(ex,ey): + *

  • 当前点击tag删除区域的x坐标 < ex < 当前点击tag删除区域的x坐标 + 偏移量
  • + *
  • 当前点击tag删除区域的y坐标 < ey < 当前点击tag删除区域的y坐标 + 偏移量
  • * * @param e 鼠标事件 * @param designer 表单编辑对象