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) {