-
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from miroiu/feature/146-editor-state-flags
Enable toggled interactions for various editor operations
- Loading branch information
Showing
27 changed files
with
547 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Windows.Input; | ||
|
||
namespace Nodify.Interactivity | ||
{ | ||
public static partial class ConnectionState | ||
{ | ||
/// <summary> | ||
/// Represents the default input state for a <see cref="BaseConnection"/>. | ||
/// </summary> | ||
public class Default : InputElementState<BaseConnection> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Default"/> class. | ||
/// </summary> | ||
/// <param name="connection">The <see cref="BaseConnection"/> element associated with this state.</param> | ||
public Default(BaseConnection connection) : base(connection) | ||
{ | ||
} | ||
|
||
protected override void OnMouseDown(MouseButtonEventArgs e) | ||
{ | ||
// Allow context menu to appear | ||
if (e.ChangedButton == MouseButton.Right && Element.HasContextMenu) | ||
{ | ||
Element.Focus(); | ||
e.Handled = true; // prevents the editor capturing the mouse | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.