From 64dc58fd089f3eb3db9b26e606b3f51793109adb Mon Sep 17 00:00:00 2001 From: zengwenjie <1663900244@qq.com> Date: Fri, 26 Sep 2025 14:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=8CActionViewer?= =?UTF-8?q?=E3=80=8D=E7=9A=84=E6=8B=96=E6=94=BE=E8=A3=85=E9=A5=B0=E5=99=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeedyDesigner/Deedy.Activity/ActionViewer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DeedyDesigner/Deedy.Activity/ActionViewer.cs b/DeedyDesigner/Deedy.Activity/ActionViewer.cs index d964b26..e26a4ad 100644 --- a/DeedyDesigner/Deedy.Activity/ActionViewer.cs +++ b/DeedyDesigner/Deedy.Activity/ActionViewer.cs @@ -734,7 +734,7 @@ namespace Deedy.Activity { this.IsDragging = true; ToolTipService.SetIsEnabled(this, false); - + //TODO:执行拖放校验并设置「_CanDropInParent」与「_CanDropChild」两个临时控制字段 base.OnDragEnter(e); } protected override void OnDragLeave(DragEventArgs e) @@ -743,9 +743,9 @@ namespace Deedy.Activity base.OnDragLeave(e); } - protected internal bool _CanDropInParent = false; - protected internal bool _CanDropChild = false; - protected internal DropPlacement _DropPlacement = DropPlacement.Uncertain; + protected internal bool _CanDropInParent = false; // 通过组装校验逻辑设置此字段 + protected internal bool _CanDropChild = false; // 通过组装校验逻辑设置此字段 + protected internal DropPlacement _DropPlacement = DropPlacement.Uncertain; // 用于最终放置逻辑 protected override void OnDragOver(DragEventArgs e) { //HACK:这里要考虑父容器的布局方向 @@ -760,12 +760,12 @@ namespace Deedy.Activity if (this._CanDropInParent && (currentPoint.Y < 10 || currentPoint.Y < 10)) { this._DropPlacement = DropPlacement.BeforeMe; - this.UpdateDragAdorner(this._DropPlacement); + this.UpdateDragAdorner(this._DropPlacement, (this.ActionElement?.ParentElement as ICombinedElement)?.Direction); } else if (this._CanDropInParent && (hitElement.ActualHeight - currentPoint.Y < 10 || hitElement.ActualWidth - currentPoint.X < 10)) { this._DropPlacement = DropPlacement.BehindMe; - this.UpdateDragAdorner(this._DropPlacement); + this.UpdateDragAdorner(this._DropPlacement, (this.ActionElement?.ParentElement as ICombinedElement)?.Direction); } else if (this._CanDropChild) {