Skip to content

Commit 20563dd

Browse files
authored
Merge pull request #106 from Blazor-Diagrams/develop
Version 2.1.1
2 parents 9fa3960 + d07b16b commit 20563dd

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

CHANGELOG.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## Diagrams (2.1.1) - 2021-05-25
8+
9+
### Fixed
10+
11+
- Exception when navigating to the Options page (#95).
12+
- Portless links not deleted when node is deleted (#96).
13+
714
## Diagrams (2.1.0) - 2021-03-24
815

916
## Added
@@ -17,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1724

1825
## Diagrams (2.0.0) - 2021-03-24
1926

20-
## Added
27+
### Added
2128

2229
- `GroupUngrouped` event (not the greatest name 😄)
2330
- Touch events `TouchStart`, `TouchMove` and `TouchEnd`
@@ -91,7 +98,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9198
- This also works for groups, since groups are nodes
9299
- Unit tests
93100

94-
## Changed
101+
### Changed
95102

96103
- Renamed `DiagramManager` to `Diagram`
97104
- Remove need to specify `Name` in diagram's `CascadingValue`
@@ -127,7 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
127134
- Only render links when ports/nodes are initialized (position and/or size received)
128135
- This will avoid the weird flicker where links show at (0, 0) then move to the correct position
129136

130-
## Fixed
137+
### Fixed
131138

132139
- Remove links when groups are removed
133140
- Issue where links are clickable outside the visible stroke
@@ -147,45 +154,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
147154

148155
## Diagrams [1.5.2] - 2021-01-18
149156

150-
## Fixed
157+
### Fixed
151158

152159
- Missing MouseUp event on links.
153160

154161
## Diagrams [1.5.1] - 2021-01-09
155162

156-
## Added
163+
### Added
157164

158165
- `AddGroup`: add an instance of a group to the diagram.
159166
- Custom group documentation/demo.
160167

161-
## Fixed
168+
### Fixed
162169

163170
- Clicking the canvas in the Events demo throws an exception.
164171

165172
## Diagrams [1.5.0] - 2021-01-05
166173

167-
## Added
174+
### Added
168175

169176
- The ability to have ports on groups.
170177
- **EXPERIMENTAL/INCOMPLETE** Nested groups. Since `GroupModel` now inherits `NodeMode`, it became possible to have nested groups, but there are still problems with the order of links between groups.
171178
- A `Class` parameter to `GroupContainer`.
172179

173-
## Changed
180+
### Changed
174181

175182
- Only rerender groups when necessary.
176183
- Receiving the same size from `ResizeObserver` doesn't trigger a rerender anymore.
177184
- Avoid rerendering ports twice to update positions.
178185
- Avoid rerendering ports when their parent node is moving.
179186
- Padding is now handled in `GroupModel` instead of `GroupContainer` (UI). This is because the padding is necessary to have accurate size/position in the group model directly.
180187

181-
## Fixed
188+
### Fixed
182189

183190
- Use `@key` when rendering the list of groups. Not using it caused big/weird render times.
184191
- Groups not showing in Navigator/Overview.
185192

186193
## Diagrams [1.4.2] - 2020-12-30
187194

188-
## Added
195+
### Added
189196

190197
- Locked nodes now have a `locked` class and their cursor is changed to `pointer`.
191198

src/Blazor.Diagrams.Core/Blazor.Diagrams.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<PackageLicenseExpression>MIT</PackageLicenseExpression>
88
<Authors>zHaytam</Authors>
99
<Description>A fully customizable and extensible all-purpose diagrams library for Blazor</Description>
10-
<AssemblyVersion>2.1.0</AssemblyVersion>
11-
<FileVersion>2.1.0</FileVersion>
10+
<AssemblyVersion>2.1.1</AssemblyVersion>
11+
<FileVersion>2.1.1</FileVersion>
1212
<RepositoryUrl>https://github.com/zHaytam/Blazor.Diagrams</RepositoryUrl>
13-
<Version>2.1.0</Version>
13+
<Version>2.1.1</Version>
1414
<PackageId>Z.Blazor.Diagrams.Core</PackageId>
1515
<PackageTags>blazor diagrams diagramming svg drag</PackageTags>
1616
<Product>Z.Blazor.Diagrams.Core</Product>

src/Blazor.Diagrams.Core/DiagramOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ public class DiagramGroupOptions
8585
/// </summary>
8686
public class DiagramConstraintsOptions
8787
{
88+
[Description("Decide if a node can/should be deleted")]
8889
public Func<NodeModel, bool> ShouldDeleteNode { get; set; } = _ => true;
90+
[Description("Decide if a link can/should be deleted")]
8991
public Func<BaseLinkModel, bool> ShouldDeleteLink { get; set; } = _ => true;
92+
[Description("Decide if a group can/should be deleted")]
9093
public Func<GroupModel, bool> ShouldDeleteGroup { get; set; } = _ => true;
9194
}
9295
}

src/Blazor.Diagrams.Core/Layers/NodeLayer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public override void Remove(NodeModel node)
1515
protected override void OnItemRemoved(NodeModel node)
1616
{
1717
Diagram.Links.Remove(node.AllLinks.ToList());
18+
Diagram.Links.Remove(node.Links.ToList());
1819
node.Group?.RemoveChild(node);
1920
}
2021
}

src/Blazor.Diagrams/Blazor.Diagrams.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<RazorLangVersion>3.0</RazorLangVersion>
66
<Authors>zHaytam</Authors>
77
<PackageLicenseExpression>MIT</PackageLicenseExpression>
8-
<AssemblyVersion>2.1.0</AssemblyVersion>
9-
<FileVersion>2.1.0</FileVersion>
8+
<AssemblyVersion>2.1.1</AssemblyVersion>
9+
<FileVersion>2.1.1</FileVersion>
1010
<RepositoryUrl>https://github.com/zHaytam/Blazor.Diagrams</RepositoryUrl>
1111
<Description>A fully customizable and extensible all-purpose diagrams library for Blazor</Description>
12-
<Version>2.1.0</Version>
12+
<Version>2.1.1</Version>
1313
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1414
<PackageTags>blazor diagrams diagramming svg drag</PackageTags>
1515
<PackageId>Z.Blazor.Diagrams</PackageId>

0 commit comments

Comments
 (0)