File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 44using Blazor . Diagrams . Core . Layers ;
55using Blazor . Diagrams . Core . Models . Base ;
66using Blazor . Diagrams . Core . Events ;
7- using System ;
8- using System . Collections . Generic ;
9- using System . Linq ;
107using System . Runtime . CompilerServices ;
118using Blazor . Diagrams . Core . Options ;
129using Blazor . Diagrams . Core . Controls ;
@@ -38,7 +35,7 @@ public abstract class Diagram
3835 public event Action ? ContainerChanged ;
3936 public event Action ? Changed ;
4037
41- protected Diagram ( )
38+ protected Diagram ( bool registerDefaultBehaviors = true )
4239 {
4340 _behaviors = new Dictionary < Type , Behavior > ( ) ;
4441 _orderedSelectables = new List < SelectableModel > ( ) ;
@@ -56,6 +53,9 @@ protected Diagram()
5653 Links . Removed += OnSelectableRemoved ;
5754 Groups . Removed += OnSelectableRemoved ;
5855
56+ if ( ! registerDefaultBehaviors )
57+ return ;
58+
5959 RegisterBehavior ( new SelectionBehavior ( this ) ) ;
6060 RegisterBehavior ( new DragMovablesBehavior ( this ) ) ;
6161 RegisterBehavior ( new DragNewLinkBehavior ( this ) ) ;
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using Blazor . Diagrams . Components . Controls ;
1+ using Blazor . Diagrams . Components . Controls ;
42using Blazor . Diagrams . Core ;
53using Blazor . Diagrams . Core . Controls . Default ;
64using Blazor . Diagrams . Core . Models . Base ;
@@ -12,7 +10,7 @@ public class BlazorDiagram : Diagram
1210{
1311 private readonly Dictionary < Type , Type > _componentsMapping ;
1412
15- public BlazorDiagram ( BlazorDiagramOptions ? options = null )
13+ public BlazorDiagram ( BlazorDiagramOptions ? options = null , bool registerDefaultBehaviors = true ) : base ( registerDefaultBehaviors )
1614 {
1715 _componentsMapping = new Dictionary < Type , Type >
1816 {
You can’t perform that action at this time.
0 commit comments