3.0.0 beta 1 #228
zHaytam
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
.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
BlazorDiagramclass (inheritsDiagram) to the blazor package to replace the old Core oneBlazorDiagramOptionsthat inherit from the other diagram options to add Blazor (UI) specific optionsBlazor.Diagrams.Models.SvgNodeModelclass to represent a node that needs to be rendered in the SVG layerGetBehavior<T>method toDiagramin order to retrieve a registered behaviorKeyboardShortcutsBehaviorclass which handles keyboard shortcuts/actions:SetShortcut: sets an action (Func<Diagrambase, ValueTask>) to be executed whenever the specified combination is pressedRemoveShortcut: removes a defined action (if it exists)KeyboardShortcutsDefaultscontaining the default shortcuts that were deleted (DeleteSelectionandGrouping)SourceandTargetof typeAnchorSinglePortAnchor: 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 shapeDynamicAnchor: Specifies that the connection point is one of the given positions (closest)IShape GetShape()method on nodes (defaultRectangle) and ports (defaultCircle)Options.LinksLayerOrderto indicate the order of the links layer (svg for blazor)Options.NodesLayerOrderto indicate the order of the nodes layer (html for blazor)SvgGroupModel)node locked, the classesselected groupedIHasBoundsandIHasShapeinterfaces to both nodes and portsIPositionProviderto encapsulate how certain positions are calculated given a modelBoundsBasedPositionProviderreturns the position based on the bounds of the model (e.g. (0.5, 0.5) would be the center)ShapeAnglePositionProviderreturns the position as the point at the angle of the shapeLinkPathPositionProviderreturns the position based on the link's path (getPointAtLength)DiagramnowPointerEnterandPointerLeaveevents for nodes and links for nowGeneratedPathResultandPathstoBaseLinkModelto always have access to the actual pathsControlsfeature (beta):Controldesignates a control that has a position and will be rendered if visibleExecutableControldesignates a control that has a position and will be executed when pressed (PointerDown event)BoundaryControlshows the model's boundaryRemoveControlshows a button that when clicked, removes the model from the diagramDragNewLinkshows a button that when clicked, starts a new link dragging from that nodeGridWidgeta background grid that moves with the diagram instead of being fixed like in the Snap to grid exampleChanged
Diagramis now abstractDiagram.GetComponentForModelnow accepts acheckSubclassesargument (defaulttrue)ValueTask<bool>instead of a simpleboolAllLinkstoPortLinksfor more clarity on which links, sinceLinkscontains the othersGroupRendererwill take care of rendering the group with the appropriate style and classesGroupNodesis required,GroupLinkswas deleted because all links are shown in the svg layer (with appropriate order)Diagram.AddGroupwill now return the added groupMouseevents have been converted toPointereventsPathGeneratornow returnSvgPathinstead of just stringsNavigatorWidgetwas rewritten to be faster, lighter, WORKING and customizableFixed
@key(Problem with removing ports #220)Removed
DefaultNodeComponentandDefaultLinkComponentoptions (seeGetComponentForModelchanges)RenderLayerfrom the Core package and all its usageDeleteSelectionBehaviorsince there is a new keyboard shortcuts systemGroupingBehaviorsince there is a new keyboard shortcuts systemBaseLinkModelExtensionssince it was ObseleteShapeDefinerdelegate and constructor arguments on nodes since delegates can't be serializedTouchXeventsThis discussion was created from the release 3.0.0 beta 1.
Beta Was this translation helpful? Give feedback.
All reactions