Skip to content

Commit

Permalink
WI00737678---RemoveDragNodesBehavior---Update-3
Browse files Browse the repository at this point in the history
  • Loading branch information
gnawisetech committed Jul 3, 2024
1 parent 579b876 commit b852ab2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Blazor.Diagrams.Core/Behaviors/DragMovablesBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ public DragMovablesBehavior(Diagram diagram) : base(diagram)

protected override void OnPointerDown(Model? model, PointerEventArgs e)
{
if (model is null)
if (model is not MovableModel)
return;

ResetPan();

_initialPositions.Clear();

foreach (var sm in Diagram.GetSelectedModels())
{
if (sm is not NodeModel movable || movable.Locked)
if (sm is not MovableModel movable || movable.Locked)
continue;

// Special case: groups without auto size on
Expand Down Expand Up @@ -116,7 +115,6 @@ protected override void OnPointerUp(Model? model, PointerEventArgs e)
movable.TriggerMoved();
}
}

_initialPositions.Clear();
_totalMovedX = 0;
_totalMovedY = 0;
Expand Down

0 comments on commit b852ab2

Please sign in to comment.