Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zHaytam committed Aug 31, 2022
1 parent 1ce17af commit be75ddf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
8 changes: 5 additions & 3 deletions docs/CustomNodesLinks/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

<!-- required to resolve DiagramCanvas component -->
@using Blazor.Diagrams.Components
@using Blazor.Diagrams.Core.Options
@using Blazor.Diagrams.Options
@using CustomNodesLinks.Models
@using CustomNodesLinks.Widgets

Expand All @@ -32,13 +34,13 @@ or it will not be rendered.
{
base.OnInitialized();

var options = new DiagramOptions
var options = new BlazorDiagramOptions
{
AllowMultiSelection = true, // Whether to allow multi selection using CTRL
Links = new DiagramLinkOptions
Links =
{
},
Zoom = new DiagramZoomOptions
Zoom =
{
Minimum = 0.5, // Minimum zoom value
Inverse = false, // Whether to inverse the direction of the zoom when using the wheel
Expand Down
11 changes: 7 additions & 4 deletions docs/Diagram-Demo/Pages/Diagrams.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

<!-- required to resolve DiagramCanvas component -->
@using Blazor.Diagrams.Components
@using Blazor.Diagrams.Core.Options
@using Blazor.Diagrams.Options
@using Blazor.Diagrams

<h1>Z Blazor Diagrams</h1>

Expand All @@ -31,19 +34,19 @@ or it will not be rendered.
{
base.OnInitialized();

var options = new DiagramOptions
var options = new BlazorDiagramOptions
{
AllowMultiSelection = true, // Whether to allow multi selection using CTRL
Links = new DiagramLinkOptions
Links =
{
},
Zoom = new DiagramZoomOptions
Zoom =
{
Minimum = 0.5, // Minimum zoom value
Inverse = false, // Whether to inverse the direction of the zoom when using the wheel
}
};
Diagram = new Diagram(options);
Diagram = new BlazorDiagram(options);

Setup();
}
Expand Down
19 changes: 9 additions & 10 deletions docs/Layouts/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

<!-- required to resolve DiagramCanvas component -->
@using Blazor.Diagrams.Components
@using Blazor.Diagrams.Core.Options
@using GraphShape.Algorithms.Layout
@using Blazor.Diagrams
@using Blazor.Diagrams.Options

<h1>Hello, World of Layouts!</h1>

Expand Down Expand Up @@ -44,19 +47,15 @@ or it will not be rendered.
{
base.OnInitialized();

var options = new DiagramOptions
var options = new BlazorDiagramOptions
{
AllowMultiSelection = true, // Whether to allow multi selection using CTRL
Links = new DiagramLinkOptions
AllowMultiSelection = true,
Zoom =
{
},
Zoom = new DiagramZoomOptions
{
Minimum = 0.5, // Minimum zoom value
Inverse = false, // Whether to inverse the direction of the zoom when using the wheel
}
Minimum = 0.5
} // Whether to allow multi selection using CTRL
};
_diagram = new Diagram(options);
_diagram = new BlazorDiagram(options);

Setup();
}
Expand Down
1 change: 1 addition & 0 deletions src/Blazor.Diagrams.Core/Models/Base/ILinkable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Blazor.Diagrams.Core.Models.Base;

public interface ILinkable
{
public string Id { get; }
public IReadOnlyList<BaseLinkModel> Links { get; }

public bool CanAttachTo(ILinkable other);
Expand Down

0 comments on commit be75ddf

Please sign in to comment.