Skip to content

Commit

Permalink
Changed implmentation as per the name change
Browse files Browse the repository at this point in the history
  • Loading branch information
AarthiNarayanan committed Jan 16, 2024
1 parent 81435c0 commit d9a3ace
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Blazor.Diagrams.Core/Behaviors/DragNewLinkBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void OnPointerDown(Model? model, MouseEventArgs e)

if (model is PortModel port)
{
if (port.Locked || port.Enabled)
if (port.Locked || !port.Enabled)
return;

_targetPositionAnchor = new PositionAnchor(CalculateTargetPosition(e.ClientX, e.ClientY));
Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.Diagrams.Core/Models/Base/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected Model(string id)

public string Id { get; }
public bool Locked { get; set; }
public bool Enabled { get; set; }
public bool Enabled { get; set; } = true;
public bool Visible
{
get => _visible;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public void Behavior_ShouldCreateLinkWithSinglePortAnchorSource_WhenMouseDownOnP
Initialized = true,
Position = new Point(110, 60),
Size = new Size(10, 20),
Enabled = false,
});

// Act
Expand Down Expand Up @@ -455,7 +454,7 @@ public void Behavior_ShouldNotCreateLinkWithSinglePortAnchorSource_WhenMouseDown
Initialized = true,
Position = new Point(110, 60),
Size = new Size(10, 20),
Enabled = true,
Enabled = false,
});

// Act
Expand Down

0 comments on commit d9a3ace

Please sign in to comment.