Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gna/wtg blazor diagram #9

Merged
merged 212 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
88ab362
don't update the group's dimensions if the last child is remove.
chunliu Nov 17, 2021
89d1efb
Updates to supoort groups in a group.
chunliu Nov 23, 2021
9026312
Revert "Updates to supoort groups in a group."
chunliu Nov 24, 2021
3e532dc
Merge pull request #159 from chunliu/dev
zHaytam Nov 26, 2021
af6eb4d
Add Blazor.Diagrams tests project
zHaytam Jan 15, 2022
2790dd0
Add tests for LinkVertex,Node and SvgNode widgets
zHaytam Jan 15, 2022
c18b9cc
Use InvokeAsync(SHC)
zHaytam Jan 23, 2022
e3e8811
Update LinkVertexWidget.razor.cs
zHaytam Jan 29, 2022
022149d
Upgrade all projects to .NET 6
zHaytam Jan 29, 2022
8d573be
Fixes issue with `<img/>` dragging on FireFox.
Mar 29, 2022
7d5141e
Fixed null argument exception when diagram is toggled on/off
Rickybarb5 Mar 30, 2022
573fc33
Update NavigatorWidget.razor.cs
Rickybarb5 Mar 30, 2022
d042599
Added clamp value if zoom is less or equal to 0
Rickybarb5 Mar 31, 2022
7f7e148
Changed min zoom value
Rickybarb5 Mar 31, 2022
92788d5
Replaced const with values from zoom options
Rickybarb5 Mar 31, 2022
5d2dcc9
Added checks for zoom value
Rickybarb5 Mar 31, 2022
28f23d3
Merge pull request #187 from Rickybarb5/navigator-improvements
zHaytam Apr 2, 2022
6e15972
Merge pull request #186 from wdcossey/165-firefox-drag-drop-image
zHaytam Apr 2, 2022
e7de071
Added Zoom Options minimum check
Rickybarb5 Apr 5, 2022
4e4617a
Merge pull request #189 from Rickybarb5/zoom-clamp
zHaytam May 1, 2022
5356993
Merge branch 'develop' into 3.0.0
zHaytam Jul 19, 2022
6adabf8
Remove Web dependency from Core project
zHaytam Jul 22, 2022
f4fb158
Fix MouseClick events triggering without both Down/Up events
zHaytam Jul 23, 2022
c590e8a
Turn Point and Size into records
zHaytam Jul 23, 2022
f9fd4d9
Fix Virtualization throwing JSException
zHaytam Jul 25, 2022
3b03eda
Add inheritance support to GetComponentForModel
zHaytam Jul 31, 2022
c101f5c
Refactor constraints to be async (ValueTask)
zHaytam Aug 2, 2022
c6788ed
Remove RenderLayer and add SvgNodeModel
zHaytam Aug 5, 2022
6b6e74e
Add Keyboard Shortcuts behavior
zHaytam Aug 5, 2022
831303c
Fix build errors
zHaytam Aug 6, 2022
5c058c1
Add KeyboardShortcutsBehaviorTests
zHaytam Aug 6, 2022
61cc7a6
Update build.yml
zHaytam Aug 6, 2022
5ad22fc
Update build.yml
zHaytam Aug 6, 2022
ec3d977
Update build.yml
zHaytam Aug 6, 2022
cafa127
Update build.yml
zHaytam Aug 6, 2022
3131003
Add Anchors functionality
zHaytam Aug 9, 2022
5506ad4
Fix tests
zHaytam Aug 9, 2022
b862549
Remove unnecessary port refreshes when dragging link ends/snapping
zHaytam Aug 10, 2022
3e808b4
Add unit tests for DragNewLinkBehavior
zHaytam Aug 10, 2022
767205b
Rename AllLinks to PortLinks
zHaytam Aug 11, 2022
cadb166
Add MiddleIfNoMarker option (default false)
zHaytam Aug 11, 2022
dd961d8
Remove ShapeDefiner & Add virtual GetShape method to nodes
zHaytam Aug 11, 2022
199cd80
Add virtual GetShape method to ports
zHaytam Aug 11, 2022
cc7e446
Add UseShapeAndAlignment option to SinglePortAnchor
zHaytam Aug 11, 2022
9069d24
Add support for nested groups
zHaytam Aug 12, 2022
9b86391
Add support for SVG groups
zHaytam Aug 13, 2022
994fd76
Use butt stroke linecap instead of round
zHaytam Aug 13, 2022
ec03d3f
Add custom svg group demo
zHaytam Aug 13, 2022
85df470
Fix unit tests
zHaytam Aug 13, 2022
b9d1b91
Add locked, selected & grouped classes to node container directly
zHaytam Aug 13, 2022
a5077a2
Add @key when looping through ports
zHaytam Aug 13, 2022
c719884
Add @key when looping through ports
zHaytam Aug 13, 2022
f478241
Swallow ObjectDisposedException in ObserveResizes
zHaytam Aug 13, 2022
573df5e
SVG nested groups
zHaytam Aug 14, 2022
385d351
Add DynamicAnchor
zHaytam Aug 14, 2022
78f947d
Add unit tests for DynamicAnchor
zHaytam Aug 14, 2022
96542bb
Make DynamicAnchor more generic
zHaytam Aug 17, 2022
507491d
Add unit tests for ShapeAnglePositionProvider
zHaytam Aug 17, 2022
5f954b5
Make position providers not tied to Dynamic anchor
zHaytam Aug 18, 2022
ad1361c
Fix namespace
zHaytam Aug 18, 2022
944b662
Fix links not refreshing after ReconnectLinksToClosestPorts
zHaytam Aug 24, 2022
1bce97a
Make PathGenerators return SvgPath and cache the paths on links
zHaytam Aug 24, 2022
875f587
Switch to pointer events instead of mouse/touch separately
zHaytam Aug 26, 2022
51a880e
Add PointerEnter/Leave events (nodes only for now)
zHaytam Aug 26, 2022
e447dd0
Make Diagram abstract / Add BlazorDiagram derived / Abstract options …
zHaytam Aug 27, 2022
c7a4108
Add Model to Changed event & Add new user actions feature
zHaytam Aug 28, 2022
2db0681
Rename user actions to Controls and add BoundaryControl
zHaytam Aug 29, 2022
72f27fb
Add LinkPathPositionProvider
zHaytam Aug 29, 2022
f8e02b5
Add offset parameter to LinkPathPositionProvider
zHaytam Aug 29, 2022
b89fd2e
Capture MouseEnter/Leave for links too
zHaytam Aug 29, 2022
13e7850
Only rerender controls when they are visible
zHaytam Aug 29, 2022
2fd10f2
Fix link not refreshing after vertex is created (vertex shows out of …
zHaytam Aug 29, 2022
22c4db1
Add ILinkable interface for models that can have links to make link c…
zHaytam Aug 31, 2022
1ce17af
Update BaseLinkModelTests.cs
zHaytam Aug 31, 2022
be75ddf
Fix docs
zHaytam Aug 31, 2022
cd7b6dd
Add SinglePortAnchor unit tests
zHaytam Aug 31, 2022
ef886cd
Add unit tests for ShapeIntersectionAnchor
zHaytam Sep 1, 2022
4e0dfe1
Update Blazor.Diagrams.Tests.csproj
zHaytam Sep 1, 2022
331076d
Update Blazor.Diagrams.csproj
zHaytam Sep 1, 2022
ea47d8a
Add new Blazor.Diagrams.Widgets namespace
zHaytam Sep 1, 2022
e6eacbf
Refactor
zHaytam Sep 1, 2022
7511b4b
Add GridWidget (Thanks to @xevoryn)
zHaytam Sep 2, 2022
e098510
Rewrite Navigator to be lighter, faster & can take node shape into ac…
zHaytam Sep 3, 2022
160baee
Add dynamic anchor test page
zHaytam Sep 4, 2022
ead6b77
Update versions and changelog
zHaytam Sep 4, 2022
b9c3544
Update build.yml
zHaytam Sep 4, 2022
20f62b6
Merge pull request #227 from Blazor-Diagrams/3.0.0
zHaytam Sep 4, 2022
60de7b0
WIP
zHaytam Sep 6, 2022
d5d9f90
Add Moved event to Movables
zHaytam Sep 6, 2022
8f67e2a
Rename RegisterModelComponent and GetComponentForModel to remove Mode…
zHaytam Sep 8, 2022
e1d1f0f
Update BlazorDiagram.cs
zHaytam Sep 8, 2022
062adea
Add VirtualizationBehavior and VirtualizationOptions and Visible prop…
zHaytam Sep 9, 2022
582773a
Render link labels without foreignObejct in widget no MarkupString
zHaytam Sep 10, 2022
ea5258d
Only trigger Moved event when movable actually moved
zHaytam Sep 10, 2022
2bc24d4
Add PointerEnter/Leave events to groups
zHaytam Sep 10, 2022
7774f74
Add experimental Link to Link
zHaytam Sep 11, 2022
2a1f7d0
Update Versions & CHANGELOG
zHaytam Sep 11, 2022
3646b0e
Update CHANGELOG.md
zHaytam Sep 11, 2022
f26285b
Fix date in changelog
zHaytam Sep 11, 2022
98de531
Merge branch 'master' into develop
zHaytam Sep 11, 2022
e7d29c3
Update CHANGELOG.md
zHaytam Sep 11, 2022
11b8143
Add README to packages
zHaytam Sep 13, 2022
a4e46b5
Add support for LinkFactory to return null in order to not create an …
zHaytam Sep 13, 2022
1b2d56c
Remove PositionProvider param from ExecutableControl for more freedom
zHaytam Sep 14, 2022
f22a85a
Fix LinkPathPositionProvider not working with maxlength ratios
zHaytam Sep 14, 2022
4e4f655
Add support for free links (no target required)
zHaytam Sep 14, 2022
31786a9
Add GridSnapToCenter to DiagramOptions
240026763 Sep 15, 2022
095e3ce
Snap to Center of Node
240026763 Sep 15, 2022
8142068
Use MovableModel and check for is NodeModel when snapping to center
240026763 Sep 15, 2022
921935f
Check that it is a MovableModel instead of NodeModel
240026763 Sep 15, 2022
15920a4
Add Toggle Snap To Center to Snap to Grid Demo
240026763 Sep 15, 2022
47ecea8
Adjust info for demo
240026763 Sep 15, 2022
772e401
Remove Offset from Anchor and make Model nullable
zHaytam Sep 15, 2022
ed8a05b
Remove Offset from Anchor and make Model nullable
zHaytam Sep 15, 2022
b109146
Remove Id and Refresh from ILinkable
zHaytam Sep 15, 2022
6a071ef
Replace OngoingPosition with a PositionAnchor, Link.Target is now nev…
zHaytam Sep 16, 2022
7a2d584
Fix deleting link not deleting other links attached to it
zHaytam Sep 16, 2022
71567e7
Add ArrowHeadControl to control Source/Target on the fly
zHaytam Sep 16, 2022
da6facc
Add attached class to attached links
zHaytam Sep 17, 2022
11d2926
Move DynamicAnchor back to Anchors namespace and seal all Anchor classes
zHaytam Sep 18, 2022
f5dc8f0
Add Batch call when a node is removed
zHaytam Sep 19, 2022
978e5e7
Remove delete namespace
zHaytam Sep 19, 2022
c37e436
Update Versions & CHANGELOG
zHaytam Sep 19, 2022
2799a9c
Add Unit Test for GridSnapToCenter
240026763 Sep 19, 2022
95d5942
Additional inlines to help understanding
240026763 Sep 19, 2022
bdaac87
Fix reversed deltas
240026763 Sep 19, 2022
a528875
Merge pull request #241 from 240026763/GridSnapToCenter
zHaytam Sep 22, 2022
7d31313
Add GroupLayer & Fix a couple of bugs
zHaytam Oct 8, 2022
a080152
Update GroupLayerTests.cs
zHaytam Oct 9, 2022
8d6d9c7
Add more unit tests and avoid some refreshes
zHaytam Oct 15, 2022
e2b6779
Add initial version of selectables' ordering (nodes, groups and links)
zHaytam Oct 15, 2022
15f6d1d
Fix some demo pages
zHaytam Oct 15, 2022
09c9a8e
Fix bug where moving a single grandchild in groups doesn't move the g…
zHaytam Oct 16, 2022
bcd1247
Update Versions & CHANGELOG
zHaytam Oct 16, 2022
a239bbe
Add AdditionalSvg and AdditionalHtml render fragments to DiagramCanvas
zHaytam Nov 2, 2022
cf88214
Optimize Orthogonal router by using custom astar
zHaytam Nov 2, 2022
b7f1736
Update Routers.Orthogonal.cs
zHaytam Nov 3, 2022
9731286
Convert Routers & PathGenerators to classes instead of functions with…
zHaytam Nov 7, 2022
230aa6d
Add DistanceTo overload that takes into account the x and y instead o…
zHaytam Nov 13, 2022
b2d233c
Add FullPath to PathGeneratorResult and Fix issue where only parts of…
zHaytam Nov 13, 2022
062c90a
Add path simplification in orthogonal router
zHaytam Nov 14, 2022
8b3c77e
Use fallback router instead of throwing exception in OrthogonalRouter
zHaytam Nov 14, 2022
084f22a
Add margin options to OrthogonalRouter
zHaytam Nov 14, 2022
d3af252
Only keep bends in the output of the Orthogonal router
zHaytam Nov 20, 2022
8d5df78
Add radius option to StraightPathGenerator in order to generate round…
zHaytam Nov 20, 2022
2cf4a77
Add MoveAlongLine method to Point (by a distance)
zHaytam Nov 20, 2022
20b0ccf
Update StraightPathGenerator.cs
zHaytam Nov 20, 2022
cbee9b8
Use Quadratic curve for rounded corners
zHaytam Nov 21, 2022
fe4af0e
Remove unused method
zHaytam Nov 21, 2022
8803be9
Add LinkVertexRenderer in order to be able to use custom component fo…
zHaytam Nov 22, 2022
b3caf1a
Add unit test for custom vertex component case
zHaytam Nov 22, 2022
9198933
Add AutoSize option to groups to control whether moving children resi…
zHaytam Nov 23, 2022
2422aa8
Update Versions & CHANGELOG
zHaytam Nov 24, 2022
f392f59
Merge branch 'develop' into new-site
zHaytam Nov 27, 2022
814932c
Add statistics line
zHaytam Dec 4, 2022
eed6483
Fix portless links in children not refreshing when moving the parent …
zHaytam Dec 7, 2022
2275327
Add Widgets, Groups and Svg/Html features
zHaytam Dec 8, 2022
92e43f0
Fix link GetBounds
zHaytam Dec 12, 2022
caaac64
Finish landing page
zHaytam Dec 24, 2022
d297059
Add GitHub link in landing page
zHaytam Dec 24, 2022
e2e87ff
Make BaseLayer.Add return specific type given in argument
zHaytam Dec 24, 2022
06756d2
Set default values for the landing page showcase diagram
zHaytam Dec 24, 2022
23f2515
Add diagram- prefix to CSS classes to avoid clashes
zHaytam Dec 27, 2022
1ebeb84
Add GettingStarted section in Documentation
zHaytam Dec 28, 2022
dd41c38
Add Layers, Behaviors, Options and API diagram sections in Documentation
zHaytam Dec 31, 2022
30de559
Update Api.razor
zHaytam Jan 1, 2023
421ae5e
Fix port snapping not choosing the closest one
zHaytam May 7, 2023
628f2f2
Add Groups Documentation and Keyboards Shortcuts
zHaytam May 7, 2023
e059949
Replace Layers documentation with Overview
zHaytam May 8, 2023
30275c2
Update Behaviors.razor
zHaytam May 8, 2023
2ce9e82
Add TargetAttached event
zHaytam May 9, 2023
286f092
Fix issue where diagram overwrites model order AND add SuspendSorting…
zHaytam May 9, 2023
02634bf
Update Versions & CHANGELOG
zHaytam May 10, 2023
c153569
Merge pull request #315 from Blazor-Diagrams/new-site
zHaytam May 10, 2023
e42d07c
Update Diagram.cs
zHaytam May 10, 2023
0f7cc88
Update Versions & CHANGELOG
zHaytam May 10, 2023
098c5b4
Merge pull request #317 from Blazor-Diagrams/new-site
zHaytam May 10, 2023
60f8ee1
Ensure that element exists in (un)observe (js)
zHaytam Jun 19, 2023
1ffd7e5
Add Nodes customization
zHaytam Jun 20, 2023
82d6ba7
File-scoped namespaces for less indent
zHaytam Jul 3, 2023
41bc4a9
Add Nodes SVG Customization doc
zHaytam Jul 3, 2023
a0447b2
Add ordering doc and fix navigation buttons
zHaytam Jul 4, 2023
8805ffb
Ugly documentation overview page placeholder
zHaytam Jul 4, 2023
d7e52a9
Remove useless Console Writelines from GroupModel
zHaytam Jul 4, 2023
561e60a
Add autoSize argument to SvgGroupModel ctor
zHaytam Jul 4, 2023
79893b3
Add Groups Customization (SVG) doc
zHaytam Jul 4, 2023
c92d2e7
Rename FixedSize to ControlledSize
zHaytam Jul 5, 2023
6506f44
Some cleanup
zHaytam Jul 5, 2023
8b3bb63
Remove unused namespaces
zHaytam Jul 5, 2023
c6dab66
Avoid rendering link selection helper while dragging link
zHaytam Jul 12, 2023
f078a68
Rename Point.Substract to Subtract (duh)
zHaytam Jul 12, 2023
9fb3ee3
Fix mouse overlapping dragged link
zHaytam Jul 20, 2023
eac192e
Add Ports customization doc
zHaytam Jul 22, 2023
4a19d95
Correct ports overview doc
zHaytam Jul 22, 2023
6929550
Add AddLabel method to links and fix SmoothPathGenerator not working …
zHaytam Aug 11, 2023
6efe9b4
Add links Overview and Anchors documentation
zHaytam Aug 11, 2023
3b25b32
Add AddVertex method to links
zHaytam Aug 13, 2023
4849b4d
Document link routers and path generators
zHaytam Aug 13, 2023
d76fb67
Document link markers and vertices
zHaytam Aug 13, 2023
7d554ad
Document diagram widgets
zHaytam Aug 14, 2023
8aeba9d
Document controls
zHaytam Aug 14, 2023
d737ee7
Document position providers
zHaytam Aug 14, 2023
648db68
Update Versions, CHANGELOG and Workflow
zHaytam Aug 14, 2023
bf24fe6
Fix failing unit tests
zHaytam Aug 14, 2023
1f7e376
Merge pull request #339 from Blazor-Diagrams/new-site
zHaytam Aug 14, 2023
c27ef34
Merge pull request #340 from Blazor-Diagrams/develop
zHaytam Aug 14, 2023
fdb8e90
Update main.yml
zHaytam Aug 14, 2023
cbf09ba
Update main.yml
zHaytam Aug 14, 2023
f208f73
Add GitHub pages fix to Site
zHaytam Aug 14, 2023
6a8eb9a
Fix GitHub pages
zHaytam Aug 14, 2023
2ef2e73
Rebase WTG.Blazor.Diagram from v3.0.0.0
gnawisetech Aug 18, 2023
4b67e27
Update build.yml
matatouille Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Pack
if: matrix.configuration == 'Release'
run: dotnet pack --configuration ${{ matrix.configuration }} -o packages
run: dotnet pack --configuration ${{ matrix.configuration }} -o packages --no-build

- name: Upload packages
if: matrix.configuration == 'Release'
Expand Down
28 changes: 23 additions & 5 deletions Blazor.Diagrams.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.128
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EE32E278-A887-454E-987D-FFE9E37169FE}"
EndProject
Expand All @@ -21,7 +21,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Diagrams.Algorithms"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{260DF53D-FF2B-4D1D-ACA7-431F6B62EE38}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
CHANGELOG.md = CHANGELOG.md
.github\workflows\main.yml = .github\workflows\main.yml
README.md = README.md
EndProjectSection
EndProject
Expand All @@ -31,11 +33,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Diagrams.Core.Tests"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A9FC9B20-A9F1-4066-8B59-83BD26D3B1C8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagram-Demo", "docs\Diagram-Demo\Diagram-Demo.csproj", "{5F423724-5319-4DCE-B9F2-8B2D7E1FDC17}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Diagram-Demo", "docs\Diagram-Demo\Diagram-Demo.csproj", "{5F423724-5319-4DCE-B9F2-8B2D7E1FDC17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomNodesLinks", "docs\CustomNodesLinks\CustomNodesLinks.csproj", "{3D104DB4-C7F0-42CA-9D78-AB2C8A8AE3D5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomNodesLinks", "docs\CustomNodesLinks\CustomNodesLinks.csproj", "{3D104DB4-C7F0-42CA-9D78-AB2C8A8AE3D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Layouts", "docs\Layouts\Layouts.csproj", "{78C85C89-B464-4083-8829-78BA52BB4780}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Layouts", "docs\Layouts\Layouts.csproj", "{78C85C89-B464-4083-8829-78BA52BB4780}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Diagrams.Tests", "tests\Blazor.Diagrams.Tests\Blazor.Diagrams.Tests.csproj", "{ED3B0D8F-F29A-4C66-A167-C36824A76902}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "site", "site", "{F1E6F4C0-3EC7-4CFF-834A-0CF207CCFF3E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Site", "site\Site\Site.csproj", "{F26307EC-C188-44BD-B3E5-960318F43C0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -83,6 +91,14 @@ Global
{78C85C89-B464-4083-8829-78BA52BB4780}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78C85C89-B464-4083-8829-78BA52BB4780}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78C85C89-B464-4083-8829-78BA52BB4780}.Release|Any CPU.Build.0 = Release|Any CPU
{ED3B0D8F-F29A-4C66-A167-C36824A76902}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED3B0D8F-F29A-4C66-A167-C36824A76902}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED3B0D8F-F29A-4C66-A167-C36824A76902}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED3B0D8F-F29A-4C66-A167-C36824A76902}.Release|Any CPU.Build.0 = Release|Any CPU
{F26307EC-C188-44BD-B3E5-960318F43C0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F26307EC-C188-44BD-B3E5-960318F43C0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F26307EC-C188-44BD-B3E5-960318F43C0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F26307EC-C188-44BD-B3E5-960318F43C0C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -98,6 +114,8 @@ Global
{5F423724-5319-4DCE-B9F2-8B2D7E1FDC17} = {A9FC9B20-A9F1-4066-8B59-83BD26D3B1C8}
{3D104DB4-C7F0-42CA-9D78-AB2C8A8AE3D5} = {A9FC9B20-A9F1-4066-8B59-83BD26D3B1C8}
{78C85C89-B464-4083-8829-78BA52BB4780} = {A9FC9B20-A9F1-4066-8B59-83BD26D3B1C8}
{ED3B0D8F-F29A-4C66-A167-C36824A76902} = {CEEAE4C2-CE68-4FC3-9E0F-D4781B91F7F4}
{F26307EC-C188-44BD-B3E5-960318F43C0C} = {F1E6F4C0-3EC7-4CFF-834A-0CF207CCFF3E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {969540A2-8162-4063-A4E3-B488F69BD582}
Expand Down
243 changes: 243 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,252 @@

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Diagrams (3.0.0) - 2023-08-14

Finally, the new documentation website is here!
Please don't hesitate to create issues for any problems or improvements.
PS: I suck at design.

### Added

- `AddLabel` method to links to easily create `LinkLabelModel`
- `AddVertex` method to links to easily create `LinkVertexModel`
- `ControlledSize` property to nodes. If `true`, the node will not be registered in the `ResizeObserver` (saves a JS call).
- `autoSize` argument to `SvgGroupModel` constructor

### Changed

- Renamed `Point.Substract` to `Subtract` (duh)
- Avoid rendering link selection helper on dragged link

### Fixed

- `SmoothPathGenerator` not working with `LinkAnchor`
- Mouse overlapping dragged link
- Useless Console Logs from `GroupModel` are now removed
- JS exception in `(un)oberve` methods when the element doesn't exist anymore

## Diagrams (3.0.0-beta.6) - 2023-05-09

### Added

- `Style` parameter to `PortRenderer`
- `TargetAttached` to links, which triggers when a dragged link attaches to a target
- If port snapping is enabled, it will trigger only once when you let go of the mouse
- `SuspendSorting` to `Diagram` in order to suspend sorting models in each `OrderChanged`
- If you know what you're doing, you could save some processing and avoid sorting everytime
- `RefreshOrders` to be called after unsuspending sorting in order to sort the models again and refresh the diagram

### Changed

- `BaseLayer.Add` now returns the specific type given to it in argument
- **[BREAKING]** CSS classes are now prefixed with `diagram-` to avoid clashes with other libraries
- `diagram-group`, `diagram-node`, `diagram-link`, `diagram-port`, `diagram-link-label`, `diagram-link-vertex`, `diagram-control`

### Fixed

- Portless links in children not refreshing when moving the parent group
- Link's `GetBounds` not returning a valid box
- Port snapping choosing the first port in radius rather than the closest one
- Remove `Console.WriteLine` from `KeyboardShortcutsBehavior`
- Diagram overwriting `Order` when it's not zero (zero being the default int value, which we now consider as not set)

## Diagrams (3.0.0-beta.5) - 2022-11-23

### Added

- `AdditionalSvg` option to `DiagramCanvas` in order to render any exatra SVG content you want
- `AdditionalHtml` option to `DiagramCanvas` in order to render any exatra SVG content you want
- `DistanceTo` overload method to `Point` that takes x and y
- `MoveAlongLine` method to `Point`
- `FullPath` to `PathGeneratorResult` to represent the full path without cuts
- Fallback router to Orthogonal router
- Margin options to `OrthogonalRouter`
- `radius` option to `StraightPathGenerator` in order to generate rounded bends
- Support for custom vertices
- `AutoSize` option to groups to control whether moving children resizes the group

### Changed

- All routers are now classes instead of functions, they inherit from the new abstract class `Router`
- All path generators are now classes instead of functions, they inherit from the new abstract class `PathGenerator`
- Optimize Orthogonal router by using custom A* (x5 improvement)

### Removed

- `Router` delegate
- `PathGenerator` delegate

## Diagrams (3.0.0-beta.4) - 2022-10-16

### Added

- Initial version of Ordering!
- Nodes, groups and links can now be ordered using the new `Order` property or `SendToFront/Back` methods
- `Diagram.OrderedSelectables` returns the ordered selectables/models
- `DiagramCanvas` now uses this new property to render everything
- `GridSnapToCenter` option in order to snap nodes from their center instead of their top/left position (thanks to @[Jeremy Vance](https://github.com/240026763))
- More unit tests

### Changed

- `Groups` is not a list of groups anymore, but a layer instead (just like `Nodes` and `Links`)

### Fixed

- Deleting a group doesn't delete links attached to it
- Deleting a group inside of a group doesn't refresh the parent group
- Links not refreshing when a group's dimensions are updated directly (e.g. deleting a child)
- Layers causing more refreshes than intended

### Removed

- All group-related methods and events from `Diagram`, please use the new layer from now on

## Diagrams (3.0.0-beta.3) - 2022-09-18

### Added

- Support for `LinkFactory` to return null in order to not create an ongoing link
- Support for free links (no source/target required)
- `PositionAnchor` which reprensents a simple plain position (mutable)
- `ArrowHeadControl` to control a link's Source/Target on the fly
- `attached` css class to attached links

### Changed

- Replace `OngoingPosition` with the new `PositionAnchor`
- `BaseLinkModel.Target` will never be null anymore. An ongoing link will have a position anchor as the target
- `Links.Factory` signature now takes the diagram, source (model) and the target anchor
- Move `DynamicAnchor` back to `Anchors` namespace and seal all `Anchor` classes

### Fixed

- Links attached to links not refreshing when the others are
- `LinkPathPositionProvider` not working with maxlength ratios
- Deleting a link not deleting the links attached to it

### Removed

- `PositionProvider` argument from `ExecutableControl` for more freedom
- `Id` and `Refresh` from `ILinkable`
- Unused `Offset` from `Anchor` and make `Model` nullable

## Diagrams (3.0.0-beta.2) - 2022-09-11

### Added

- `Moved` event to Movables
- `Visible` property and `VisbilityChanged` event to models
- `Options.Virtualization` (of type `[Diagram]VirtualizationOptions`) for virtualization options
- `PointerEnter/Leave` events for groups as well
- **Experimental Link to Link** (using `LinkAnchor`)

### Changed

- Rename `RegisterModelComponent` to `RegisterComponent`
- Rename `GetComponentForModel` to `GetComponent`
- Virtualization is now handled by a behavior instead of NodeRender
- This means that it works for almost all models (nodes, groups and links)
- Render link labels without foreignObject in widget nor MarkupString (Thank you .NET 6)
- Custom link labels only need to contain relevant content, they don't need to handle positioning anymore

### Removed

- `EnableVirtualization` option (see added alternative)

## Diagrams (3.0.0-beta.1) - 2022-09-04

.NET 6!

A lot of things changed in this version, a lot of breaking changes were introduced but I believe it was necessary.
Many changes were required to make everything clearer, customizable and cleaner (code wise).
I'm aiming to completely decouple the Core library from the UI, because I'm thinking of giving MAUI Diagrams a try very soon!

### Added

- `BlazorDiagram` class (inherits `Diagram`) to the blazor package to replace the old Core one
- `BlazorDiagramOptions` that inherit from the other diagram options to add Blazor (UI) specific options
- `Blazor.Diagrams.Models.SvgNodeModel` class to represent a node that needs to be rendered in the SVG layer
- `GetBehavior<T>` method to `Diagram` in order to retrieve a registered behavior
- `KeyboardShortcutsBehavior` class which handles keyboard shortcuts/actions:
- `SetShortcut`: sets an action (`Func<Diagrambase, ValueTask>`) to be executed whenever the specified combination is pressed
- `RemoveShortcut`: removes a defined action (if it exists)
- `KeyboardShortcutsDefaults` containing the default shortcuts that were deleted (`DeleteSelection` and `Grouping`)
- Anchors functionality:
- An Anchor determines where on an element the link will connect
- Instead of links requiring the source and target to be either both nodes or both ports, there is now only one `Source` and `Target` of type `Anchor`
- This lets the link not worry about the details of from/to where its going, as long as the anchor provides it with its position when asked for
- Current implementations:
- `SinglePortAnchor`: Specifies that the connection point is a specific port (supports shape & alignment)
- `ShapeIntersectionAnchor`: Specifies that the connection point is the intersection of a line with the node's shape
- `DynamicAnchor`: Specifies that the connection point is one of the given positions (closest)
- Virtual `IShape GetShape()` method on nodes (default `Rectangle`) and ports (default `Circle`)
- `Options.LinksLayerOrder` to indicate the order of the links layer (svg for blazor)
- `Options.NodesLayerOrder` to indicate the order of the nodes layer (html for blazor)
- Support for SVG groups that also represent children as a hierarchy (`SvgGroupModel`)
- Node renderer will now append, in addition to `node locked`, the classes `selected grouped`
- `IHasBounds` and `IHasShape` interfaces to both nodes and ports
- `IPositionProvider` to encapsulate how certain positions are calculated given a model
- They are used for dynamic anchors and controls for now
- `BoundsBasedPositionProvider` returns the position based on the bounds of the model (e.g. (0.5, 0.5) would be the center)
- `ShapeAnglePositionProvider` returns the position as the point at the angle of the shape
- `LinkPathPositionProvider` returns the position based on the link's path (`getPointAtLength`)
- Links have a reference to `Diagram` now
- `PointerEnter` and `PointerLeave` events for nodes and links for now
- `GeneratedPathResult` and `Paths` to `BaseLinkModel` to always have access to the actual paths
- `Controls` feature (beta):
- They are things that can show up on top of nodes/links and can even be clicked to be executed
- Their UI is also picked up from the registered components
- `Control` designates a control that has a position and will be rendered if visible
- `ExecutableControl` designates a control that has a position and will be executed when pressed (PointerDown event)
- Default controls for now are:
- `BoundaryControl` shows the model's boundary
- `RemoveControl` shows a button that when clicked, removes the model from the diagram
- `DragNewLink` shows a button that when clicked, starts a new link dragging from that node
- `GridWidget` a background grid that moves with the diagram instead of being fixed like in the Snap to grid example
- More unit tests

### Changed

- Core package changes:
- Web dependency was removed from the Core package
- `Diagram` is now abstract
- These changes were done to decouple the core from the rendering, in the future we might have a MAUI renderer
- `Diagram.GetComponentForModel` now accepts a `checkSubclasses` argument (default `true`)
- Constraints now must return a `ValueTask<bool>` instead of a simple `bool`
- Renamed `AllLinks` to `PortLinks` for more clarity on which links, since `Links` contains the others
- Dragging links from ports will now follow the mouse at the same pace minus 5 pixels so that it doesn't go on top of the link it self or other ports
- How groups are rendered
- `GroupRenderer` will take care of rendering the group with the appropriate style and classes
- Only `GroupNodes` is required, `GroupLinks` was deleted because all links are shown in the svg layer (with appropriate order)
- `Diagram.AddGroup` will now return the added group
- All `Mouse` events have been converted to `Pointer` events
- `PathGenerator` now return `SvgPath` instead of just strings
- `NavigatorWidget` was rewritten to be faster, lighter, WORKING and customizable
- It now can also take the shape of the nodes into account (rect and ellipse for now)

### Fixed

- Virtualization throwing a JSException (#155)
- Ports not rendering correctly because of the missing `@key` (#220)
- Link not refreshing when a new vertex is created, which was showing out of link

### Removed

- `DefaultNodeComponent` and `DefaultLinkComponent` options (see `GetComponentForModel` changes)
- `RenderLayer` from the Core package and all its usage
- `DeleteSelectionBehavior` since there is a new keyboard shortcuts system
- `GroupingBehavior` since there is a new keyboard shortcuts system
- `BaseLinkModelExtensions` since it was Obselete
- Unnecessary port refreshes when dragging a link ends or when link snapping
- `ShapeDefiner` delegate and constructor arguments on nodes since delegates can't be serialized
- `TouchX` events

## Diagrams (2.1.6) - 2021-10-31

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomNodesLinks/CustomNodesLinks.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
21 changes: 10 additions & 11 deletions docs/CustomNodesLinks/Models/DiagramLink.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using Blazor.Diagrams.Core.Models;

namespace CustomNodesLinks.Models
namespace CustomNodesLinks.Models;

public sealed class DiagramLink : LinkModel
{
public DiagramLink(string name, NodeModel sourceNode, NodeModel? targetNode) :

Check warning on line 7 in docs/CustomNodesLinks/Models/DiagramLink.cs

View workflow job for this annotation

GitHub Actions / Build - Debug

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 7 in docs/CustomNodesLinks/Models/DiagramLink.cs

View workflow job for this annotation

GitHub Actions / Build - Release

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
base(name, sourceNode, targetNode)
{
public sealed class DiagramLink : LinkModel
{
public DiagramLink(string name, NodeModel sourceNode, NodeModel? targetNode) :
base(name, sourceNode, targetNode)
{
Name = name;
Labels.Add(new DiagramLinkLabel(this, Name));
}
Name = name;
Labels.Add(new DiagramLinkLabel(this, Name));
}

public string Name { get; set; }
}
public string Name { get; set; }
}
25 changes: 12 additions & 13 deletions docs/CustomNodesLinks/Models/DiagramLinkLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
using Blazor.Diagrams.Core.Models;
using Blazor.Diagrams.Core.Models.Base;

namespace CustomNodesLinks.Models
namespace CustomNodesLinks.Models;

public sealed class DiagramLinkLabel : LinkLabelModel
{
public DiagramLinkLabel(BaseLinkModel parent, string id, string content, double? distance = null, Point? offset = null) :

Check warning on line 9 in docs/CustomNodesLinks/Models/DiagramLinkLabel.cs

View workflow job for this annotation

GitHub Actions / Build - Debug

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 9 in docs/CustomNodesLinks/Models/DiagramLinkLabel.cs

View workflow job for this annotation

GitHub Actions / Build - Release

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
base(parent, id, content, distance, offset)
{
public sealed class DiagramLinkLabel : LinkLabelModel
{
public DiagramLinkLabel(BaseLinkModel parent, string id, string content, double? distance = null, Point? offset = null) :
base(parent, id, content, distance, offset)
{
}
}

public DiagramLinkLabel(BaseLinkModel parent, string content, double? distance = null, Point? offset = null) :
base(parent, content, distance, offset)
{
}
public DiagramLinkLabel(BaseLinkModel parent, string content, double? distance = null, Point? offset = null) :

Check warning on line 14 in docs/CustomNodesLinks/Models/DiagramLinkLabel.cs

View workflow job for this annotation

GitHub Actions / Build - Debug

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 14 in docs/CustomNodesLinks/Models/DiagramLinkLabel.cs

View workflow job for this annotation

GitHub Actions / Build - Release

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
base(parent, content, distance, offset)
{
}

public bool ShowLabel { get; set; } = true;
}
public bool ShowLabel { get; set; } = true;
}
Loading
Loading