yFiles.NET (WinForms)Changelog
yFiles.NET 6.0
This version brings a major overhaul of many parts of the API, resulting in a lot of incompatible changes. We have designed many functions to be simpler, more intuitive and more consistent and removed technical debt.
In addition, this release contains numerous new features, improvements, and bug fixes to all parts of the library.
For a tour of this release's highlights, have a look at the article about yFiles.NET 6.0.
If you are updating from an older version of yFiles.NET, have a look at the list of incompatible changes and at the more detailed description in the Migration Guide.
Major new Feature: Support for Touch and Stylus Input
yFiles.NET now supports touch and stylus devices.
Touch input is now available across all built-in input modes. Numerous new properties enable full customization of input modes for mouse, stylus, and touch interactions.
The new versatile Pointer events replace the previous Mouse2D events. Pointer events support mouse, touch, and stylus inputs, providing generic properties such as event type (e.g., Up or Down) and location, as well as specific details like stylus pressure and touch size.
New Features, Improvements, and Bug Fixes
Categories: General Graph Controls Rendering Selection, Focus, Highlight Styles Interaction Label Editing Snapping Clipboard Folding View-Layout-Bridge Layout Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Radial Tree Layout Series-parallel Layout Partial Layout Tabular Layout Component Layout Algorithms Analysis Geometry
General
New Features and Improvements
- The yFiles library now consists of one single assembly.
-
All uses of the
IListEnumerable
interface have been replaced by the<T>
IReadOnlyList
interface. This means that standard collections such as List<T>
<T>
can now be used there. Accordingly, theListEnumerableExtensions
andListEnumerable
classes have been removed.<T>
-
The lookup API has been restructured. In particular, the
LookupDecorator
class is now easier to use, but most use cases are covered without having to access the low-level lookup architecture. - The assemblies now are strong-named as factory default.
-
The new
LicenseConfig
class offers a way to set the yFiles license data in code (as opposed to having to embed a resource file in the application).
Graph
New Features and Improvements
-
CompositeLabelModel
now cannot only combine label models but also individual label model parameters or a mix of both kinds. Furthermore, it supports assigning a profit value to a parameter or model that can be used when placing labels during an automatic layout. -
The new
CompositeLabelModel.AddParameter
method wraps a given parameter of one of the composed label models. -
The new
IGraph.GetEdgesBetween
method returns all edges between two ports or port owners. -
The methods of
IGraph
now check consistently whether given geometric arguments are neither infinite norNaN
. -
The rotation direction of
OrientedRectangle
,NodeLabel
,EdgeLabel
andFreeEdgeLabelModel
is now clockwise to be consistent with the other models. - The default placement for new edge labels is now on the middle of the edge path instead of on the first edge segment.
-
The label models
ExteriorLabelModel
,InteriorLabelModel
, andInteriorStretchLabelModel
have been renamed toExteriorNodeLabelModel
,InteriorNodeLabelModel
, andStretchNodeLabelModel
, respectively, to make it clear that only nodes are supported as label owner for these models. -
The implementations of
ILabelModelParameter
andIPortLocationModelParameter
used by theILabelModel
andIPortLocationModel
classes are now public and provide all properties necessary to recreate them on the models. Consequently, the staticLabelModelParameterSerializer
andPortLocationModelParameterSerializer
classes, which could be used to retrieve those properties and recreate the parameter, have been removed. -
The
ILabelModel
parameter of theILabelModelParameterFinder.FindBestParameter
andILabelModelParameterProvider.GetParameters
methods has been removed as it was only very rarely required. -
The
GraphCopier
API has been enhanced to offer improved clarity and functionality.-
The
GraphCopier
has been optimized since its support for theGraphClipboard
has been removed. -
The
GraphCopier.Copy
method now uses anIEnumerable
of items to define the subset to copy.
-
The
-
The
SimpleNode
,SimpleEdge
,SimpleBend
,SimpleLabel
, andSimplePort
classes now provide a convenienceLookupDecorator
instance through theGetDecorator
method. -
The
ILabelModel.CreateDefaultParameter
method and most of its implementations have been removed as it was often unclear what βdefaultβ meant. Most label models already had a correspondingCreate*Parameter
method. For the remaining models, theGroupNodeLabelModel.CreateTabParameter
method and theFreeNodeLabelModel.Center
andFreePortLabelModel.Center
fields have been added. -
The structural properties on graph items now are never
null
. This affectsIEdge.SourcePort
,IEdge.TargetPort
,ILabel.Owner
,IPort.Owner
, andIBend.Owner
. -
The
IGraph.GroupNodes
method now has optional parameters that specify theStyle
andTag
of the newly created group. -
The static parameter fields of
FreeNodePortLocationModel
have been renamed analogue to the static parameter fields inInteriorNodeLabelModel
. -
FilteredGraphWrapper
now supports changing the node and edge predicates after creation. -
The
PropertyChanged
event on theUndoEngine
class is now also emitted if the token is changed.
Bug Fixes
-
Fixed
ILabelOwner.Labels.Contains
andIPortOwner.Ports.Contains
implementations. Previously, these methods returned true for all labels/ports in the owner's graph instead of only for labels/ports belonging to the owner. -
Fixed a bug in
EdgeSegmentLabelModel
andEdgePathLabelModel
which caused a gap in supported positions close to the source and target node. -
Fixed
EdgeSegmentLabelModel
andSmartEdgeLabelModel
label placement at source and target nodes when using indices less than 0 or greater than the number of bends in the edge. -
The
EdgeSegmentLabelModel
class now calculates valid label locations for selfloop paths with one port at the side of the node. -
The
EdgeSegmentLabelModel
class now calculates valid label locations for paths with duplicate bends, i.e., paths in which two or more consecutive bends have the same location. -
GraphClipboard
'sParentNodeDetection
now can useParentNodeDetectionModes.None
as fallback if no valid parent is found for modesParentNodeDetectionModes.Selection
orParentNodeDetectionModes.PreviousParent
.
Controls
New Features and Improvements
-
yFiles now offers theming. Therefore, a new
Theme
class has been added.- The new class provides the following properties to determine the overall visual appearance:
-
*
PrimaryBrush
,SecondaryBrush
, andBackgroundBrush
which determine the color of vaious decorations like selection decoration or handles. -
*
Scale
: which determines the size if handles and port candidates. -
*
IndicatorOffset
andHandleOffset
: which determines an offset for decorations to their decorated elements. -
*
Variant
: which determines some aspects of the overall appearance, e.g. whether handles should be drawn as circles or squares. -
The theme can be set for a
CanvasControl
orGraphControl
using theTheme
property.
-
CanvasControl
andGraphControl
now have a new scroll bar design, as well as new behavior if eitherHorizontalScrollBarPolicy
orVerticalScrollBarPolicy
is set toAsNeeded
. The new style is similar to system scrollbars in many operating systems, overlays the content and gets out of the way when not needed or interacted with. If this behavior is wanted when customizing the control template, the newDynamicScrollBar
class can be used. -
ViewportLimiter
now also works with isometric projections and offers options to use theCanvasControl.ContentBounds
for the limiting. It now offers the possibility to specify margins in the view coordinate system around the specified bounds, and bounds can be given as a list of convex polygon points.CanvasControl
now also notifies the viewport limiter when the size of theContentBounds
or the size of theCanvasControl
changes. -
The new
CanvasControl.HorizontalScrollEventRecognizer
property allows customizing switching from vertical to horizontal scrolling. -
The
ICanvasContext.CanvasControl
property (and consequentlyIRenderContext
andIInputModeContext
) is now guaranteed to have a non-null
value. -
All predefined
EventRecognizer
constants can now be found in the same class,EventRecognizers
, which improves discoverability. In addition, their names now follow the platform conventions, i.e. they are formulated in the present tense and use the same wording as corresponding input events.
Similarly, the events onCanvasControl
which are related to input devices now have the same consistent names. -
The
CanvasControl.ContentRect
property is now namedContentBounds
to make its purpose more clear. TheUpdateContentRect
method has been renamed likewise. -
It is now possible to have more than one
BridgeManager
. This allows you to have different types of bridges on different types of edges. -
GraphControl
now usesGraphViewerInputMode
as the defaultInputMode
for basic graph exploration.
Bug Fixes
- Fixed an issue where a sequential animation would break when the preferred duration was set to zero.
-
Fixed
GraphOverviewControl
rendering issues withHighDPI
displays in conjunction with display scaling. -
Changing
CanvasControl.Zoom
property value no longer changes the viewport center, if the control's Projection and Scale are set to non-default values.
Rendering
New Features and Improvements
-
The new
ObjectRendererBase
class allows conveniently implementing theIObjectRenderer
interface. -
New classes formalize the data passed as
RenderTag
to implementations ofIObjectRenderer
.-
The new
PortCandidateRenderTag
class will be passed as render tag for port candidates. -
The new
MarqueeRenderTag
class will be passed as render tag for the marquee rectangle renderer of theMarqueeSelectionInputMode
class. -
The new
LassoRenderTag
class will be passed as render tag for the lasso path renderer of theLassoSelectionInputMode
class. The newLassoPathState
enum defines the current state of the lasso selection path in this class. -
The new
LabelCandidateRenderTag
class will be passed as render tag to the label candidate renderer of theLabelPositionHandler
.
-
The new
-
The new
VoidObjectRenderer.Instance
constant provides a singleton renderer that renders nothing. -
Added properties
IntermediateToWorldTransform
andViewToWorldTransform
toIRenderContext
. - Hatch brushes are scaled on high-resolution displays.
Selection, Focus, Highlight
New Features and Improvements
-
The new
Domain
property on theHighlightIndicatorManager
class matches theDomain
property on theSelectionIndicatorManager
class and allows automatic removal of highlights no longer present in the domain. -
FocusIndicatorManager
supports a new policy that will only show the keyboard focus indicator, when the user is actually using the keyboard to manipulate the focus.
Styles
New Features and Improvements
-
New styles that are based on the composition design pattern make it easier to combine existing styles into a single
item visualization. These styles are available for all graph items via the
CompositeNodeStyle
,CompositeEdgeStyle
,CompositeLabelStyle
, andCompositePortStyle
classes. -
Similarly, new styles that are based on the delegation design pattern make it easier to implement custom styles that
extend an existing style. For this, derive your style implementation from the
DelegatingNodeStyle
,DelegatingEdgeStyle
,DelegatingLabelStyle
, orDelegatingPortStyle
class. -
The new
ShapePortStyle
class displays ports as geometric shapes and supports the same shapes as theShapeNodeStyle
class. -
The
Arrow
class now supports more types and features. In particular:-
There are three new shapes that are similar to what is available in common drawing apps:
ArrowType.Chevron
,ArrowType.Deltoid
, andArrowType.Kite
. - The width and height can now be scaled independently from each other.
-
An arrow can now specify whether the end of the edge the arrow belongs to should be cropped at the port or at
the boundary of the port's owner. This alleviates the need to use
PortDecorator.EdgePathCropper
for this.
-
There are three new shapes that are similar to what is available in common drawing apps:
-
The new
PathEdgeStyleBase
class simplifies using a complexGeneralPath
as the edge path of a style. Subclasses only have to create the path while the style already handles the visualization, including placing arrows and bridges. Several callback methods can be overridden to customize the behavior. -
The
ShapeNodeStyle
class now supports more shapes, namelyPentagon
,OctagonStanding
,TrianglePointingLeft
, andTrianglePointingRight
. These shapes are also available asTextWrappingShape
. -
Node shapes that are stars or arbitrary polygons are now easy to implement with new factory methods of the
GeneralPathNodeStyle
class. -
LabelStyle
now trims text (and shows ellipsis) when text wrapping and text trimming is used with rectangle shapes. Previously,DefaultLabelStyle
used Forms' native support for trimming and wrapping for rectangle shapes which could lead to clipped text. -
LabelStyle
now trims large text at words, with an ellipsis by default. -
LabelSTyle
now only includes entire lines in its bounds by default. -
The
IconLabelStyle
now has a default icon size of 24x24 instead of empty, such that the icon is always visible. -
The new
GetLassoTestable
method of the interfacesINodeStyleRenderer
,IEdgeStyleRenderer
,ILabelStyleRenderer
, andIPortStyleRenderer
is similar to the existingGetMarqueeTestable
method, so marquee and lasso selection do no longer differ in the ways the testable is retrieved. -
The
CollapsibleNodeStyleDecorator
class positions and styles the button now closer to whatGroupNodeStyle
does to achieve a more modern look. -
Group nodes and nodes with
GroupNodeStyle
now have more useful default port candidates. Either four candidates, one in each cardinal direction, for group nodes withGroupNodeStyle
. Or a single central port for folder nodes with aGroupNodeStyle
. -
ShapeNodeStyle
now considers the pen thickness when rendering rectangle, round rectangle and ellipse shapes, i.e. the pen is rendered half inside and half outside the node bounds, like for the other shapes.
Bug Fixes
-
The intersection calculation for
RectangleNodeStyle
has been corrected for some previously failing edge cases that resulted in edges ending in mid-air or disappearing. -
The selection, highlighting and focus visualization of edges using
BridgeEdgeStyle
orArcEdgeStyle
no longer disappears too early if the edge path is only partially in the viewport. -
The following node styles now consider the pen thickness in the visibility test:
ShapeNodeStyle
,ArrowNodeStyle
,GeneralPathNodeStyle
,GroupNodeStyle
, andRectangleNodeStyle
. -
LabelStyle
'sGetPreferredSize
now correctly calculates the preferred height for label text consisting of multiple lines of text when some kind of text trimming is used. Previously, the more lines of text there were, the higher the chance was for some lines being cut off, because the calculated height was to small.
Interaction
New Features and Improvements
-
The
MoveInputMode
class now also handles moving labels, thus theMoveLabelInputMode
has been removed. -
The new
PointerLongPress
event is available for all pointer input types and replaces the previous touch-specific long press API. -
The new
PointerLongRest
event is raised when the pointer stays still for a configurable amount of time during a move or drag gesture. -
All events of an
IInputMode
which report creation of, changes to, or deletion of model items now have arguments of typeInputModeItemEventArgs
orInputModeItemChangedEventArgs
. This type provides the affected item and theIInputModeContext
for the involved input mode. -
The keys to modify the gestures of various input modes have been adjusted to better match those of other often used
applications:
-
To temporarily disable snapping during edge creation, moving, or resizing items, the
Alt
key can now be pressed instead of theCtrl
key. -
When resizing a node using its reshape handles, the
Ctrl
key instead of theAlt
key can be pressed to keep the center of the reshaped node. -
To reparent a node to another parent during a drag gesture, the
Ctrl
key has to be pressed instead of theShift
key.
-
To temporarily disable snapping during edge creation, moving, or resizing items, the
- Elements can now be moved without selecting them first.
-
The new
CreateEdgeInputMode.MinimumSelfLoopBendCount
property allows for specifying the number of bends an edge must at least have before it can be created as selfloop. -
The new
CreateEdgeInputMode.ShowStartPortCandidateDelay
property allows for specifying a delay after which start port candidates are displayed when the user hovers over a start port candidate owner. -
The new
GraphEditorInputMode.MovableUnselectedItems
property allows for defining items which can be moved without selecting them first. TheMovableUnselectedItemsPredicate
property can be used for closer specification. -
The
CanvasControl
's event system is now based on thePointerEvent
API instead of mouse and touch events. This enables to support stylus devices and allows for handling different input devices in a more uniform way. -
The new
CreateEdgeInputMode.EdgeDirectionReversed
event and the newCreateEdgeInputMode.OnEdgeDirectionReversed
method are triggered when the direction of the edge creation changed during edge creation. -
The event
ItemsCopied
onGraphViewerInputMode
and the eventsItemsCopied
,ItemsCut
,ItemsPasted
,ItemsDuplicated
, andDeletedSelection
onGraphEditorInputMode
now useItemsEventArgs
providing the items that are the subjects of the events. -
The new
GraphEditorInputMode.SetNodeLocation
method uses theIPositionHandler
of a node to change its location, and this way also adjusts the attached orthogonal edges and the position of child nodes if the given node is a group node. - Reconnecting edges to other nodes is now allowed per default.
-
The
IHitTester
interface has been changed to support faster hit testing. The generic type has been removed. Instead, aGraphItemTypes
parameter has been added that is used to reduce hit tests to the specified item types. -
The new
HandleType.Void
enum value makes a handle invisible and excludes it from hit testing. -
The new
GraphEditorInputMode.CreationSelectableItems
property allows you to specifyGraphItemTypes
which should be selected after creation. -
Moving items interactively now supports constraining the move gesture to an octilinear direction. This constraint is
used when pressing the
Shift
key while dragging the items. -
Marquee and lasso selection have been enhanced to support multiple selection policies. While the default gestures
replaces the selection, pressing the
Ctrl
,Shift
, orAlt
modifier during the gestures extends, subtracts or toggles the current selection with the elements in the marquee or lasse area. -
Edge creation now supports constraining the current edge segment to use an octilinear direction. This constraint is
used when pressing the
Shift
key while dragging the pointer. -
The
PointerEventArgs.Handled
property has been added that can be used to set and detect if another listener already handled the event. -
A
SnapResult.Pen
property has been added that can be used to suggest a custom pen to theSnapResult.ObjectRenderer
. -
The
IncreaseZoom
andDecreaseZoom
commands now also supportPoint
andPointF
as parameter. -
Renamed
GraphEditorInputMode
HandleClickHandler
method toHandleClickListener
to match the name of theIClickListener
interface. -
If a
Wheel
event is handled by code, the default behavior (zoom/scroll) will be cancelled. -
Commands handled by
yFiles.NET
can now be executed on aGraphControl
using corresponding constants from the Command enum.GraphControl
provides methods such asExecuteCommand
andCanExecuteCommand
, along with theCanExecuteCommandChanged
event, for this purpose. This presents an additional execution pathway while retaining the ability to use the original commands as usual. -
KeyboardInputMode
's methodsAddCommandBinding
,AddRecognizerBinding
, andAddKeyBinding
now return a token which can be used to remove that binding. -
The
IInputMode
API has been updated for clarity: theInputMode
property has been removed from the interface. Instead, most implementations now offer the protectedParentInputModeContext
property to clearly indicate its role as the input mode's parent context. Most input modes can create a context which can be passed to dependents via the protectedCreateInputModeContext
method. The created context has the input mode set as the parent input mode. The newInputModeContext
class may be used by implementations to conveniently create new contexts. -
When using the
GraphViewerInputMode
, the viewport can now be moved by either dragging with the left or middle mouse button. -
When using the
GraphEditorInputMode
, the viewport can now be moved by either dragging with the middle mouse button or by dragging with the left mouse button when pressing theCtrl
orSpace
key. -
Several default keyboard shortcuts have been adjusted to more widely used ones:
-
Ctrl+0
orAlt+0
sets the zoom to 100%. -
Alt+1
fits the content in the view. -
Alt+2
brings the selection into the view. -
Alt+3
brings the current item into the view. -
Ctrl+Plus
increases the zoom value. -
Ctrl+Minus
decreases the zoom value. -
Alt+Left
collapses a selected group node. -
Alt+Right
expands a selected folder node. -
Alt+Up
exits the current folder node. -
Alt+Down
enters the current folder node. -
Alt+Shift+Left
orAlt+Shift+Right
toggles the expansion state of a selected group or folder node.
-
-
The new
Command.ZoomToSelection
zooms to the bounding box around all selected items. It can be triggered by the keyboard short cutAlt+2
. -
Lowered the
MoveViewportInputMode.Priority
to105
to make viewport panning withCTRL
orSPACE
modifiers easier in dense graphs. -
The new
DropInputMode.AcceptDrag
method is called onDragEntered
events and determines if the mode will handle subsequent drag and drop events. Previously, this was the responsibility of theDropInputMode.AdjustEffect
method . Now,AdjustEffect
only changes the drag/drop effect of the given event args as its name implies. - Edge creation can now be cancelled by ending the gesture over the source node.
-
Edge creation is canceled if the
GraphControl
loses the focus. -
GraphViewerInputMode
's andGraphEditorInputMode
'sClickHitTestOrder
now reflects the z-Order of the elements. By enablingSkipHitLabels
(the default) elements behind labels can still be prioritized over the labels. -
LabelDropInputMode
now consults theIEditLabelHelper
of possible drop targets when dragging and dropping labels. -
Command handling has been improved: The previous
ICommand
, inspired by WPF's commands, has been replaced with an enumeration of primary input gestures calledCommand
.GraphControl
now manages the execution of commands:-
GraphControl.ExecuteCommand
runs the specified command with an optional parameter. -
GraphControl.CanExecuteCommand
indicates whether the specified command can be executed. -
The
CanExecuteCommandChanged
event is triggered when the executable state of a command has changed.
-
-
OverviewInputMode
now uses theCanvasControl
'sMouseWheelZoomEventRecognizer
to determine if the used performed a zoom gesture. -
GraphEditorInputMode
now allows for starting label editing just by starting to type. TheAllowEditLabelOnTyping
property can be used to configure this setting, which is turned on, by default. - The default gesture for label editing has been updated to also trigger when the user hits the `Enter` key.
-
The
ClickInputMode.Clicked
event is now raised also for double-clicks and multi-clicks. Clicking multiple times in the same location increments theClickEventArgs.ClickCount
by one for each click. -
The
HandleIsHit
andGetClosestHitHandle
methods ofHandleInputMode
now have an additional parameter which specifies thePointerType
of the related user gesture. -
MoveViewportInputMode
now gracefully handles concurrent programmatic viewport modifications. - Starting edge-creation from a child node inside a group node now does not immediately snap to the parent when moving over the group nodes content. Instead, it only snaps to the closest port when hovering the tab or stroke.
-
The sub-input modes of
GraphViewerInputMode
andGraphEditorInputMode
can now be replaced while the input mode is installed. -
The new
GraphViewerInputMode.HitTester
property works in the same way as theGraphEditorInputMode.HitTester
property. -
The
GraphEditorInputMode.DuplicateSelection
method now also dispatchesMultiSelectionStarted
andMultiSelectionFinished
events. -
NavigationInputMode
now interprets the direction of arrow keys in view coordinates by default. Previously the default settings could lead to surprising behavior when combined with aProjection
onGraphControl
. -
The
GraphInputMode.FindItems
method now considers the actual z-order of the hit items. -
The
GraphInputMode.ItemClicked
event and the cyclic selection now consider the actual z-order of the hit items at the cursor location. Bends and invisible ports are now properly taken into account and hit before their owners. -
The rendering order of visuals created by an
InputMode
now corresponds to the input mode'sPriority
. In other words, visualizations of input modes with a smaller priority value (= higher priority) are drawn on top. -
The
GraphEditorInputMode.OrthogonalEdgeEditingContext
property is now set and enabled per default and may not benull
anymore. Edges can be individually configured to be edited orthogonally by providing an apropriateIOrthogonalEdgeHelper
in their lookup.-
For edges using a
PolylineEdgeStyle
, the style's newOrthogonalEditing
property can be set so such a helper is automatically provided. -
To disable orthogonal editing for all edges, the
Enabled
property of theOrthogonalEdgeEditingContext
can be set to false. -
To enable orthogonal edge editing for all edges that don't explicitly forbid this, the
OrthogonalEdgeEditingContext.FallbackEdgeHelperProvider
property can be set to a helper supporting orthogonal edge editing.
-
For edges using a
-
The
HandleTypes
enums has been refactored to a non-flaggableHandleType
enum, and the values have been adjusted to those used in the library as well as some custom variants for individual use. -
Custom
IHandle
implementations can use the newIHandle.Tag
property for various purposes, including custom handle visualizations. yFiles does not use the property and initializes it withnull
, but decorating handles forwards any values unmodified. -
The static member
GraphClipboard.DefaultGraphClipboard
has been added and is used per default asGraphControl.Clipboard
. This way copy&paste operations work between multipleGraphControl
instances without the need to set a sharedGraphClipboard
instance first. -
The parent node detection of
GraphClipboard
has been streamlined. -
The protected
Should-
methods of the input modes have been removed and replaced by predicate properties. This simplifies adjusting the behavior without the need to subclass the input modes. -
Toggling the item selection via
Ctrl+Space
now prefers toggling the selection state ofGraphControl.CurrentItem
over deselecting a single selected item. -
The items reported by the
HandleInputMode.AffectedItems
property now include edges that were modified with the height handle ofBezierEdgeStyle
andArcEdgeStyle
. -
New overloads of the
CreateEdgeInputMode.StartEdgeCreation
method can be used to start interactive edge creation from a node or port, respectively. -
The modifier for using the
ILabelModelParameterFinder
during label movement can now be changed with theLabelPositionHandler.UseParameterFinderRecognizer
property. - Improved keyboard navigation for graph items.
-
The
MoveInputMode
andMoveUnselectedInputMode
properties ofGraphEditorInputMode
have been renamed toMoveSelectedItemsInputMode
andMoveUnselectedItemsInputMode
to better describe what they are used for. Associated properties and methods have been renamed accordingly. - Dragging a selected edge doesn't move all its bends anymore which often screwed up the first and last edge segment.
-
The
MouseHoverInputMode
has been renamed toToolTipInputMode
to better reflect its function.
Bug Fixes
-
Fixed a possible exception upon
ClickInputMode
installation if theDoubleClickTime
was set to 0. -
Fixed a bug in
TextEditorInputMode
which prevented setting a customTextBox
via property. - Sporadic errors during pinch zoom have been corrected.
-
Toggling the selection of an item using the keyboard now always toggles the selection of the focused item.
Previously, if exactly one other item was selected when toggling, that item was deselected, making it virtually
impossible to select multiple individual items using the keyboard.
To fix this, the behavior ofGraphCommands.ToggleItemSelection
has been adjusted accordingly, and the behavior theGraphCommands.SelectItem
andGraphCommands.DeselectItem
has also been changed accordingly. -
NavigationInputMode
now reliably brings items selected with keyboard navigation into the view. Previously this only worked for nodes. - Fixed an issue where keyboard navigation would stop working when two items were positioned at the same location.
-
The
GraphInputMode.FindItems
overload without thecontext
parameter did not find items correctly. -
Several members of
EditLabelInputMode
could not be overwritten by mistake. TheInstall
,Uninstall
,TryStop
, andCancel
methods and theEnabled
property can now be overwritten. -
GraphInputMode.FindItems
method: when the filter includes both edges and bends, the edge will no longer be ignored if any of its bends are hit. -
GraphInputMode.FindItems
method: when usingGraphItemTypes.All
, bends will not be ignored. Furthermore, the interfacesIBendSelectionTester
andIPortSelectionTester
are properly queried. -
GraphInputMode.FindItems
method: Ports with a style are no longer reported twice. -
When moving the viewport in a
GraphControl
that has a projection, the inertia now works in the right direction. -
Fixed that the
MarqueeSelect
andLassoSelect
methods ofGraphEditorInputMode
andGraphViewerInputMode
were called with a wrong input mode context. - Fixed occasionally missing auto-scrolling on viewport bounds for touch devices.
- Key presses are no longer propagated to the canvas's parent control if an input mode requests the keyboard.
Label Editing
New Features and Improvements
-
The API related to label editing has been enhanced by introducing a new
EditLabelInputMode
, which is now a subordinate mode ofGraphEditorInputMode
. The new input mode consolidates the methods, properties, and events necessary for customizing label editing. The key methods,AddLabel
andEditLabel
, remain accessible throughGraphEditorInputMode
. - The text editor will now stay open by default if label text validation fails.
-
Each
ILabel
andILabelOwner
now includes a default implementation ofIEditLabelHelper
in itsLookup
. TheIEditLabelHelper
interface has been updated to offer greater control over the label editing process. -
The API related to label editing has been removed from
TableEditorInputMode
, except for the key methodsAddLabel
andEditLabel
. Label editing is now handled throughGraphEditorInputMode
'sEditLabelInputMode
.
Snapping
New Features and Improvements
- The snapping feature has been refactored and enhanced to support more use cases. Previously, items could only snap to points or orthogonal lines. Now lines with any orientation and circle segments can be defined as references where items can snap to. Furthermore:
-
Snapping to circles, grids, and specific node sizes has been refactored to work analogue to the snapping to a
SnapLine
, soSnapCircle
,SnapGrid
, andSnapSize
instances are created and are available for theSnapResult
providers. -
Label snapping is now also handled by the
GraphSnapContext
, so theLabelSnapContext
has been removed. Configuration options have been moved fromLabelSnapContext
toGraphSnapContext
. -
Additional improvements:
-
The new
GraphSnapContext.AffectedItems
property provides the items for whichSnapResults
shall be collected. -
The configuration options of
GraphSnapContext
are now easier to use and more concise. -
The new protected methods
CollectGridSnapReferences
andCollectSameSizeSnapReferences
ofGraphSnapContext
can be overridden to customize theSnapGrid
andSnapSize
instances items can snap to. -
The new
SnapReference
class is now the base class ofSnapLine
, and the newSnapGrid
,SnapSize
, andSnapCircle
classes. The newSnapReference.SnappableItems
property describes which item types may snap to this reference. - Snap references of all types can be styled with CSS classes.
-
The new
OrthogonalSnapLine.Croppable
property is used to decide which snap lines to crop ifGraphSnapContext.CropSnapLines
is {}true{
}. -
The new properties
Reference
,Item
, andItemAnchor
of theSnapResult
class can be used by theIObjectRenderer
for the visualization of theSnapResult
. -
New methods of
ReshapeRectangleContext
simplify the calculation of the bounds for a specified pointer delta or theSnapConstraint
necessary to result in a specified width, height or side location.
-
The new
Clipboard
New Features and Improvements
GraphClipboard
and GraphEditorInputMode
with
Element
in their name that actually referred to model items were renamed to
Item
to clarify their usage.
GraphClipboard.Paste
method now accepts an optional pasteLocation
parameter specifying the center of the bounds of the pasted items.
GraphClipboard
now use GraphClipboardEventArgs
that provide the current IGraphClipboardContext
and the Items
.
GraphControl
that has a projection, the inertia now
works in the right direction.
GraphClipboard
's Cut
, Copy
, Paste
, and Duplicate
methods now use an IEnumerable
to determine
the subgraph to copy.
GraphClipboard
now uses an optimized ClipboardGraphCopier
for its clipboard operations instead of the general GraphCopier
.
Bug Fixes
- In certain rare cases, the insertion of edges could end up in an endless loop. This has now been fixed.
Folding
New Features and Improvements
- The process of configuring edges at folder nodes has been simplified, resulting in a significant reduction in the number of configuration calls for merged edges.
- The default implementation for folder nodes and folding edge converters has been enhanced, providing more powerful capabilities for synchronizing and initializing various aspects with granularity.
- Collapsed group nodes (folder nodes) can now have different tags from their expanded form (group nodes).
-
Changes made to view states (folder nodes, folding edges) can now be reflected back to the master items. New
methods,
UpdateGroupNodeState
andUpdateMasterEdges
, have been added toIFolderNodeConverter
andIFoldingEdgeConverter
, respectively, for handling these updates.
Bug Fixes
-
Setting the source or target port of an edge to a port at another edge does no longer lead to an exception if the
edge is represented in a managed view (
IFoldingView
). Instead, the edge is now removed from the view. - Fixed a bug which could cause an edge in a folding view to be created at different ports as those which were given as parameters. This could lead to unexpected connections during interactive edge creation in rare cases.
-
Fixed a bug that could lead to an exception when duplicating a port on the
GraphClipboard
if it is duplicated. - Fixed a bug which caused changing the ports on an edge whose source or target node is collapsed being reverted after subsequent collapsing and expanding.
-
Label changes on folder nodes are no longer reverted by
FolderNodeConverter
if labels are copied between master and view node.
View-Layout-Bridge
New Features and Improvements
-
LayoutExecutor
can now automatically create port constraints for edges at ports that use aCompositePortLocationModel
. For all parameters added to aCompositePortLocationModel
, a fixed port candidate is created. The cost, capacity, andPortSide
of this candidate can be specified when adding the parameter to the model. -
With the new
ItemMapping.Dictionary
property, a dictionary can be used to specify anItemMapping
. -
The
LayoutExecutor.TableLayoutConfigurator
feature now uses more flexible placements for nodes that don't belong to any table node.
Bug Fixes
-
The
LayoutExecutor
andLayoutGraphAdapter
classes now correctly assign port group IDs to edges that connect to the same port. Previously, in some cases involving ports with a single incoming and outgoing edge, the port group IDs were omitted, which could cause incorrect layout results (such as diagonal segments instead of orthogonal ones).
Layout
New Features and Improvements
-
LayoutPortCandidate
s now have aMatchingId
. When finding matchingLayoutPortCandidate
s at nodes and for edges, twoLayoutPortCandidate
s can only match if theirMatchingId
properties are equal. -
The
LayoutAnchoringStage
class (previously calledFixNodeLayoutStage
) now allows using not only nodes but also edges and labels to anchor the graph's position.-
The new
NodeAnchoringPolicies
,EdgeAnchoringPolicies
,NodeLabelAnchoringPolicies
andEdgeLabelAnchoringPolicies
properties specify which part of the items should be used to calculate the anchor point. -
The new
LayoutExecutor.AnchoredItems
property specifies the graph items used to anchor the graph's position.
-
The new
-
The
ComponentLayout
has now the ability to specify which layout to apply to individual components usingComponentLayoutData.ComponentLayouts
property. Additionally, edges between components can be routed using a router set viaComponentLayout.InterEdgeRouter
. -
It is now possible to specify multiple layout grids for a graph (previously called
PartitionGrid
). This is made possible by the newLayoutGridCellDescriptor.LayoutGrid
property. This way it is no more required to set the global layout grid with theLayoutGridData.Grid
property. If a node is to be placed in a grid but not in a specific cell, this can now be achieved using the newLayoutGrid.CreateDynamicCellDescriptor
method. Be aware that many layout algorithms likeHierarchicalLayout
don't support multiple layout grids. -
The
LayoutData
classes are now generic and can be used for items of aLayoutGraph
, too. Of course, it's still possible to useLayoutData
withIGraph
items.-
LayoutData
instances when used withIGraph
typically needINode
,IEdge
,ILabel
, andILabel
as their type arguments. -
LayoutData
instances when used withLayoutGraph
typically need Node, Edge,NodeLabel
, andEdgeLabel
as their type arguments. -
Instances of
LayoutData
classes can be created via factory extension methods on the layout algorithm themselves, for example,HierarchicalLayout.CreateLayoutData
. Depending on the type of graph that is provided as the argument, the correct data instance will be created.
-
-
The API around the
LayoutGraph
class has received a major rework. TheLayoutGraph
is the only remaining graph implementation for the layout analysis part. ClassesGraph
(previously used for graph analysis, only) andCopiedLayoutGraph
have been removed and functionality was moved toLayoutGraph
.-
The API has been made more similar to the API of the
IGraph
with respect to creation, modification and access to nodes, edges and labels. -
Low-level data types like
NodeList
andEdgeList
have been removed as well as cursor for iteration over the elements. -
Properties
NodeCount
andEdgeCount
have been removed. Query the size of theNodes
andEdges
properties instead. -
Layout information about items must no longer be queried from the graph instance (e.g. previously with methods
like
LayoutGraph.GetLayout
). It is now accessible on the items itself and is also mutable, seeNode.Layout
property. -
The edge path information is no defined by properties on the edge, most importantly these are
SourcePortLocation
,TargetPortLocation
andBends
. -
Labels of nodes and edges are now accessed via a property on the respective owning item. To add labels, use
LayoutGraph.AddLabel
method. The complicatedILabelLayoutFactory
that covered that use case in the past has been removed. -
Hiding items is no longer possible via the graph itself. To do so, use the helper
LayoutGraphHider
class. -
The
Graph.ContainsEdge
method has been removed in favor ofLayoutGraph.GetEdgesBetween
. The same holds for theNode.GetEdgeTo
andNode.GetEdgeFrom
methods. -
Convenience properties like
Node.Neighbors
have been removed. Instead, query all edges (using the Edges property) and filter the required adjacent nodes manually. -
To copy a
LayoutGraph
instance, the newLayoutGraph.CreateCopy
method has been added. -
If a
LayoutGraph
without coordinate/path information is needed (to optimize memory performance), it can be created using the factoryLayoutGraph.CreateStructureGraph
method.
-
The API has been made more similar to the API of the
-
LayoutExecutor
now supports arranging graphs without aGraphControl
. -
The thread started when
LayoutExecutor.RunInThread
istrue
is now a background thread and thus long-running layout calculations no longer block the process from exiting. -
The new
LayoutGraph.GetEdgesBetween
method returns all edges between two nodes. -
The
PortPlacementStage
now computes cost-minimal matchings between port candidates at nodes and edges. -
Most layouts now support port grouping and port candidates at nodes and edges. These features are implemented
through a post-processing step using the
PortPlacementStage
, rather than being natively integrated into the layouts. As a result, the quality may be poor.
Bug Fixes
-
The
CurveFittingStage
now correctly respects the maximum error. Previously, it sometimes produced curves that violated the maximum error. -
The
LineSegment.GetIntersection
method no longer produces incorrect results when the specified epsilon is zero. Previously, there were some edge cases where the algorithm failed to detect an intersection and returnednull
instead. -
Added the protected
ParallelEdgeRouter.HideMultiEdges
method, which is required to meaningfully overwrite the existing protectedParallelEdgeRouter.FindAndHideMultiEdges
method. -
The
PortPlacementStage
now correctly considers port candidates together with port groups.
Hierarchical Layout
New Features and Improvements
-
The
HierarchicalLayout
class now supports defining minimum distances between the ports. They can be specified per node side using theHierarchicalLayoutNodeDescriptor.MinimumPortDistance
property. The node size is increased if necessary in order to accommodate the minimum distances. -
The Hierarchical Layout class now supports aligning the ports of edges incident to the same node, that is, the ports
are placed at the same x- or y-coordinate. This can be particularly useful to visualize paths in a graph. Which
ports to align is specified by the new properties
PortData.SourcePortAlignmentIds
andPortData.TargetPortAlignmentIds
accessible viaHierarchicalLayoutData.Ports
. -
The
HierarchicalLayout
now produces fewer bends for multi-edges with labels when integrated edge labeling is enabled. -
The
HierarchicalLayout
class now produces better results for graphs with tabular groups where all children have a fixed user-specified order. - The routes of self-loops now consider both node and edge labels preventing overlaps if possible.
- The ports of edges with free ports are no longer placed at the same location as fixed ports, which previously could happen if multiple edges had the same fixed port.
-
The
HierarchicalLayout
no longer produces overlapping edge segments if there are grouped edges with different thicknesses values. Previously, the user had to ensure that all these edges use the same thickness. -
In barycenter mode the
HierarchicalLayout
now enforces a more symmetric placement of the nodes that are part of chains or height-2 trees.
Bug Fixes
-
The
HierarchicalLayout
class no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints. -
The
HierarchicalLayout
class no longer assigns superfluous space to group nodes if there are grouped edges. -
The
HierarchicalLayout
algorithm now correctly handles node and edge labels with width or height set to negative values. Previously, large negative values may have caused exceptions. -
The
HierarchicalLayout
class now always places aligned ports correctly in from-sketch mode. -
Instances of
LayerConstraintData
andSequenceConstraintData
that are configured with comparables can now be reused for multiple layout calculations. -
The
HierarchicalLayout
class no longer produces an error for labeled graphs with port alignment constraints when the integrated edge label placement is enabled. -
The
HierarchicalLayout
class no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer. -
The
HierarchicalLayout
now properly handles self-loop edges when the edge is at a group node and furthermore edge/port grouped with the same ID on both sides. Previously, it was not routed correctly or that it was removed from theLayoutGraph
instance when running the layout algorithm directly on the graph instance without using a copy. -
The
HierarchicalLayout
class no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints. -
The
HierarchicalLayout
class no longer produces superfluous crossings for some graphs with group nodes in incremental layout mode. - Edges between two subcomponents now correctly consider fixed any-side port candidates.
-
The
HierarchicalLayout
class no longer produces very long edge segments for some input graphs containing groups with node halos and polyline edge routing. -
The
HierarchicalLayout
class no longer throws an exception for graphs with bus structures if the algorithm runs in incremental mode and the group transposition feature is enabled. -
The
HierarchicalLayout
class no longer produces intertwined edge routes with many superfluous crossings and bends for some cases with sequence constraintsPlaceAtHead
orPlaceAtTail
. The problem mainly occurred with graphs with groups orPartitionGrid
and incompatible sequence constraints.
Tree Layout
New Features and Improvements
-
Added the new
TreeLayout.FromSketchMode
property to consider the initial coordinates of the graph elements. This has an effect only if the used subtree placers implementIFromSketchSubtreePlacer
. -
Added the
TreeLayoutData.MultiParentDescriptors
property that allows to specify style information for multi-parent structures. -
The
TreeReductionStageData
class now offersNonTreeEdgesResult
property. It allows to conveniently query the set of edges that the stage actually selected as non-tree edges. -
The
TreeLayout
now considers minimum last segment lengths no matter on which side the port shall be placed. -
The
AspectRatioSubtreePlacer
now supports minimum first and last segment lengths. -
The
SingleLayerSubtreePlacer
supports placing the subtree root centered with respect to the ports at its children with the new enum valueSingleLayerSubtreePlacerRootAlignment.CenterOfPorts
. -
All subtree placers that used
Tree.RootAlignment
support placing the subtree root centered above the ports with the new valueCenterOfPorts
. -
The
LeftRightSubtreePlacer
now supports minimum segment length, which can be set with the propertiesMinimumFirstSegmentLength
andMinimumLastSegmentLength
. -
The
AspectRatioSubtreePlacer
now supports multiple variants how to place the root node with respect to its children, which can be set using the propertiesChildArrangement
andRootPlacement
. -
Added properties of
TreeReductionStageData
directly to theLayoutData
of tree layouts, includingRadialLayoutData
,AspectRatioTreeLayoutData
,RadialTreeLayoutData
, andTreeLayoutData
.
Bug Fixes
-
The
TreeLayout
class no longer ignores the initial locations for some subtree placers if theFromSketchMode
property is enabled. -
The Tree Layout now automatically places edge labels of the parallel edges handled by its
ParallelEdgeRouter
instance, when integrated edge labeling is enabled. -
The
TreeLayout
class no longer produces broken edge routes for some input graphs with multi-parent structures. -
The
AspectRatioSubtreePlacer
class no longer ignores the specifiedAspectRatioSubtreePlacer.ChildAlignmentPolicy
for some specific setups (e.g., if all children are leaves and have the same size).
Orthogonal Layout
New Features and Improvements
-
The newly added
OrthogonalLayout.QualityTimeRatio
property allows controlling the layout quality by automatically enabling/disabling additional optimization steps. -
The
OrthogonalLayout
algorithm now supports specifying edges that should be routed against the main layout orientation in addition to the option to route with the main layout orientation. SeeOrthogonalLayoutData.EdgeOrientation
property.
Bug Fixes
-
The Orthogonal Layout now automatically places edge labels of the parallel edges handled by its
ParallelEdgeRouter
instance, when integrated edge labeling is enabled.
Edge Router
New Features and Improvements
- The quality of edge routing for buses is improved.
-
If
EdgeRouter
is run with the buses feature and a limited duration, it now splits the available time amongst buses, meaning that it will not get "stuck" on a single bus, which could otherwise impact the quality of the remaining buses and non-bus edge routings.
Bug Fixes
-
The
EdgeRouter
now prefers to use fixed port candidates that are not overlapped by other nodes. -
The
EdgeRouter
class no longer produces uncovered buses. Previously, there were some rare cases where the specified bus edges didn't constitute a bus. - When routing edges to and from fixed ports in the interior of group nodes, other nodes in the group are not ignored anymore, so that the edge does not overlap them if possible.
Labeling
Bug Fixes
-
The
GenericLabeling
algorithm now correctly considers the case where model parameters of aCompositeLabelModel
have different weight values. Higher weights are preferred. -
The
EdgeLabelCandidates.BuildCandidates
method does no longer returnnull
for some setups with free edge label models. Instead it returns an emptyIEnumerable
now. -
The
GenericLabeling
class now produces less node-label overlaps.
Organic Layout
New Features and Improvements
-
The performance for the
OrganicLayout
has been substantially improved for large graphs without group nodes. The improvement is triggered if no special constraints are defined and no shape recognition is enabled. -
The
OrganicLayout
now supports different styles for group substructures, which are set via theGroupSubstructureStyle
property.
Bug Fixes
-
The Organic Layout now automatically places edge labels of the parallel edges handled by its
ParallelEdgeRouter
instance, when integrated edge labeling is enabled. -
The
OrganicLayout
class no longer ignores the preferred edge length in incremental layout mode with a single affected element. - Fixed an issue that may have automatically disabled the component layout when using constraint-based features.
Radial Tree Layout
New Features and Improvements
-
Added data key
OutEdgeComparisonDataKey
toRadialTreeLayout
class (formerlyBalloonLayout
).
Series-parallel Layout
Bug Fixes
-
The Series Parallel Layout now automatically places edge labels of the parallel edges handled by its
ParallelEdgeRouter
instance, when integrated edge labeling is enabled.
Partial Layout
New Features and Improvements
-
PartialLayout
now supports specifying inversely directed edges in addition to undirected and directed edges.
Bug Fixes
-
PartialLayoutScopeData
will no longer mark any edges as affected when only nodes are specified to be in scope, nor mark any nodes as affected when only edges are specified to be in scope.
Tabular Layout
New Features and Improvements
-
The new
TabularLayoutData.LayoutGridData
property makes it easy to query the cell to which a node was assigned to by theTabularLayout
class after applying it.
Bug Fixes
-
The layout algorithms do no longer throw an Exception when a
LayoutGrid
including a mapping from nodes toLayoutGridCellDescriptors
is defined and if algorithmTabularLayout
was executed before withLayoutMode
AutoSize
orFromSketch
. In these modes theTabularLayout
automatically assigns cells to nodes so that any mapping defined prior will be ignored now.
Component Layout
New Features and Improvements
-
ComponentLayout
now supportsNodeMargins
(formerlyNodeHalos
) for eachComponentArrangementStyle
other thanNone
andKeepCenters
.
Algorithms
New Features and Improvements
-
The
LongestPath
algorithm now uses double values instead of integers for edge traversal costs. This improves thePaths
,LayoutGraphAlgorithms
, andLongestPath
classes. -
The
LayoutGraphAlgorithms.FindCycleEdges
method has been improved and now requires fewer edges to be reversed. In addition, a new, even better but slower heuristic can be enabled with a new optional parameter.
Bug Fixes
-
The
Intersections
class does not disposeFilteredGraphWrapper
instances that it is given with no subgraph nodes or edges specified anymore. Previously, this caused the graph instance to become defunct, resulting in various operations running intonull
fields and properties, generating exceptions that were non-trivial to understand. -
IntersectionsResult
no longer includes intersections that have no actual intersection points. This issue occurred when two graph elements were within a small epsilon distance of each other.
Analysis
New Features and Improvements
-
The
KShortestPaths
class has a new implementation of the k-shortest path algorithm that allows for the exclusion of non-simple paths (i.e., paths with repeating vertices). Previously, these paths could not be excluded. The new implementation is used by default and can be disabled with theSimplePaths
parameter. -
For usage with a
LayoutGraph
, the algorithm is also available via theLayoutGraphAlgorithms.KShortestPaths
method.
Geometry
New Features and Improvements
-
The new
GeneralPath.AreaOrPathContains
method tests if the path fuzzily contains a point and can be used for hit-testing aGeneralPath
. -
All methods on the
GeneralPath
class that accept points now have overloads forIPoint
andPointD
, and all methods that accept rectangles now have overloads forIRectangle
andRectD
. -
There are now methods on
RectD
andPointD
to calculate the distance between points and rectangles. -
The
GeneralPath.GetProjection
method is now faster for paths with Bezier segments. -
The
IRectangle
interface no longer implementsIPoint
. As a consequence, it is no longer possible to inadvertently use rectangles as parameters for methods that expect a point. You can still easily get the top-left corner of a rectangle with itsGetTopLeft
method. Similarly,IMutableRectangle
no longer implementsIMutablePoint
.
Bug Fixes
-
Fixed a potential
NullReferenceException
inGeneralPath.Render
. -
The
GeneralPath.PathMayIntersectClip
method has been corrected for paths with multiple segments, at least one of which is a cubic segment. -
The
SizeD.Area
property now returns 0 for empty sizes. This is consistent with the behavior of theRectD.Area
property.
Incompatible Changes
Categories: General Graph Controls Rendering Selection, Focus, Highlight Styles Interaction Snapping Clipboard Folding Lookup GraphML View-Layout-Bridge Layout Layout Data Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Interactive Organic Layout Circular Layout Radial Layout Radial Tree Layout Radial Group Layout Series-parallel Layout Compact Disk Layout Multi-page Layout Partial Layout Tabular Layout Component Layout Tree Map Layout Recursive Group Layout Layout Grid Other Layouts Algorithms Analysis Collections Geometry
General
Incompatible API Changes
- The minimum required .NET versions for yFiles are .NET Framework 4.6.2 and .NET 6.0, respectively.
- The minimum supported .NET versions for the Layout package are now .NET Standard 2.1 and .NET Framework 4.6.2.
- The (up to three) assembly files of the yFiles library are now combined into one single file.
-
The following classes are now sealed:
BorderLineSegment
,LayoutGridCellDescriptor
,LabelScopeData
,ItemCollection
,ItemMapping
,FreePortLabelModel
, andFreeNodeLabelModel
. They either already had an internal constructor or do not offer any meaningful members for overriding. -
Removed the
Default
prefix from the names of the following types:DefaultEdgePathCropper
,DefaultFoldingEdgeConverter
,DefaultFolderNodeConverter
,DefaultLabelStyle
,DefaultObservableCollection
,DefaultPortCandidate
, andDefaultSelectionModel
. -
Removed
DefaultLabelModelParameterFinder
. -
Removed the protected
IgnoreModifierKeyRepeats
property fromCanvasControl
. -
Removed the
StripeSelection
class. Instead, use the instance returned by theTableEditorInputMode.StripeSelection
property. -
Consistently use names
Padding
andMargins
in member names:-
Renamed the
TextEditorInputMode.TextBoxPadding
property toTextBoxMargins
. -
Renamed the
IndicatorLabelStyleDecorator.Padding
property toMargins
. -
Renamed the
IndicatorNodeStyleDecorator.Padding
property toMargins
. -
Renamed the
GraphEditorInputMode.ContentRectMargins
property toContentMargins
. -
Renamed the
OverviewInputMode.Margins
property toContentMargins
. -
Renamed the
ViewportAnimation.TargetBounds
property toTarget
. -
Renamed the
ViewportAnimation.TargetViewMargins
property toTargetMargins
. -
Renamed the
StripeLabelModel.UseActualInsets
property toUseTotalPadding
. -
Renamed the
StretchStripeLabelModel.UseActualInsets
property toUseTotalPadding
. -
Renamed the
IStripe.GetActualInsets
method toGetTotalPadding
. -
Renamed the
GroupNodeStyle.ContentAreaInsets
property toContentAreaPadding
. -
Renamed
Insets
properties of allILabelModel
implementations toMargins
. -
Replace name part
Insets
of other types and members withPadding
.
-
Renamed the
-
Removed the
BridgeManager.ClipMargin
property. -
Sealed the following classes which have no inheritors:
-
all classes in the
yWorks.Algorithms
namespace. -
all classes extending the
EventArgs
class. -
all implementations of the
ILabelModel
andIObjectRenderer
interfaces.
-
all classes in the
-
Enum values that followed the
North
,East
,South
,West
naming convention have been renamed to follow aTop
,Right
,Bottom
,Left
naming convention. In particular, the values of the following enums have been renamed:HandlePositions
,EdgeSegmentDirection
,LabelModels.Position
,LabelModels.Position
,LabelModels.Position
,LabelModels.Position
, andLabelModels.Position
,. -
The
IReadOnlyList
interface replaces the<T>
IListEnumerable
interface, which has been removed along with its related classes<T>
ListEnumerable
and<T>
ListEnumerableExtensions
. -
Renamed the
PortSide
enum toPortSides
. -
For consistency reasons, the property
WeakDictionaryMapper.Empty
is now calledIsEmpty
. -
Renamed the
CreateEdgeInputMode.AllowSelfloops
property toAllowSelfLoops
. -
Renamed the
GraphEditorInputMode.SelectNodeAndSelfloopBends
method toSelectNodeAndSelfLoopBends
. -
Renamed the
GraphEditorInputMode.AutoSelectSelfloopBends
property toAutoSelectSelfLoopBends
. -
Renamed the
IEdge.IsSelfloop
method toIEdge.IsSelfLoop
.
Graph
Incompatible API Changes
-
The
ILookup
interface and its extension methods have been moved to theyWorks.Utils
namespace. -
The
IMapper
interface, the Mappers,DictionaryMapper
, andWeakDictionaryMapper
classes have been moved to theyWorks.Utils
namespace. -
The
GraphClipboard.IsDummy
method has been renamed toIsHelper
. -
Method
GroupingSupport.GetPathToRoot
has been renamed toGetAncestors
and returns anIReadOnlyList
instead of anIList
. -
The
owner
parameter of theITable.CreateRow
,CreateColumn
, andSetParent
methods has been renamed toparent
. -
The structural properties of graph items (
IEdge.SourcePort
,IEdge.TargetPort
,ILabel.Owner
,IPort.Owner
,IBend.Owner
) now throw exceptions if accessed for items that are no longer in the graph. If it is unknown whether the item is still in the graph, please test the item withHasOwner
orHasSourceAndTargetPort
first before accessing these properties. -
IEdge
'sGetSourceNode
andGetTargetNode
methods now throw exceptions if called for an edge that is no longer in the graph or if the owner of the edge's source or target port is not a node. -
The classes
DelegateUndoUnit
andCompositeUndoUnit
have been removed. The new factory methodsUndoUnits.FromDelegate
andUndoUnits.Combine
can be used instead. -
The
UndoUnitBase
class has been removed. Subclasses now have to implement theIUndoUnit
interface instead. -
GenericPortLocationModel
has been renamed toCompositePortLocationModel
and doesn't implementIEnumerable
anymore. Instead, theParameters
property can be used to iterate the parameter. -
The
SegmentRatioPortLocationModel
class is now namedEdgeSegmentPortLocationModel
, similar toEdgeSegmentLabelModel
. -
The
CreateFromSource
andCreateFromTarget
methods of theSegmentRatioPortLocationModel
andBendAnchoredPortLocationModel
are now namedCreateParameterFromSource
andCreateParameterFromTarget
. -
The
ITagOwner
interface is now in theyWorks.Utils
namespace. -
Removed the
TableAnimation
class. Use the factoryAnimations.CreateTableAnimation
method as a replacement. -
The
GraphItemTypes.NotContains
method was removed, use theContains
method instead. -
The
FreeEdgeLabelModel.CreateEdgeAnchored
method has been renamed toCreateParameter
. -
The
FreeNodeLabelModel.CreateDefaultParameter
method has been removed and replaced by the newFreeNodeLabelModel.Center
field. -
The
FreeNodeLabelModel.CreateCanonicalParameter
method has been renamed toCreateParameter
. -
The
FreePortLabelModel.CreateDefaultParameter
method has been removed and replaced by the newFreePortLabelModel.Center
field. -
Changes to the
GraphCopier
class:-
The methods
CopyNodeStyle
,CopyEdgeStyle
,CopyPortStyle
,CopyLabelStyle
,GetOrCreateCopy
,CopyLabelLayoutParameter
, andCopyPortLocationParameter
have been made protected. -
The methods
CopyNode
,CopyGroupNode
, andCopyEdge
have been renamed toCreateNode
,CreateGroupNode
, andCreateEdge
to clarify their role. -
The
Clone
property has been renamed toCloneTypes
. -
The
Copy
method now uses anIEnumerable
of items instead of a filter predicate to define the subset to copy.
-
The methods
-
The
ILabelModel.CreateDefaultParameter
method has been removed. Instead suitable other Create*Parameter methods of the concrete label model implementations should be used. -
The
GenericLabelModel
class has been removed. Its functionality has been integrated into theCompositeLabelModel
, which can be used instead. -
The
CompositeLabelModel.LabelModels
property has been removed. Instead of adding label models to this list, the newAddModel
method has to be called. -
The
ILabelModel
parameter of theILabelModelParameterFinder.FindBestParameter
andILabelModelParameterProvider.GetParameters
methods has been removed. -
The static
LabelModelParameterSerializer
andPortLocationModelParameterSerializer
classes have been removed. These classes could be used to retrieve the properties of label model parameters and port location model parameters and are not necessary anymore as the parameter classes are now public. -
The
ILabelModelParameter.Supports
method has been removed. Instead, theILabelModel.GetGeometry
method may now throw an exception if the label and label model parameter don't match. -
The
IPortLocationModelParameter.Supports
method has been removed. Instead, theIPortLocationModel.GetLocation
method may now throw an exception if the port and port location model parameter don't match. -
The
UndoEngine.Token
property replaces theUndoEngine.GetToken
method. -
The static parameter fields of
FreeNodePortLocationModel
have been renamed analogue to the static parameter fields inInteriorNodeLabelModel
. -
The
IMapperRegistry
interface, theMapperRegistry
class, and theIGraph.MapperRegistry
property have been removed. To store additional information for graph items, either use the item's Tag property or keep a dictionary alongside the graph.
To configure layout settings for individual items, useLayoutData
instead. -
The label models
ExteriorLabelModel
,InteriorLabelModel
, andInteriorStretchLabelModel
have been renamed toExteriorNodeLabelModel
,InteriorNodeLabelModel
, andStretchNodeLabelModel
, respectively,.
Incompatible Behavior Changes
-
The arrow of the default edge style is now
ArrowType.Triangle
. -
The default lookup for
INode
doesn't return anIMutableRectangle
anymore, the default lookup forIBend
doesn't return anIMutablePoint
anymore, and the default lookup forILabel
doesn't return anIMutableSize
anymore. -
The rotation direction of
OrientedRectangle
,NodeLabel
,EdgeLabel
andFreeEdgeLabelModel
is now clockwise to be consistent with the other models. -
The default value for the
Padding
properties ofExteriorNodeLabelModel
,InteriorNodeLabelModel
,StretchNodeLabelModel
, andStretchStripeLabelModel
have been changed from empty insets to insets with value 2 on each side. This way the label bounds per default don't touch the bounds of their owner anymore. -
The default value for the
Distance
properties of theEdgePathLabelModel
andEdgeSegmentLabelModel
when using their default constructors have been changed from 0 to 2. This way the label bounds per default don't touch the edge path of their owner anymore when anEdgeSide
other thanOnEdge
is used. -
The
EdgeSegmentPortLocationModel.CreateParameterFromTarget
method now interprets the parameter ratio from the target to the source side. -
The default edge label model parameter is now created from an
EdgeSegmentLabelModel
using itsCreateParameterFromCenter
method instead ofCreateParameterFromSource
.
Controls
Incompatible API Changes
-
The XAML namespace for yFiles WPF has changed and is now
http://www.yworks.com/xml/yfiles-wpf/4.0/XAML
. -
GridVisualCreator
has been renamed toGridRenderer
. -
The new
CanvasControl.RenderTree
property now encapsulates all low-level render object related API which was previously available directly onCanvasControl
.-
This includes the default render tree groups (
RootGroup
,BackgroundGroup
,ForegroundGroup
,ContentGroup
,SelectionGroup
,FocusGroup
,HighlightGroup
,InputModeGroup
), the helper methods relating to render tree elements (HitElementsAt
,IsHit
,GetVisual
,GetVisualCreator
,GetCanvasObjects
(nowGetElements
),GetBounds
). -
Furthermore, some functionality previously available on
ICanvasObject(Group)
has been moved toRenderTree
as well, such as creating new elements or groups, changing the parent group or removing a render tree element.
-
This includes the default render tree groups (
-
Renamed the
CanvasControl.AutoDrag
property toAutoScrollOnBounds
. -
Renamed the
CanvasControl.AutoDragInsets
property toAutoScrollPadding
. -
Renamed the
ViewportChanges.AutoDrag
field toAutoScrollOnBounds
. -
Removed the
DragSize
,DragTime
andDoubleClickSize
properties of theCanvasControl
class. -
Renamed commands
MoveFocusBack
andMoveFocusForward
toMoveFocusLeft
andMoveFocusRight
. -
Renamed
HighlightIndicatorManager.SelectionModel
toItems
. -
Renamed
SelectionIndicatorManager.SelectionModel
toItems
. -
Renamed
SelectionIndicatorManager.Model
toDomain
. -
Renamed
Canvas
word components in properties and method parameter names toCanvasControl
. -
The
GraphModelManager
constructor no longer hascanvasControl
andcontentGroup
parameters. Also, theContentGroup
property can no longer be set directly. Instead, theInstall
method now sets bothCanvasControl
andContentGroup
. -
Removed the events
AutoDragChanged
,AutoDragInsetsChanged
,MouseWheelScrollFactorChanged
,MouseWheelZoomFactorChanged
, andProjectionChanged
of theCanvasControl
class. -
The
ICanvasObject.Group
property has been renamed toParent
. -
The predefined
EventRecognizer
constants of theMouseEventRecognizers
,KeyEventRecognizers
, andTouchEventRecognizers
classes have been moved to theEventRecognizers
class. In addition, some rarely used constants have been removed. -
The events on
CanvasControl
which are related to input devices and the correspondingEventRecognizer
constants have neem renamed to conform to platform conventions. -
Renamed the coordinate transformation methods to also include the source coordinate system in their names:
-
Renamed
CanvasControl.ToViewCoordinates
toWorldToViewCoordinates
. -
Renamed
CanvasControl.ToWorldCoordinates
toViewToWorldCoordinates
. -
Renamed
IRenderContext.ToViewCoordinates
toWorldToViewCoordinates
.
-
Renamed
-
Removed the
AnimateScrollCommands
property andCanvasControl.AnimateScrollCommandsProperty
field. ChangeAnimatedViewportChanges
property instead. -
ViewportLimiter.LimitViewport
now uses a signature that works with the new typeViewportDescriptor
and respects the newViewportLimitingMode
enum. -
ViewportLimiter.HonorBothDimensions
is now calledViewportLimiter.StrictBoundsContainment
and the default value changed to false. -
The default
InputMode
inGraphControl
is no longernull
but is now set toGraphViewerInputMode
.
Incompatible Behavior Changes
-
For new
GraphModelManager
instances, theInstall
method has to be called either directly or indirectly by assigning theGraphModelManager
to theGraphControl.GraphModelManager
property.
Rendering
Incompatible API Changes
-
Added properties
IntermediateToWorldTransform
andViewToWorldTransform
toIRenderContext
. -
The
ICanvasObjectDescriptor
interface has been renamed toIObjectRenderer
and itsIsDirty
method has been removed. -
The
ICanvasObject
interface has been renamed toIRenderTreeElement
and itsUserObject
property has been renamed toTag
. ItsDescriptor
property has been replaced with propertyRenderer
of typeIObjectRenderer
. -
The
ICanvasObjectGroup
interface has been renamed toIRenderTreeGroup
. -
The
ICanvasObjectInstaller
interface has been removed. -
The singletons of the
CanvasObjectDescriptors
class are no longer necessary, and thus, this class has been removed. There is now aVoidObjectRenderer.Instance
singleton. -
The
IFocusIndicatorInstaller
,IHighlightIndicatorInstaller
, andISelectionIndicatorInstaller
interfaces have been renamed toIFocusRenderer
,IHighlightRenderer
, andISelectionRenderer
respectively and now inherit fromIObjectRenderer
instead ofICanvasObjectInstaller
. Classes implementing these interfaces have been changed accordingly (EdgeStyleDecorationInstaller
,LabelStyleDecorationInstaller
,NodeStyleDecorationInstaller
, andPortStyleDecorationInstaller
have been renamed toEdgeStyleIndicatorRenderer
,LabelStyleIndicatorRenderer
,NodeStyleIndicatorRenderer
, andPortStyleIndicatorRenderer
respectively). -
The
GetInstaller
methods on theModelManager
,FocusIndicatorManager
,HighlightIndicatorManager
,SelectionIndicatorManager
,GraphFocusIndicatorManager
,GraphHighlightIndicatorManager
, andGraphSelectionIndicatorManager
classes are now calledGetRenderer
and returnIObjectRenderer
. Similarly, theGetCanvasObjectGroup
methods of these classes have been renamed toGetRenderTreeGroup
. -
The members of class
GraphModelManager
have been adjusted to reflect theICanvasObjectDescriptor
andICanvasObject
renamings. More precisely,DefaultEdgeDescriptor
,DefaultLabelDescriptor
,DefaultNodeDescriptor
,DefaultPortDescriptor
,EdgeDescriptor
,EdgeLabelDescriptor
,NodeDescriptor
,NodeLabelDescriptor
,PortDescriptor
,PortLabelDescriptor
,ProvideUserObjectOnMainCanvasObject
,GetCanvasObject
,GetCanvasObjectGroup
,GetCanvasObjectGroup
,GetCanvasObjectGroup
,GetCanvasObjectGroup
, andGetMainCanvasObject
have been renamed toDefaultEdgeRenderer
,DefaultLabelRenderer
,DefaultNodeRenderer
,DefaultPortRenderer
,EdgeRenderer
,EdgeLabelRenderer
,NodeRenderer
,NodeLabelRenderer
,PortRenderer
,PortLabelRenderer
,ProvideRenderTagOnMainRenderTreeElement
,GetRenderTreeElement
,GetRenderTreeGroup
,GetRenderTreeGroup
,GetRenderTreeGroup
,GetRenderTreeGroup
, andGetMainRenderTreeElement
respectively. -
The members of class
ItemModelManager
have been adjusted to reflect theICanvasObjectDescriptor
andICanvasObject
renamings. More precisely,CanvasObjectGroup
,Descriptor
,GetCanvasObject
,GetCanvasObjectGroup
, andGetDescriptor
have been renamed toRenderTreeGroup
,Renderer
,GetRenderTreeElement
,GetRenderTreeGroup
, andGetRenderer
respectively. -
The
RectangleIndicatorInstaller
,OrientedRectangleIndicatorInstaller
, andPointSelectionIndicatorInstaller
classes have been removed. -
The
IStripeInputVisualizationHelper
interface is now calledIStripeInputRenderer
and extendsIObjectRenderer
, theDefaultStripeInputVisualizationHelper
class has been removed. -
The
StripeDecorator.InputVisualizationDecorator
property has been renamed toInputRenderer
. -
The
DefaultPortCandidateDescriptor
class is now calledPortCandidateRenderer
. The class no longer has theCandidateDrawingValidNonFocusedKey
,CandidateDrawingValidFocusedKey
,CandidateDrawingInvalidNonFocusedKey
, andCandidateDrawingInvalidFocusedKey
static properties. -
The new
PortCandidateRenderer
property on theCreateEdgeInputMode
class replaces theCandidateDescriptor
andClosestCandidateDescriptor
properties. -
The new public property
PortCandidateRenderer
on thePortRelocationHandle
class replaces theCreatePortCandidateDescriptor
andCreateCurrentPortCandidateDescriptor
protected methods. -
The new public property
PortCandidateRenderer
on thePortRelocationHandleProvider
allows customizing the renderer for the port candidates. -
The new
ViewportRectangleRenderer
property on theOverviewInputMode
class allows customizing the renderer for the viewport rectangle. It replaces theTemplate
property and theViewportTemplateKey
static property. -
The new
MarqueeSelectionInputMode.MarqueeRenderer
property replaces theTemplate
property andMarqueeRectangleTemplateKey
static property. -
The new
LassoSelectionInputMode.LassoRenderer
property replaces theFinishRegionTemplate
andFinishRegionHighlightTemplate
properties and theFinishRegionTemplateKey
andFinishRegionHighlightTemplateKey
static properties. Also, theLassoPenKey
andLassoFillKey
static properties have been removed. -
The new
CandidateRenderer
property on theLabelPositionHandler
class replaces theCandidateTemplate
andHighlightTemplate
properties and theCandidateTemplateKey
andHighlightTemplateKey
static properties. -
The
GetCanvasObject
andGetCanvasObjects
methods of classCanvasControl
have been renamed toGetRenderTreeElement
and have been moved to theGraphModelManager
class. -
The
CreateSnapResultCanvasObjectDescriptor
method of classSnapContext
has been renamed toCreateSnapResultRenderer
. -
The
GraphVisualCreator
property of classGraphOverviewControl
is now calledGraphOverviewRenderer
and of typeIObjectRenderer
.
Selection, Focus, Highlight
Incompatible API Changes
-
The
IndicatorEdgeStyleDecorator
,IndicatorLabelStyleDecorator
,IndicatorNodeStyleDecorator
, andIndicatorPortStyleDecorator
classes were removed. Use theEdgeStyleIndicatorRenderer
etc. classes instead. -
The
GraphFocusIndicatorManager
,GraphHighlightIndicatorManager
, andGraphSelectionIndicatorManager
classes were removed. Use theFocusIndicatorManager
etc. classes and their default instances on theGraphControl
class instead and register instances of theEdgeStyleIndicatorRenderer
etc. classes to the item lookups via the graph decorator. -
The
AddSelection
andRemoveSelection
methods on theSelectionIndicatorManager
class were removed. Instead, modify theItems
property directly. -
HighlightIndicatorManager
now by default uses the newGraphControl.Highlights
collection. Adding, removing, and clearing highlights should now be done via theGraphControl.Highlights
property. -
The
ISelectionModel
interface has been removed and usages have been replaced byIObservableCollection
. Thus, selecting an element works by callingICollection.Add
, deselecting works by callingICollection.Remove
, and checking the selection state is done viaICollection.Contains
. -
The
ItemSelectionChangedEventArgs
have been replaced by usages ofItemEventArgs
and there are now two separate events for adding/selecting and removing/deselecting elements from the collections. TheItemSelectionChangedEventArgs
type has been removed. -
The default implementations of
IGraphSelection
andIStripeSelection
have been removed from the public API. -
Class
FocusIndicatorManager
no longer implementsINotifyPropertyChanged
. -
Replaced event
FocusIndicatorManager.PropertyChanged
with eventFocusedItemChanged
. -
Renamed Method
FocusIndicatorManager.OnPropertyChanged
toOnFocusedItemChanged
and changed signature. -
FocusIndicatorManager.ShowFocusPolicy
changed its default to the newWhenUsingKeyboard
. The old policy calledOnlyWhenFocused
is now calledWhenFocused
.
Styles
Incompatible API Changes
-
Methods
CreateVisual
andUpdateVisual
of classesNodeStyleBase
,EdgeStyleBase
,LabelStyleBase
,PortStyleBase
andStripeStyleBase
are no more abstract but virtual. Added Paint method to these classes as a simpler alternative to the two methods. -
The following classes have been removed:
VoidEdgeStyleRenderer
,VoidLabelStyleRenderer
,VoidNodeStyleRenderer
,VoidPortStyleRenderer
andVoidStripeStyleRenderer
. Instances of these classes can be retrieved from the Renderer property of the corresponding void style implementations. -
The
IArrow
interface now requires theCropAtPort
property to be provided by implementations. For backward compatibility return false in simple subclasses. -
The class
Arrow
is now immutable and comes with separate scale factors for arrow length and width. The default arrow was renamed toArrowType.Stealth
, circle arrow toArrowType.Ellipse
, and simple arrow toArrowType.Open
. The short arrow type was removed. -
Class
TableNodeStyle
no longer implementsINotifyPropertyChanged
. -
Renamed some values of
TextWrappingShape
andShapeNodeShape
:-
Triangle2 is now
TrianglePointingDown
. -
Hexagon2 is now
HexagonStanding
.
-
Triangle2 is now
-
Removed the following values from
ShapeNodeShape
:ShearedRectangle
,ShearedRectangle2
, Trapez, Trapez2,FatArrow
, andFatArrow2
.-
Use the
ArrowNodeStyle
for more flexible visualizations of these geometries.
-
Use the
-
Renamed
Star5Up
to Star5, removed old (down pointing) Star5.-
Use the factory methods on
GeneralPathNodeStyle
for stars and polygons with an arbitrary number of points/edges and configurable rotation angle.
-
Use the factory methods on
-
Removed the following values from
TextWrappingShape
:ShearedRectangle
,ShearedRectangle2
, Trapez, and Trapez2. -
Most item style implementations have become sealed, and their renderers have been removed from the API. Instead of
subclassing the styles or their renderers, custom style implementations should use delegation instead. For this the
new
DelegatingNodeStyle
andCompositeNodeStyle
style variants may be used. - The item style constructors taking a custom renderer implementation have been removed. Instead, a custom style should be implemented that may delegate to one of the library styles.
-
The
TableNodeStyle.CopyBackgroundStyle
method has been removed. TheClone
method doesn't deep copy the background style but just uses it for the clone as well, which also was the previous default behavior. -
The
Wrapped
property ofCollapsibleNodeStyleDecorator
,IndicatorNodeStyleDecorator
,IndicatorEdgeStyleDecorator
,IndicatorLabelStyleDecorator
,IndicatorPortStyleDecorator
,ShadowNodeStyleDecorator
, andIconLabelStyle
has been renamed toWrappedStyle
. -
The deprecated styles
BevelNodeStyle
,PanelNodeStyle
andShinyPlateNodeStyle
have been removed. -
The default
StringFormat
inLabelStyle
now usesStringTrimming.EllipsisWord
. Before, it wasCharacter
. It also usesStringFormatFlags.LineLimit
as defaultFormatFlags
. Before, no flag was set.
Interaction
Incompatible API Changes
-
CanvasControl
'sLastEventLocation
property has been removed. UseLastPointerEvent.Location
instead. -
CanvasControl
'sLastInputEvent
property has been renamed toLastPointerEvent
to better reflect its type. -
The
ResourceKey
andComponentResourceKey
classes have been removed. Their usages have been replaced, often using properties of type Pen orIObjectRenderer
. -
The
PortRelocationHandle.GhostVisualizationPenKey
has been replaced by aGhostVisualizationPen
property. -
The
SnapLine.SnapLinePenKey
has been replaced by aSnapContext.SnapResultPen
property. -
The
MoveLabelInputMode
class and its corresponding property onGraphEditorInputMode
have been removed. Label movement is now handled directly byMoveInputMode
. Most customizations related tolabel
movement (as opposed to the move gesture in general) can now be done onLabelPositionHandler
, instead. -
The commands previously defined on
GraphControl
andCanvasControl
are now located in class \GraphCommands
. The suffix \Command
has been dropped from their names. -
KeyboardInputMode
'sAddHandler
overloads have been renamed toAddRecognizerBinding
andAddKeyBinding
to clarify their usage. TheAddCommand
method has been renamed toAddCommandBinding
to match the new naming. -
KeyboardInputMode
'sRemoveCommand
andRemoveHandler
methods have been removed. Instead, the add methods now return a binding token which provides aRemove
method to remove that binding. -
Replaced
Dummy
in names with a more descriptive term. In particular:-
In
CreateEdgeInputMode
,DummyEdge
,DummyEdgeGraph
,DummyTargetNode
,,DummyTargetNodePort
,UpdateDummyEdgeSourcePort
,UpdateDummyEdgeTargetPort
,GetDummyEdgeSnapLines
, andCreateDummyBend
have been renamed toPreviewEdge
,PreviewGraph
,PreviewEndNode
,PreviewEndNodePort
,UpdatePreviewEdgeStartPort
,UpdatePreviewEdgeEndPort
,GetPreviewEdgeSnapLines
, andCreatePreviewBend
. -
The
Visualization.Dummy
enum value has been renamed toVisualization.Placeholder
. -
In
PortRelocationHandle
,CreateDummyEdge
has been renamed toCreatePreviewEdge
.
-
In
-
The
NavigationInputMode.FindNearestItem
method now gets thestartItem
as a parameter instead of the location of it, and this item is also included in theitemsToCheck
parameter. Implementations may use the newGetReferenceLocation
method to find the starting location and should make sure not to return thestartItem
itself. -
The
textProvider
parameter forToolTipInputMode
's constructor has been removed. An event handler for theQueryToolTip
event can be registered instead. -
The return value of the
DropInputMode.AdjustEffect
method has been changed from bool to void. This method no longer determines if the mode will handle drag or drop events but only changes the drag/drop effect of given event args as its name implies. TheDropInputMode.AcceptDrag
method now determines if the mode will handle drag and drop events. -
CreateEdgeInputMode
's methods have been renamed:-
GetClosestSourceCandidate
toSelectClosestStartCandidate
. -
GetClosestCandidate
toSelectClosestCandidate
. -
GetClosestTargetCandidate
toSelectClosestEndCandidate
.
-
-
CreateEdgeInputMode.StartPortCandidateHitRadius
now is defined in view coordinates. -
The event
GraphEditorInputMode.LabelTextChanged
has been changed toLabelEdited
to reflect the broader scope of changes allowed during label editing. Similarly,GraphEditorInputMode.OnLabelTextChanged
is now namedOnLabelEdited
. -
Most methods, properties, and events related to label editing have been moved from
GraphEditorInputMode
toEditLabelInputMode
:AutoRemoveEmptyLabels
,HideLabelDuringEditing
,TextEditorInputMode
,TextEditorInputModeConfigurator
,CreateLabel
,CreateLabelCore
,EditLabelCore
,OpenTextEditor
,LabelDeleted
,LabelTextEditingStarted
,LabelTextEditingCanceled
, andValidateLabelText
. The eventsLabelEditing
andLabelAdding
have been moved toEditLabelInputMode
and renamed toQueryLabelEditing
andQueryLabelAdding
, respectively, to clarify their purpose. -
Most methods, properties, and events related to label editing have been moved from
TableEditorInputMode
toEditLabelInputMode
:AutoRemoveEmptyLabels
,HideLabelDuringEditing
,TextEditorInputMode
,TextEditorInputModeConfigurator
,CreateLabel
,CreateLabelCore
,EditLabelCore
,OpenTextEditor
,LabelDeleted
,LabelTextEditingStarted
,LabelTextEditingCanceled
, andValidateLabelText
. The eventsLabelEditing
andLabelAdding
have been moved toEditLabelInputMode
and renamed toQueryLabelEditing
andQueryLabelAdding
, respectively, to clarify their purpose. -
Removed callback methods which only raised the related events from classes
CanvasControl
andGraphControl
, e.g.,OnZoomChanged
. Use the corresponding events instead, e.g.,ZoomChanged
. -
Removed the factory methods for the sub-input modes from
GraphInputMode
,GraphViewerInputMode
,GraphEditorInputMode
,TableEditorInputMode
, andTextEditorInputMode
(e.g.CreateKeyboardInputMode
). Set custom instances using the properties, instead. -
Removed the factory methods for the
ToolTip
andTextBox
properties on classesToolTipInputMode
andTextEditorInputMode
, respectively. Set custom instances using the properties, instead. -
Removed the methods
GetBounds
,GetVisual
,GetVisualCreator
, andIsHit
fromCanvasControl
class. Use the respective methods ofRenderTree
class instead. -
The
ICommand
interface and its implementations have been replaced with the enumCommand
. -
Constants of
ICommand
have been replaced with equally named constants of enumCommand
. -
The methods
CanExecute
andExecute
and itsCanExecuteChanged
event inICommand
have been replaced withCanvasControl
'sCanExecuteCommand
andExecuteCommand
methods and theCanExecuteCommandChanged
event, respectively. -
Custom commands can no longer be created. As an alternative, register handlers on
KeyboardInputMode
. -
Renamed
DoubleClickPolicy
toClickReportingPolicy
. -
Renamed
ClickInputMode.DoubleClickPolicy
toClickReportingPolicy
. -
Renamed
DoubleClickPolicy.InitialSingleAndDoubleClick
toClickReportingPolicy.Instant
. -
Renamed
DoubleClickPolicy.DoubleClickOnly
toWaitForDoubleClick
. -
Removed
DoubleClickPolicy.BothSingleClicksAndDoubleClick
. -
Changed the default of
ClickInputMode.ClickReportingPolicy
toClickReportingPolicy.Instant
. -
Removed the
PreventNextDoubleClick
method fromClickInputMode
class. Use theCancel
method instead. -
Replaced
Mouse2DEventArgs
andTouch2DEventArgs
withPointerEventArgs
. -
Integrated
TapInputMode
intoClickInputMode
. Touch input now also firesClicked
events. -
Removed all
ClickInputMode
events except forClicked
. Click buttons and click count can be obtained from theClickEventArgs
. -
Removed the events
ItemTapped
,ItemDoubleTapped
, andCanvasTapped
fromGraphInputMode
in favor of checking thePointerType
on the corresponding Click event. -
The
HandleIsHitTouch
andGetClosestHitHandleTouch
methods ofHandleInputMode
have been removed in favor of the methodsHandleIsHit
andGetClosestHitHandle
, which now handle all types of pointer devices. -
The
InputModeContext
property has been removed from theIInputMode
interface. In input mode implementations, the property has been renamed toParentInputMode
and changed to protected access to prevent incorrect usage. -
Renamed "Source" to "Start" and "Target" to "End" in the following members of
CreateEdgeInputMode
class:-
Renamed
ResolveSourcePortCandidates
toResolveStartPortCandidates
. -
Renamed
ResolveTargetPortCandidates
toResolveEndPortCandidates
. -
Renamed
SourcePortCandidateChanged
toStartPortCandidateChanged
. -
Renamed
TargetPortCandidateChanged
toEndPortCandidateChanged
. -
Renamed
SourcePortCandidate
toStartPortCandidate
. -
Renamed
TargetPortCandidate
toEndPortCandidate
. -
Renamed
SnapToTargetCandidate
toSnapToEndCandidate
. -
Renamed
CancelGestureOnInvalidTarget
toCancelGestureOnInvalidEnd
. -
Renamed
SourceNodeDraggingFinishedRecognizer
toStartPortOwnerDraggingFinishedRecognizer
. -
Renamed
SourceNodeDraggingCursor
toStartPortOwnerDraggingCursor
. -
Renamed
ShowSourcePortCandidatesHitTestable
toShowStartPortCandidatesHitTestable
. -
Renamed
OnSourcePortCandidateChanged
toOnStartPortCandidateChanged
. -
Renamed
OnTargetPortCandidateChanged
toOnEndPortCandidateChanged
. -
Renamed
SourcePortCandidateChanged
toStartPortCandidateChanged
. -
Renamed
TargetPortCandidateChanged
toEndPortCandidateChanged
. -
Renamed
GetSource
toGetStartPortOwner
. -
Renamed
GetTarget
toGetEndPortOwner
. -
Renamed
GetSourcePortCandidateProvider
toGetStartPortCandidateProvider
. -
Renamed
GetTargetPortCandidateProvider
toGetEndPortCandidateProvider
. -
Renamed
GetSourcePortCandidates
toGetStartPortCandidates
. -
Renamed
GetTargetPortCandidates
toGetEndPortCandidates
. -
Renamed
GetSourcePortCandidate(PointD)
toGetStartPortCandidate
. -
Renamed
GetSourcePortCandidate
(IEnumerable
,<
IPortCandidate
>PointD
, bool) toSelectStartPortCandidate
. -
Renamed
GetClosestCandidate
toSelectClosestCandidate
. -
Renamed
GetClosestSourceCandidate
toSelectClosestStartCandidate
. -
Renamed
GetClosestTargetCandidate
toSelectClosestEndCandidate
. -
Renamed
SourcePortCandidateHitRadius
toStartPortCandidateHitRadius
. -
Renamed
UpdateTargetLocation
toUpdateEndLocation
. -
Renamed
ShowTargetHighlight
toShowEndHighlight
. -
Renamed
UpdateTargetHighlight
toUpdateEndHighlight
. -
Renamed
DummyTargetNode
toPreviewEndNode
. -
Renamed
DummyTargetNodePort
toPreviewEndNodePort
.
-
Renamed
-
Renamed
ShowPortCandidates.Source
toStart
andShowPortCandidates.Target
toEnd
. -
Removed
CreateEdgeInputMode.CreateDummyEdgeGraph
,CreateEdgeInputMode.CreateDummyEdge
,CreateEdgeInputMode.CreateDummyTargetNode
,CreateEdgeInputMode.CreateDummyTargetNodePort
,CreateEdgeInputMode.DummySourceNodePort
,CreateEdgeInputMode.UpdateDummyEdgeSourcePort
, andCreateEdgeInputMode.UpdateDummyEdgeTargetPort
. -
Events which involve item changes triggered by input modes are now of type
InputModeItemEventArgs
instead ofItemEventArgs
. These are the events:-
CreateBendInputMode
:BendCreated
. -
CreateEdgeInputMode
:StartPortCandidateChanged
,EndPortCandidateChanged
,EdgeCreated
,PortAdded
,EdgeCreationStarted
. -
GraphEditorInputMode
:LabelEdited
,LabelAdded
,NodeCreated
,PortAdded
. -
ItemDropInputMode
and inheritors:ItemCreated
. -
NavigationInputMode
:GroupCollapsing
,GroupCollapsed
,GroupExpanding
,GroupExpanded
,GroupEntering
,GroupEntered
,GroupExiting
,GroupExited
. -
TableEditorInputMode
:DeletedItem
. -
EditLabelInputMode
:LabelAdded
,LabelEditingStarted
,LabelEditingCanceled
,LabelEdited
. -
StripeDropInputMode
:StripeCreated
.
-
-
Events which involve item deletion or structural changes triggered by input modes are now of type
InputModeItemChangedEventArgs
:-
GraphEditorInputMode.DeletedItem
:InputModeItemChangedEventArgs
instead ofItemDeletedEventArgs
. -
GraphEditorInputMode.EdgePortsChanged
:InputModeItemChangedEventArgs
instead ofEdgeEventArgs
. -
GraphEditorInputMode.NodeReparented
:InputModeItemChangedEventArgs
instead ofNodeEventArgs
. -
EditLabelInputMode.LabelDeleted
:InputModeItemChangedEventArgs
instead ofLabelEventArgs
.
-
-
Removed the
PortRelocationHandle.CreateDummyEdgeVisualCreator
method. To change the preview edge's style overwritePortRelocationHandle.CreatePreviewEdge
instead. -
Renamed
GraphInputMode.ShouldSelectItem
toShouldSelect
. -
The event
DeletedSelection
ofGraphEditorInputMode
now usesItemsEventArgs
instead ofSelectionEventArgs
. -
The static fields
AllNodeCandidates
andAllNodeAndEdgeCandidates
onEdgeReconnectionPortCandidateProviders
have been replaced by the factory methodsFromAllNodeCandidates
andFromAllNodeAndEdgeCandidates
. The implementations now provide a port candidate for the unchanged port of the edge when collecting the port candidates from theIPortCandidateProvider
instances of the nodes and edges. -
The generic type of the
IHitTester
interface has been removed. Instead, a parameter of typeGraphItemTypes
has been added to itsEnumerateHits
method. -
The
HandleTypes
enums has been refactored to a non-flaggableHandleType
enum, and the values have been adjusted. -
A
Tag
property has been added to theIHandle
interface. yFiles does not use the property and initializes it withnull
, but decorating handles forward any values unmodified. -
The protected virtual
CreateEdgeCreationInputModeContext
method on theCreateEdgeInputMode
class has been removed. Use or override theCreateInputModeContext
method, instead. -
The protected
Should-
methods of the input modes have been removed and replaced by predicate properties. -
The
LassoSelectionEventArgs.SelectionPath
property has been renamed to Path. -
The core
MarqueeSelect
andLassoSelect
methods ofGraphEditorInputMode
andGraphViewerInputMode
, that take an enumerable and predicate, have been removed while the otherMarqueeSelect
andLassoSelect
method got an additional parameter of typeSelectionPolicy
. -
The
LabelPositionHandler.SetPosition
method has been removed. -
The
LabelPositionHandler.UseFinder
property has been removed. Use the newUseParameterFinderRecognizer
property instead. -
The
LabelPositionHandler.UseParameterFinder
method has been renamed toShouldUseParameterFinder
. -
The
ToolTipQueryEventArgs
class is now namedQueryToolTipEventArgs
to properly match the corresponding event's name. -
The
LabelPositionHandler.UseFinder
property has been removed. -
Method
GetBendsInPath
has been added to theIBendSelectionTester
interface and is used to check for bends that should be lasso selected. -
Method
GetPortsInPath
has been added to theIPortSelectionTester
interface and is used to check for ports that should be lasso selected. -
DiscardInvalidItems
inItemHoverInputMode
has been renamed toIgnoreInvalidItems
, and its behavior was reversed. -
The
DoStartEdgeCreation
method on theCreateEdgeInputMode
class is now calledStartEdgeCreation
. -
The
DoStartDrag
method on theMoveInputMode
class is now calledStartDrag
. -
The
BeginDragging
method on theHandleInputMode
class is now calledStartDrag
. -
The
AddLabel
method onGraphEditorInputMode
is now calledStartLabelAddition
. -
The
EditLabel
method onGraphEditorInputMode
is now calledStartLabelEditing
. -
The
MouseHoverInputMode
class has been renamed toToolTipInputMode
. -
The
GraphInputMode.MouseHoverInputMode
property has been renamed toToolTipInputMode
.
Incompatible Behavior Changes
-
The default lookup of labels now returns an
IPositionHandler
implementation. -
The
LabelDropInputMode.IsValidLabelOwner
method now only accepts instances ofFreeLabelModel
or that thedraggedLabel
's owner type matches the owner type e.g.INode
,IEdge
, orIPort
. -
The
DropInputMode.AdjustEffect
method no longer determines if the mode will handle drag or drop events but only change the drag/drop effect of given event args as its name implies. TheDropInputMode.AcceptDrag
method now determines if the mode will handle drag and drop events. - Unselected items can be moved by default.
- Edge creation: by default, start port candidates are shown when hovering over a node.
-
GraphViewerInputMode
/GraphEditorInputMode
: theClickHitTestOrder
default value has been changed toGraphItemTypes.All
which means that the default order is the Z-Order but with a prioritization for elements behind labels. -
GraphViewerInputMode
: TheMoveViewportInputMode
's priority has been changed to 190. -
GraphEditorInputMode
: The sub input mode's priorities have been changed to the following order:WaitInputMode
,KeyboardInputMode
,HandleInputMode
,ClickInputMode
,CreateEdgeInputMode
,MoveSelectedItemsInputMode
,MoveUnselectedItemsInputMode
,CreateBendInputMode
,MoveViewportInputMode
,LassoSelectionInputMode
,MarqueeSelectionInputMode
,ItemHoverInputMode
,NavigationInputMode
,ContextMenuInputMode
,NodeDropInputMode
,LabelDropInputMode
,PortDropInputMode
,ToolTipInputMode
,EditLabelInputMode
. -
In
CreateEdgeInputMode
it was previously possible to define a fallback forGetPortOwner
ifIHitTester
was removed. This option for defining a fallback is removed and always returnsnull
. -
Improved the
CreateBendInputMode
behavior: Previously, dragging an existing bend triggered theBendCreated
event, causing confusion and limiting event handling for new bend creation. This has been adjusted to ensure the event only fires when a new bend is created interactively. -
Refined the event sequence of
CreateEdgeInputMode
to ensure consistency and symmetry between gesture cancellation and completion. -
Reorganized the sequence to include
EdgeCreationStarted
only after the start node dragging has finished and the end port candidate is determined. -
Adjusted the timing of the end port candidate update, which now occurs just before
GestureFinishing
, allowing users to apply final updates to the end port. -
Ensured the following event order for gestures:
-
GestureStarting
,GestureStarted
. -
Cancellation path:
GestureCanceling
,GestureCanceled
. -
Completion path:
EdgeCreationStarted
,GestureFinishing
,EdgeCreated
,GestureFinished
.
-
-
The
EdgeCreationStarted
andEdgeCreated
events provide now arguments of typeItemEventArgs
.<
IEdge
> -
NavigationInputMode
now interprets the direction of arrow keys in view coordinates by default. -
Edges can now be reconnected to other nodes per default. The old behavior can be restored by decorating the edge
lookup with the provider returned by
EdgeReconnectionPortCandidateProviders.FromSourceAndTarget
. -
The default value of
EnableSnappingRecognizer
inCreateEdgeInputMode
,HandleInputMode
, andMoveInputMode
has been changed fromCtrlUp
toAltUp
. -
The default value of
DisableSnappingRecognizer
inCreateEdgeInputMode
,HandleInputMode
, andMoveInputMode
has been changed fromCtrlDown
toAltDown
. -
The default value of
CenterReshapeRecognizer
inNodeReshapeHandleProvider
andReshapeHandlerHandle
has been changed fromAltIsDown
toCtrlIsDown
. -
The default value of
ReparentNodeHandler.ReparentRecognizer
has been changed fromShiftIsDown
toCtrlIsDown
. -
The
GraphInputMode.FindItems
method now considers the actual z-order of the hit items. -
Orthogonal edge editing now has to be enabled for each edge that should be edited orthogonally instead of enabling
it for all edges by setting the
GraphEditorInputMode.OrthogonalEdgeEditingContext
property. This can be done by enabling thePolylineEdgeStyle.OrthogonalEditing
properties of the styles, by setting an apropriateFallbackEdgeHelperProvider
on the usedOrthogonalEdgeEditingContext
or by providing anIOrthogonalEdgeHelper
in the edges' lookup. -
The
MultiSelectionRecognizer
ofGraphEditorInputMode
andGraphViewerInputMode
are not used anymore for marquee and lasso selection. Instead,MarqueeSelectionInputMode
andLassoSelectionInputMode
have their own modifiers for different selection policies. -
Changed the default of
TextEditorInputMode.TextBoxPlacementPolicy
toTextBoxPlacementPolicy.MoveTextBox
. -
CanvasControl.UpdateContentBounds
now only considers the items in theRenderTree.ContentGroup
instead of theRootGroup
when calculating the new bounds. -
The default value of
CreateEdgeInputMode.PortCandidateResolutionRecognizer
has been changed fromShiftIsDown
toCtrlIsDown
. -
The default value of the
CreateEdgeInputMode.EnforceBendCreationRecognizer
has been changed formCtrlIsDown
toAltIsDown
. -
The default edge lookup doesn't provide an
IPositionHandler
anymore so dragging a selected edge doesn't move all its bends. -
GraphEditorInputMode
'sMoveUnselectedItemsInputMode
now only moves unselected items. Previously it also moved selected items despite its name. -
The default value of
TextEditorInputMode.AutoCommitOnFocusLost
is nowtrue
. This means that the text of an edited label is commited instead of discarded when the text box loses the focus e.g. by clicking on the canvas. - During edge creation, bends are now created when pressing a mouse button instead of releasing it. This way, when starting edge creation by dragging the mouse from a node, no bend is created on the first mouse button release, which was an often unwanted behavior.
-
The default values of the
NodeReshapeHandleProvider.RatioReshapeRecognizer
property andReshapeHandlerHandle
has been changed tonull
. If no custom recognizer is set,ReshapeHandlerHandle
uses the newHandleInputMode.IsDirectionalConstrained
method instead if aHandleInputMode
is found in theIInputModeContext
. -
GraphEditorInputMode.AllowGroupingOperations
is now true by default.
Snapping
Incompatible API Changes
-
LabelSnapContext
has been removed, and label snapping is now handled byGraphSnapContext
:-
The
GraphEditorInputMode.LabelSnapContext
property and theGraphEditorInputMode.OnLabelSnapContextChanged
method have been removed. -
The
CollectLabelSnapLineEventArgs
class has been removed. -
Configuration properties of
LabelSnapContext
have been moved toGraphSnapContext
and renamed. -
The
ILabelSnapContextHelper
interface and theLabelSnapContextHelper
class have been removed. Instead, theILabelSnapResultProvider
interface and the classesLabelSnapResultProvider
andLabelSnapReferenceProvider
have been added. -
The
LabelDecorator.LabelSnapContextHelperDecorator
property has been replaced by the propertiesSnapReferenceProvider
andSnapResultProvider
.
-
The
-
CollectGraphSnapLinesEventArgs
has been renamed toCollectSnapReferencesEventArgs
. Its methodsAddFixedNodeSnapLine
,AddFixedSegmentSnapLine
,AddPortSnapLine
, andAddAdditionalSnapLine
have been removed and replaced by the singleAddSnapReference
method. -
GraphSnapContext
has been refactored, and the following members have changed:-
The properties
SnapNodesToSnapLines
,SnapBendsToSnapLines
,SnapSegmentsToSnapLines
,SnapBendAdjacentSegments
,SnapPortAdjacentSegments
,SnapEdgeLabels
,SnapNodeLabels
, andSnapPortLabels
have been replaced by the new propertiesSnappableItems
andGridSnappableItems
. -
The
CollectVisibleNodePairs
method now takes theCollectSnapReferencesEventArgs
the snap references shall be added to. -
The methods
FindSameWidthEntries
andFindSameHeightEntries
have been removed. Instead, theSnapSize
references describing to which size items can snap are provided by theSnapReferences
property. Similarly, theFixedNodeSnapLines
,FixedSegmentSnapLines
,FixedPortSnapLines
, andAdditionalSnapLines
properties have been removed. TheSnapReferences
property should be used instead.
-
The properties
-
The
SnapLine.ResourceKey
property has been removed along with most of the staticResourceKey
members used for snapping. Instead, aVisualizationType
property of the enum typeSnapReferenceVisualizationType
is used to describe which visualization should be used for theSnapLine
. -
Most subclasses of
SnapLine
have been removed as they only provided properties used for the visualization that are now available onSnapResult
. -
The
SnapTypes
enum used bySnapResult
has been replaced by the newSnapConstraint
class that supports finding common snap locations forSnapResults
with different constraints. -
The
Snap
andIsSnapped
methods ofSnapResult
have been removed. Instead, aConstraint
property of typeSnapConstraint
has been added that is used to merge possibleSnapResults
and check if a location is valid for a givenSnapResult
. -
The
SnapResult.GetVisualCreator
method has been removed and is replaced by the newObjectRenderer
property. -
The factory methods of
SnapResults
have been adjusted:-
CreatePointSnapResult
has been renamed toCreateSnapResult
. -
CreateSnapLineSnapResult
has been renamed toCreateLineSnapResult
. -
CreateLabelSnapResult
has been removed.
-
-
The methods of the snap result providers have been adjusted to support the new
SnapReference
API. Most methods now take one instance of aSnapReference
subclass likeSnapLine
orSnapGrid
. -
The classes
SnapState
,ArrowContainer
, andArrowControl
have been removed. -
The type of the
SnapContext
properties of all input modes has been changed fromSnapContext
toGraphSnapContext
. -
Most classes and members that had
SnapLine
in their name have been renamed to includeSnapReference
instead. -
The
ReshapeRectangleContext.InitialBounds
property has been renamed toInitialLayout
. -
The
GraphEditorInputMode.SnapContext
property is now set per default and may not benull
. It is disabled per default. -
Renamed the
GraphSnapContext.NodeToNodeDistance
property toNodeDistance
. -
Renamed the
GraphSnapContext.EdgeToEdgeDistance
property toEdgeDistance
.
Clipboard
Incompatible API Changes
-
IClipboardHelper
's methodsCut
,Copy
, andPaste
have been renamed toOnCut
,OnCopied
, andOnPasted
. -
IClipboardHelper
's methodsCut
andCopy
don't return anobject
anymore and theobject
parameter ofPaste
andShouldPaste
has been removed. ForCut
/Copy
andPaste
the sameIClipboardHelper
method is now used so any state that should be transfered can be stored in a custom implementation. -
IClipboardHelper
has new methodsShouldDuplicate
andOnDuplicated
which have to be implemented, now. -
GraphClipboard
`s methodsGetMemento
andGetClipboardHelper
have been removed. -
GraphClipboard
's protectedCopy
andPaste
methods now take the newClipboardOperationContext
as parameter instead of thesourceGraphs
andfilter
predicates. -
The methods
CreateClipboardGraph
,CreateToClipboardCopier
,CreateFromClipboardCopier
,CreateDuplicateCopier
, andCreateDefaultClipboardIdProvider
fromGraphClipboard
that were used to lazily initialize the corresponding properties have been removed. -
GraphClipboard.Paste
now takes an enumerable ofIModelItem
astargetOwners
parameter instead of atargetFilter
predicate. -
GraphClipboard.IsFoldingStateElement
is now an instance method and doesn't have an owner parameter anymore. -
ElementCopiedCallback
has been renamed toItemCopiedCallback
. -
GraphViewerInputMode
'sElementsCopied
event has been renamed toItemsCopied
. -
GraphEditorInputMode
'sElementsCopied
,ElementsCut
,ElementsCopied
,ElementsPasted
andElementsDuplicated
events were renamed toItemsCopied
, etc. -
On
GraphClipboard
, theElementsCut
,-Cutting
,-Copying
,-Copied
,-Pasting
,-Pasted
,-Duplicating
, and-Duplicated
events were renamed toItems
instead ofElements
and use the newGraphClipboardEventArgs
. Also, theOnElementCut
,-Copied-
, and-Pasted
methods were renamed to start withOnItem
and take an additionalClipboardOperationContext
as a parameter. -
GraphClipboard.RemoveElements
has been renamed toRemoveItems
. -
GraphClipboard.IsFoldingStateElement
has been renamed toIsFoldingStateItem
. -
GraphClipboard.CreateContext
now takes an additionalIInputModeContext
parameter that should be returned in the new contexts lookup. -
The
GraphClipboard.ClipboardGraph
property is now read-only. -
The parameters of
GraphClipboard
'sCopy
method have been rearranged so default values for optional parameters could be added. -
For consistency reasons, the property
GraphClipboard.Empty
is now calledIsEmpty
. -
GraphControl
instances now use a sharedGraphClipboard
per default. To revert to the previous behavior, a newGraphClipboard
instance can be set on eachGraphControl
. -
GraphClipboard
'sCut
,Copy
,Paste
, andDuplicate
methods now use anIEnumerable
instead of a filter predicate to determine the subgraph to copy. -
GraphClipboard
'sCreate*Filter
methods have been removed. -
The
GraphClipboard
now usesClipboardGraphCopier
instances for itsToClipboardCopier
,FromClipboardCopier
, andDuplicateCopier
. -
The
Graph.ParentNodeDetectionModes
has been reduced to contain only the mainly used options. The optionRoot
has been renamed toNone
, and the optionsAllowSelf
andForce
as well as theModeMask
andModifierMask
have been removed. TheGetTargetNode
method can be overridden if the reduced modes are not suitable and may call the newFindParentByPreviousParent
method to simulate the oldForce
setting. -
GraphClipboard
`sGetTarget
methods now take an additionalClipboardOperationContext
parameter, and theGetTarget
overload for nodes also takes apasteLocation
as an additional parameter. -
The
GraphClipboard.PasteDelta
property has been renamed toPasteOffset
. It is now modified by theGraphClipboard
'sCut
,Copy
,Paste
, andDuplicate
methods instead of the corresponding methods onGraphEditorInputMode
. -
The
GraphEditorInputMode.PasteDelta
property has been removed and replaced by the newGraphClipboard.PasteOffsetIncrement
property. -
The values
LabelModelParameter
andPortLocationModelParameter
have been removed from theCloneTypes
enum as those parameter are typically immutable, so cloning them has no effect.
Folding
Incompatible API Changes
-
Interface
IFolderNodeConverter
has a newUpdateGroupNodeState
method. -
Interface
IFoldingEdgeConverter
has a newUpdateMasterEdges
method. -
FolderNodeConverter
now relies onFolderNodeDefaults
to configure initialization and update of states. -
FoldingEdgeConverter
andMergingFoldingEdgeConverter
now rely onFoldingEdgeDefaults
to configure initialization and update of states. -
The
FoldingLabelOwnerState.Remove
method(. -
FoldingLabelState
) was renamed toRemoveLabel
and theFoldingLabelState.RemoveBend
method(FoldingBendState
) was renamed toRemoveBend
.
Incompatible Behavior Changes
-
Tags are not automatically the same on group and folder nodes or master and folding edges (master and view states).
Instead, they have to be synchronized using the
IFolderNodeConverter
andIFoldingEdgeConverter
implementations. The default implementations already synchronize the tags. -
In the graph of a folding view, the
CreateGroup
method now always creates a group even if theisExpanded
predicate specified in theFoldingManager.CreateFoldingView
method specifies otherwise. Create the group on the master graph if you want the predicate to be respected.
Lookup
Incompatible API Changes
-
Renamed
LookupDecorator.SetImplementation
toAddConstant
. -
Renamed
LookupDecorator.SetFactory
toAddFactory
. -
Renamed
LookupDecorator.SetImplementationWrapper
toAddWrapperFactory
. -
Renamed
LookupDecorator.HideImplementation
to Hide. -
Renamed lookup decorators in general by removing the
Decorator
suffix. For example,graphDecorator.EdgeDecorator.PositionHandlerDecorator.HideImplementation
is nowgraphDecorator.Edges.PositionHandler.Hide
. -
Removed
LookupDecorator.NullIsFallback
. Instead, use the predicate of theAddFactory
method or return the original instance in theAddWrapperFactory
method. -
Removed
LookupDecorator.DecorateNulls
. Instead, implement the desired behavior inAddWrapperFactory
. -
Removed the
SimpleNode.LookupImplementation
property,SimpleEdge
,SimpleBend
,SimpleLabel
andSimplePort
. Instead, use the newGetDecorator
method to adjust the item's lookup. -
The
SimpleNode
,SimpleEdge
,SimpleBend
,SimpleLabel
andSimplePort
classes are now sealed, and theirLookup
method is no longer virtual. To adjust the item's lookup, use theGetDecorator
method. -
Removed
CanvasControl.InputModeContextLookup
andCanvasControl.InputModeContextLookupChain
. Instead, use the newGetInputModeContextDecoratorFor
method to decorate the input mode context lookup. -
The
EdgeDecorator.GetDecoratorFor
method,NodeDecorator
, etc. no longer has thenullIsFallback
anddecorateNull
parameters. -
The
node
parameter of the methods in the interfacesIGroupPaddingProvider
,INodeSizeConstraintProvider
, andIGroupBoundsCalculator
has been removed. -
The
edge
parameter of the methods in the interfacesIEdgePortHandleProvider
,IBendCreator
, andIOrthogonalEdgeHelper
has been removed. -
The
label
parameter of the methods in the interfacesILabelModelParameterProvider
, andILabelModelParameterFinder
has been removed. -
The model item parameter in
ISnapReferenceProvider.AddSnapReferences
has been removed. -
The
ILabelModelParameter
parameter ofILabelModel.GetContext
has been removed andILabelModel
doesn't extendILookup
anymore. Instead, the lookup returned byGetContext
should be used for all lookup calls. -
The
IPortLocationModelParameter
parameter ofIPortLocationModel.GetContext
has been removed andIPortLocationModel
doesn't extendILookup
anymore. Instead, the lookup returned byGetContext
should be used for all lookup calls. -
The
OrthogonalEdgeEditingContext.GetOrthogonalEdgeHelper
method has been replaced by theFallbackEdgeHelperProvider
andOrthogonalEdgeHelperProvider
properties. -
The
INodeInsetsProvider
interface was renamed toIGroupPaddingProvider
. -
The methods
SetLookupImplementation
andGetLookup
have been removed fromDefaultGraph
. Instead theLookup
method should be overridden if the default lookup behavior should be replaced. -
The methods
SetLookup
andGetLookup
have been removed fromGraphWrapperBase
. Instead, theLookup
method should be overridden if the default lookup behavior should be replaced.
GraphML
Incompatible API Changes
-
The methods
GraphMLIOHandler.AddInputMapperFuture
andGraphMLIOHandler.AddInputHandlerFactory
have been removed, together with their support classes. -
The
AddRegistryInputMapper
andAddRegistryOutputMapper
methods have been removed fromGraphMLIOHandler
, since theMapperRegistry
has been removed. To read or write additional per-item data, use theAddInputMapper
orAddOutputMapper
methods, instead.
View-Layout-Bridge
Incompatible API Changes
-
The properties
LayoutExecutor.SelectionModel
andLayoutGraphAdapter.SelectionModel
have been removed, meaning that selected items of theIGraph
are no longer automatically marked in theLayoutGraph
via keys like the formerLayoutKeys.AffectedNodesDpKey
. If the selected items should be marked for a specific key of layout algorithms, then these items can always be provided via the specificLayoutData
property of the layout algorithms. -
Removed the
ContextItemMapping
class. -
Renamed the
LayoutExtensions.MorphLayout
method toApplyLayoutAnimated
. -
Renamed the
LayoutExecutor.Duration
property toAnimationDuration
. -
Renamed the
LayoutExecutor.CreateMorphAnimation
method toCreateLayoutAnimation
. -
The
LayoutGraphAdapter.PortDummyNodeDpKey
constant has been renamed toPortHelperNodeDataKey
. -
Renamed
ItemMapping.Delegate
toMapperFunction
. -
Renamed
ItemCollection.Delegate
toPredicate
. -
Removed key
LayoutGraphAdapter.OriginalTagDpKey
. Use the Tag property of the layout items instead to get the original tag associated to the originalIGraph
items. -
Renamed the
LayoutExecutor.Duration
property toAnimationDuration
. -
Replaced
LayoutExecutor.LabelPreferredPlacementPolicy
withItemMapping
LayoutExecutor.LabelPlacementPolicies
. -
Renamed Enum
LabelPreferredPlacementPolicy
toLabelPlacementPolicy
. -
Removed value
FromDescriptor
.PreferredPlacementDescriptor
s are now automatically considered when specified throughLayoutData
s.-
Renamed value
FromModel
toPreferModel
. -
Renamed value
FromParameter
toPreferParameter
. -
Added value
KeepParameter
, which suppresses the write-back of label positions to the view graph.
-
Renamed value
-
Replaced
LayoutGraphAdapter.LabelPreferredPlacementPolicy
withItemMapping
LayoutGraphAdapter.LabelPlacementPolicies
. -
Changed property
PortAdjustmentPolicy
ofLayoutExecutor
class to anItemMapping
PortAdjustmentPolicies
which allows for different values for each port. The default isPortAdjustmentPolicy.Lengthen
. -
Changed property
PortAdjustmentPolicy
ofLayoutGraphAdapter
class to anItemMapping
PortAdjustmentPolicies
which allows for different values for each port. The default isPortAdjustmentPolicy.Lengthen
. -
LayoutExecutor.AutomaticEdgeGrouping
has been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
LayoutGraphAdapter.AutomaticEdgeGrouping
has been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
The
TableLayoutConfigurator.Prepare
andLayoutExecutor.PrepareTableLayout
methods now return aPartitionGridData
instance. -
Boolean
LayoutExecutor.FixPorts
property is replaced by anItemMapping
PortPlacementPolicies
, that allows to specify a policy for the handling of each individual port.
Incompatible Behavior Changes
-
The
LayoutGraphAdapter
class does no longer offer a method to create a layout graph several times but is now meant to create exactly one layout graph copy which can be accessed via theLayoutGraph
property and initialized with methodLayoutGraphAdapter.Initialize
. After initialization, changing properties of theLayoutGraphAdapter
has no effect anymore. - Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly.
Layout
Incompatible API Changes
-
Replaced usages of the
IComparer
interface withComparison
function delegates. -
Removed the
IDataProvider
interface and refactored the whole way data is registered with aLayoutGraph
instance. The replacement ofIDataProvider
is the genericIMapper
interface. It allows setting and getting data via an indexer.-
Removed the methods
Graph.AddDataProvider
andRemoveDataProvider
. Data is now registered and removed using the methods on the newLayoutGraphContext
class (e.g.AddItemData
,AddData
,Remove
). -
Removed the
Graph.DataProviderKeys
property.
-
Removed the methods
-
Removed the class
Maps
. -
The nested
Segment
class ofBorderLine
is now the unnestedBorderLineSegment
class, and some of its members have been changed:-
Renamed
Grow
toEnlarge
,AddOffset
toAddPositionOffset
,Min
toMinPosition
andMax
toMaxPosition
. -
Removed the
BorderLine.AdoptValues
method. -
Converted
BorderLine.FirstSegment
,BorderLine.LastSegment
,BorderLine.Segment.Prev
andBorderLine.Segment.Next
from methods to read-only properties, and renamedPrev
to Previous. -
Removed
BorderLine.Prev
andBorderLine.Next
. Use methodsBorderLineSegment.Previous
andBorderLineSegment.Next
instead.
-
Renamed
-
The
MultiStageLayout
class has been removed from the API. TheHierarchicalLayout
(formerlyHierarchicLayout
),OrganicLayout
,OrthogonalLayout
,TreeLayout
,RadialTreeLayout
(formerlyBalloonLayout
),SeriesParallelLayout
,RadialLayout
,CompactDiskLayout
, andRadialGroupLayout
(formerlyCactusGroupLayout
) classes now directly implementILayoutAlgorithm
. These classes offer a newLayoutStages
property that allows to access the mutable stack ofILayoutStage
instances associated with the respective algorithm. In addition, the offer different new properties to directly access frequently used stages. -
The read/write properties
MinimumSizeGroupBoundsCalculator.MinimumNodeSizeDpKey
andInsetsGroupBoundsCalculator.GroupNodeInsetsDpKey
have been removed. The bounds calculator classes now always use the values defined via the keysLayoutKeys.MinimumGroupNodeSizeDataKey
andLayoutKeys.GroupNodePaddingDataKey
. Using theIGraph
API, the insets and minimum sizes are registered automatically, so that this change has no effect. -
The read/write properties
SubgraphLayout.AffectedNodesDpKey
andSubgraphLayout.AffectedEdgesDpKey
have been removed. They were replaced by static read-only keysSubgraphLayoutStage.SubgraphNodesDataKey
andSubgraphLayoutStage.SubgraphEdgesDataKey
. -
PortConstraint
s andPortCandidate
s have been unified and renamed toLayoutPortCandidate
. -
PortDirections
andPortSide
have been unified asPortSides
, and the enum values of the sides have been renamed. -
PortCandidateSet
s have been replaced byNodePortCandidates
, and collections ofPortCandidate
s for edges have been replaced byEdgePortCandidates
. -
The port-related settings in the
LayoutData
classes have been combined into a sub-LayoutData
Ports. -
The keys in
PortConstraintKeys
have been moved toLayoutKeys
. -
The
SequentialLayout.Layouts
property is now a read-onlyList
. The<
ILayoutAlgorithm
>AppendLayout
,AppendLayouts
, andRemoveAll
methods have been removed as their functionality is now handled by the list methods. -
Replaced properties
XOffset
andYOffset
of thePortCandidate
class by a single propertyOffset
of typePointD
. -
Renamed
Graph.ReInsertNode
andReInsertEdge
toLayoutGraph.Reinsert
. -
From
LayoutGraphHider
, theFireGraphEvents
andGraph
properties, and theHideEdges
,HideSelfLoops
,SimplifyGraph
, andHideMultipleEdges
methods have been removed. Also, all methods to hide and unhide various collections of nodes or edges have been replaced byHide
andUnhide
methods that get anIEnumerable
ofNode
orEdge
. -
The classes
SelfLoopRouter
andParallelEdgeRouter
have been moved from theyWorks.Layout
namespace to theyWorks.Layout.Router
namespace. -
Removed the
NodeHalo
class. Halos are now specified asInsetsD
and called node margins. in the correspondingLayoutData
(e.g.HierarchicalLayoutData.NodeMargins
).-
The properties previously named
NodeHalos
have been renamed toNodeMargins
for the following classes:AlignmentStageData
,CircularLayoutData
,CompactDiskLayoutData
,ComponentLayoutData
,RadialGroupLayoutData
,RecursiveGroupLayoutData
,HierarchicalLayoutData
(formerlyHierarchicLayoutData
),GenericLabelingData
(formerlyLabelingData
),OrganicLayoutData
,OrthogonalLayoutData
,ClearAreaLayoutData
,FillAreaLayoutData
,PartialLayoutData
,RadialLayoutData
,CurveRoutingStageData
,TabularLayoutData
,EdgeRouterData
,RadialTreeLayoutData
(formerlyBalloonLayoutData
),TreeLayoutData
. -
Renamed
AsIsLayerer.NodeHalo
toFromSketchLayerAssigner.NodeMargin
. -
Renamed
TemporaryGroupDescriptor.Halo
to Margins. -
Renamed
NodeHalo.NodeHaloDpKey
toLayoutKeys.NodeMarginDataKey
.
-
The properties previously named
-
Renamed
LayoutExecutor.TargetBoundsInsets
toTargetBoundsPadding
. -
Renamed
GroupingKeys.GroupNodeInsetsDpKey
toGroupNodePaddingDataKey
and moved the key toLayoutKeys
. -
Renamed
GroupingKeys.MinimumNodeSizeDpKey
toLayoutKeys.MinimumGroupNodeSizeDataKey
. -
Renamed
InsetsGroupBoundsCalculator.DefaultInsets
toGroupBoundsCalculator.DefaultPadding
andInsetsGroupBoundsCalculator.ConsiderNodeHalos
toGroupBoundsCalculator.ConsiderNodeMargins
. -
Renamed
TemporaryGroupDescriptor.Insets
to Padding. -
The
FamilyTreeLayout
class has been removed. -
Removed the
LayoutGraphUtilities
class. The newEdge.ResetPath
method replacesLayoutGraphUtilities.ResetPath
method. The newParallelEdgeRouter.RouteEdgesParallel
method replacesLayoutGraphUtilities.RouteEdgesParallel
method. -
Methods
LayoutGraphUtilities.GetBoundingBox
were combined to one more general, moved toLayoutGraph
class and made an instance method. -
Renamed
AbortHandler
toLayoutAbortController
. -
The
MaximumDuration
property is renamed toStopDuration
in all public API usages. -
StopDurations
that were of type long are now of typeTimeSpan
. -
StopDurations
now affect pre-and post-processing steps defined directly on the layout algorithms, as opposed to only the core algorithm. -
The
LayoutAbortController
(formerlyAbortHandler
) is no longer available as a property onLayoutData
classes but only on theLayoutExecutor
. -
Static methods on
LayoutAbortController
(formerlyAbortHandler
) likeGetFromGraph
have been removed since the handler instance can easily be accessed via theLayoutGraphContext
when working withLayoutGraph
. -
The default values of properties
LayoutAbortController.StopDuration
andLayoutAbortController.CancelDuration
has been changed fromTimeSpan.Zero
toTimeSpan.MaxValue
. Previously,Zero
was interpreted as unlimited time, which is not the case anymore. -
The default value of the algorithm properties
RankAssignment.MaximumDuration
andNodeAggregation.MaximumDuration
(now calledStopDuration
) has been changed fromTimeSpan.Zero
toTimeSpan.MaxValue
. Zero is no longer interpreted as an unrestricted running time but is the shortest possible time. -
Renamed
BorderLine.CreateMin
toCreateMinimum
. -
Renamed
BorderLine.CreateMax
toCreateMaximum
. -
Removed the
YPointPath
class. Instead of this class an array or more generally anIEnumerable
of typePointD
[] is now used in API members.-
Changed value to of
HierarchicLayout.AlternativeEdgePathDpKey
,ClearAreaLayout.ExpandedNodeOriginalEdgePathDpKey
andGivenCoordinatesStage.EdgePathDpKey
toIEnumerable
.<
PointD
> -
Changed
BusDescriptor
propertiesBusPoints
andComputedBusPoints
to typePointD
[].
-
Changed value to of
-
Updated the constructor of
DpKeyBase
and subclasses to accept a single string parameter 'ID' for unique identification.-
Removed properties
DpKeyBase.DeclaringType
andDpKeyBase.Name
. -
Made
DpKeyBase
class abstract.
-
Removed properties
-
Renamed
GraphLayoutLineWrapper
toLineWrappingStage
. -
Renamed
HideGroupsStage
toGroupHidingStage
. -
Renamed
TemporaryGroupNodeInsertionStage
toTemporaryGroupInsertionStage
and the respective data class fromTemporaryGroupNodeInsertionData
toTemporaryGroupInsertionData
. -
Renamed
BorderLineSide
to Side, moved to namespace Layout and renamed its values:North
toSide.Top
,East
toSide.Right
,South
toSide.Bottom
, andWest
toSide.Left
. -
Moved
BorderLine
andBorderLineSegment
to namespace Layout. -
The methods
PortCalculator.CalculatePorts
andPortCalculator.EqualsEps
have been removed. -
The following methods have been removed from the
ReverseEdgesStage
:ReverseEdgesStage.FindReversedTreeEdges
,ReverseEdgesStage.ReverseEdge
andReverseEdgesStage.ReverseEdges
. -
The
HandleNaNCoordinatesStage
has been removed. -
LayoutMultiplexer
has been removed. The features ofComponentLayout
(ComponentLayoutDataKey
) orRecursiveGroupLayout
(GroupNodeLayoutDataKey
) can be used instead. -
Merged
MinimumSizeGroupBoundsCalculator
andInsetsGroupBoundsCalculator
into the newGroupBoundsCalculator
class. -
Renamed
MirrorModes
toMirroredOrientations
andOrientationLayout.MirrorMode
toMirroredOrientations
. -
The API names to define routing styles throughout the layout algorithms have been streamlined and made more
consistent. Properties on layout algorithms have all been renamed to
EdgeRoutingStyle
and those on edge-specific classes have been renamed toRoutingStyle
.-
The
Polyline.EdgeRoutingStyle
enum has been renamed toRouter.RoutingStyle
. -
The
Tree.EdgeRoutingStyle
enum has been renamed toSingleLayerSubtreePlacerRoutingStyle
. -
The
LayeredRoutingStyle
enum has been renamed toLevelAlignedSubtreePlacerRoutingStyle
. -
The
Radial.EdgeRoutingStrategy
enum has been renamed toRadial.RoutingStyle
. -
The
Partial.EdgeRoutingStrategy
enum has been renamed toPartial.RoutingStyle
. -
The
Hierarchic.EdgeRoutingStyle
enum has been renamed toHierarchical.RoutingStyle
while the oldRoutingStyle
class has been renamed toRoutingStyleDescriptor
.
-
The
-
Removed the
GraphTransformer
class; use factory methods fromLayoutTransformations
class instead to create stages that apply transformation operations on aLayoutGraph
. -
The
CopiedLayoutGraph
class was removed from the API. To create a copy of a layout graph, the new factoryLayoutGraph.CreateCopy
method may be used. -
LayoutGraphHider
: Method names have been standardized for consistency. Collection parameters and return values are now of typeIEnumerable
. Methods with non-nullable parameters will now throw an exception if passednull
values. -
Renamed
EdgeBundlingStage
toBundledEdgeRouter
. -
The classes
FixPortLocationStage
andFixPortLocationStageData
have been removed from the library. To correct the port locations after applying a layout use thePortPlacementStage
class. -
PortPlacementStage.PathCorrection
has been replaced byPortPlacementStage.RouteCorrectionPolicy
of enum typeRouteCorrectionPolicy
. -
The utility
PortConstraintConfigurator
class has been removed. -
The classes
ChannelEdgeRouter
,OrthogonalPatternEdgeRouter
andOrthogonalSegmentDistributionStage
have been removed from the library. Their functionality is superseded by theEdgeRouter
routing algorithm.-
To configure the
EdgeRouter
to generate a style that is similar to the removedChannelEdgeRouter
, set theStopDuration
property to zero and use the predefined penalty configurationEdgeRouterCosts.LowQuality
. It is however not compatible with advanced features like integrated edge label placement.
-
To configure the
-
Removed
NormalizeGraphElementOrderStage
. UseNodeComparison
andEdgeComparison
ofLayoutExecutor
instead. -
The
SnapOuterPortsToNodeBorderStage
class has been removed. -
The
CompositeLayoutStage
class has been removed. If a complex composition of layout stages is required, the newLayoutStageStack
class can be used instead. To get anILayoutAlgorithm
that is then applied likeCompositeLayoutStage
was before,LayoutStageStack.LinkCoreLayouts
method must be called. -
The
BufferedLayout
class has been removed. To apply a layout algorithm on a copy of aLayoutGraph
instance useLayoutGraph.CreateCopy
method to get a copy, then apply the layout on it and, finally, write back the result usingLayoutGraphCopyData.CommitLayoutToOriginalGraph
. -
The
AbortHandler.CheckFailed
property has been removed. To achieve the same functionality, theLayoutAbortController
(new name of theAbortHandler
) can be subclassed, overriding itsCheck
method which allows to detect calls to that method. -
The
OrientationLayout
class has been renamed toOrientationStage
.-
Furthermore, the following methods have been removed from that class:
IsOrientationMirrored
, Transform,PrepareTransform
,CompleteTransform
,CreateOrientedNodeHalo
,CreateOrientedInsets
andCreateOrientedNodeSize
.
-
Furthermore, the following methods have been removed from that class:
-
The port-related properties of the layout data classes (
SourcePortGroupIds
,TargetPortGroupIds
,SourcePortCandidates
,TargetPortCandidates
) have been moved to a sub-data accessible via the propertyPorts
. -
Removed public methods
HideGroupNodes
andUnhideGroupNodes
ofGroupHidingStage
. -
Removed
LayoutKeys.NodeIdDpKey
andLayoutKeys.EdgeIdDpKey
. -
The
GraphDpKey
class was replaced byValueDataKey
. -
The
TemporaryGroupDescriptor
used byTemporaryGroupInsertionStage
class to define temporary group nodes now does not allow that propertiesInsets
,MinimumSize
andMargins
(formerlyHalo
) arenull
anymore. Previously this was the default which is nowInsetsD.Empty
,SizeD.Empty
andInsetsD.Empty
, meaning that the behavior does not change. -
Removed
SplitEdgeStage
. -
Removed the classes
PartitionLayout
andPartitionLayoutData
. -
Renamed
BendConverter
toBendSubstitutionStage
. -
GraphPartitionManager
is removed,LayoutGraphHider
provides the same functionality. -
PortCalculator
,IIntersectionCalculator
, andIntersectionCalculatorKeys
have been removed. Instead, theLayoutExecutor.PortAdjustmentPolicy
property should be set to a suitable value. -
The
OrientationLayout.HorizontalOrientation
property has been removed. To check for a horizontal orientation, check if Orientation property equalsLayoutOrientation.LeftToRight
orLayoutOrientation.RightToLeft
. -
Renamed
GivenCoordinatesStage
toGivenCoordinatesLayout
. -
Renamed
GivenCoordinatesStageData
toGivenCoordinatesLayoutData
. -
Removed the look-up keys
GroupingKeys.GroupDpKey
,GroupingKeys.NodeIdDpKey
andGroupingKeys.ParentNodeIdDpKey
which were necessary to define grouping information forLayoutGraph
instances. This can now be achieved via the helperLayoutGraphGrouping
class or directly via instance methods such asLayoutGraph.SetIsGroupNode
. -
The public constructors of
ItemMapping
andItemCollection
have been removed. Instead the instances returned by theLayoutData
properties should be used to configure theLayoutData
. -
The optional
ItemMapping
parameter ofGenericLayoutData.AddItemMapping
has been removed. -
The optional
ItemCollection
parameter ofGenericLayoutData.AddItemCollection
has been removed. -
Renamed the
SubgraphLayout
class toSubgraphLayoutStage
and renamed the respective layout data class fromSubgraphLayoutData
toSubgraphLayoutStageData
. - Methods and and properties with "BoundingBox" in their name have been renamed to include "Bounds" instead.
Incompatible Behavior Changes
-
Method
LayoutGraph.ReverseEdge
now reverses the edge path too. To exchange only source and target of an edge useLayoutGraph.ChangeEdge
method.
Layout Data
Incompatible API Changes
-
The value type of properties
HierarchicalLayoutData.LayerIndicesResult
,HierarchicalLayoutData.SequenceIndicesResult
,HierarchicalLayoutData.GivenLayersIndices
,RadialLayoutData.LayerIds
andCircularLayoutData.CircleIdsResult
has been changed from number to a nullable number value. Null as value means that nothing was published for an item. -
The value type of the keys
HierarchicalLayout.LayerIndexResultDataKey
,HierarchicalLayout.SequenceIndexResultDataKey
,GivenLayersAssigner.LayerIndexDataKey
,RadialLayout.LayerIdDataKey
andCircularLayout.CircleIdResultDataKey
has been changed from number to a nullable number value. Null as value means that the nothing was published for an item. -
Properties of type
ItemMapping
inLayoutData
classes are now named using plural consistently. -
The type
SingleItem
was removed. Affected properties use<
TItem
>ItemCollection
instead.<
TItem
>
Hierarchical Layout
Incompatible API Changes
-
Renamed all types, methods, properties, and namespaces containing "hierarchic" to "hierarchical" including
HierarchicLayout
, which is renamed toHierarchicalLayout
. -
IPortConstraintOptimizer
has been renamed toIPortCandidateSelector
, and its methods have been renamed fromOptimizeAfterLayering
andOptimizeAfterSequencing
toSelectAfterLayering
andIPortCandidateSelector.SelectAfterSequencing
. -
PortConstraintOptimizerBase
has been removed. -
PortCandidateOptimizer
has been renamed toPortCandidateSelector
and its properties have been renamed:BackLoopPenalty
toBackLoopCost
,CrossingPenalty
toCrossingCost
, andOverUsagePenalty
toOverUsageCost
. -
Renamed the
DefaultDrawingDistanceCalculator.NodeToNodeDistance
property toDrawingDistanceCalculator.NodeDistance
. -
Renamed the
DefaultDrawingDistanceCalculator.EdgeToEdgeDistance
property toDrawingDistanceCalculator.EdgeDistance
. -
Renamed the
HierarchicLayout.NodeToNodeDistance
property toNodeDistance
. -
Renamed the
HierarchicLayout.EdgeToEdgeDistance
property toEdgeDistance
. -
Renamed "Layerer" to "LayerAssigner" in the following types and members;
-
Renamed
ILayerer
toILayerAssigner
. -
Moved
HierarchicLayout.FixedElementsLayerer
toHierarchicalLayoutCore
and renamed toFixedElementsLayerAssigner
. -
Moved
HierarchicLayout.FromScratchLayerer
toHierarchicalLayoutCore
and renamed toFromScratchLayerAssigner
. -
Renamed
WeightedLayerer
toWeightedLayerAssigner
. -
Renamed
ConstraintIncrementalLayerer
toConstraintIncrementalLayerAssigner
. -
Renamed
MultiComponentLayerer
toMultiComponentLayerAssigner
. -
Renamed
MultiComponentLayerer.SingleComponentLayerer
toSingleComponentLayerAssigner
. -
Renamed
AspectRatioComponentLayerer.SingleComponentLayerer
toSingleComponentLayerAssigner
. -
Renamed
TopologicalLayerer
toTopologicalLayerAssigner
. -
Renamed
AspectRatioComponentLayerer
toAspectRatioComponentLayerAssigner
. -
Renamed
BFSLayerer
toBfsLayerAssigner
. -
Renamed
GivenLayersLayerer
toGivenLayersAssigner
. -
Renamed
HierarchicLayoutCore.CreateIncrementalLayerer
toCreateIncrementalLayerAssigner
. -
Renamed
HierarchicLayoutData.BfsLayererCoreNodes
toBfsLayerAssignerCoreNodes
. -
Renamed
AsIsLayerer
toFromSketchLayerAssigner
.
-
Renamed
-
Renamed
GivenLayersLayerer.LayerIdDpKey
toLayerIndexDataKey
. -
Renamed
HierarchicLayoutData.GivenLayersLayererIds
toGivenLayersIndices
. -
Removed
HierarchicLayoutData.ConstraintIncrementalLayererAdditionalEdgeWeights
. -
Renamed
AsIsSequencer
toFromSketchSequencer
. -
Renamed
LayerType
toHierarchicalLayoutLayerType
. -
Renamed
DefaultLayerSequencer
toDefaultSequencer
. -
Methods
ConstraintIncrementalLayerer.CheckConstraints
,GivenLayersLayerer.Normalize
have been removed. -
The protected callback methods
GetLayerAlignment
andAssignNodesToSublayer
have been removed from theCoordinateAssigner
class (formerly calledSimplexNodePlacer
). Furthermore, itsGetMinDistance
method has been renamed toGetMinimumDistance
. -
The
IDrawingDistanceCalculator.GetMinDistance
method has been renamed toGetMinimumDistance
. -
HierarchicalLayout.GridSpacing
: made grid spacing behavior consistent across all layouts by throwing an exception for negative values. -
Renamed
Hierarchic.NodeDataType
toHierarchicalLayoutNodeType
and its valueNormal
toHierarchicalLayoutNodeType.Regular
. -
Renamed
Hierarchic.EdgeDataType
toHierarchicalLayoutEdgeType
and its valueNormal
toHierarchicalLayoutEdgeType.Regular
. -
Renamed
LayerType.Normal
toHierarchicalLayoutLayerType.Regular
. -
Renamed
MergingPolicy
toLayerMergingPolicy
. -
Renamed
RankingPolicy
toLayerRerankingPolicy
andTopologicalLayerer.RankingPolicy
toRerankingPolicy
. -
Renamed
WeightHeuristic
toSequencerWeightHeuristic
. -
Names containing
PortBorderGap
were renamed to now containBorderToPortGapRatio
. -
Renamed
EdgeLayoutDescriptor
toHierarchicalLayoutEdgeDescriptor
. -
Renamed
HierarchicLayout.EdgeLayoutDescriptor
toDefaultEdgeDescriptor
. -
Renamed and moved
HierarchicLayoutCore.EdgeLayoutDescriptorDpKey
toHierarchicalLayout.EdgeDescriptorDataKey
. -
Renamed
HierarchicLayoutData.EdgeLayoutDescriptors
toEdgeDescriptors
. -
Renamed
NodeLayoutDescriptor
toHierarchicalLayoutNodeDescriptor
. -
Renamed
HierarchicLayout.NodeLayoutDescriptor
toDefaultNodeDescriptor
. -
Renamed and moved
HierarchicLayoutCore.NodeLayoutDescriptorDpKey
toHierarchicalLayout.NodeDescriptorDataKey
. -
Renamed
HierarchicLayoutData.NodeLayoutDescriptors
toNodeDescriptors
. -
Replaced
INodeData
interface withHierarchicalLayoutNodeContext
class.-
Renamed
INodeData.GroupId
toHierarchicalLayoutNodeContext.EdgeGroupId
. -
Removed the
INodeData.ParentGroupNode
property.
-
Renamed
-
Replaced
IEdgeData
interface withHierarchicalLayoutEdgeContext
class.-
IEdgeData.Type
is read-only on the newHierarchicalLayoutEdgeContext
. -
The following
IEdgeData
properties now offer read and write access on the newHierarchicalLayoutEdgeContext
:SourceGroup
,TargetGroup
,SourcePortGroup
,TargetPortGroup
,SourcePortCandidates
,TargetPortCandidates
,Thickness
,CrossingCost
,CriticalEdgePriority
,SourcePortAlignment
,TargetPortAlignment
. -
Renamed
IEdgeData.SourcePortConstraint
andTargetPortConstraint
toSelectedSourcePortCandidate
andSelectedTargetPortCandidate
respectively. Bot properties now offer read and write access. -
Removed the
IEdgeData.Group
property.
-
-
Replaced
ILayer
interface withHierarchicalLayoutLayer
class. -
Renamed the
ILayer.List
property toHierarchicalLayoutLayer
class.Nodes
. -
Replaced
ILayers
interface with a list ofHierarchicalLayoutLayer
instances accessible viaHierarchicalLayoutContext.Layers
property.-
Methods
HierarchicalLayoutContext.InsertLayer
andRemoveLayer
are replacements for theILayers.Insert
andILayers.Remove
methods.
-
Methods
-
Replaced
IItemFactory
interface withItemFactory
class. Several of the factory methods have also been removed or renamed.-
CreateDummyEdge
has been renamed toCreateHelperEdge
. -
CreateProxyNode
has been renamed toCreateSideProxyNode
andDestroyProxyNode
toDestroySideProxyNode
. -
CreateSameLayerProxy
has been renamed toCreateSameLayerProxyEdge
andDestroySameLayerProxy
toDestroySameLayerProxyEdge
. -
SetTemporaryEdgeGroups
has been renamed toCreateGroupedEdgeContext
. -
SetTemporaryCriticalEdgePriority
has been removed. -
SetTemporaryCrossingCost
has been removed. -
SetTemporaryEdgeThickness
has been removed. -
SetTemporaryPortConstraint
has been removed.
-
-
EdgeDataType.RedirectedGroupEdge
has been removed. -
Separated
HierarchicLayout.IncrementalHintsDpKey
inIncrementalNodeHintsDataKey
andIncrementalEdgeHintsDataKey
. -
Separated enum
IncrementalHint
inIncrementalNodeHint
for nodes andIncrementalEdgeHint
for edges. -
Separated
HierarchicLayoutData.IncrementalHints
inHierarchicalLayoutData.IncrementalNodes
andHierarchicalLayoutData.IncrementalEdges
.IncrementalNodes
now only allows for specifying the nodes that should be inserted incrementally during the layering phase. Additional options for incremental node insertion can be specified usingGenericLayoutData
. -
Removed
GroupCompactionStrategy
. -
Renamed
SimplexNodePlacer.GroupCompactionStrategy
toGroupCompaction
and changed its type to boolean. -
The
DefaultDrawingDistanceCalculator.OptimizeSwimlaneDistances
property has been removed. The behavior does not change and is the same as the old default where the property was disabled. OverrideDrawingDistanceCalculator.GetMinimumDistance
method and assign zero to nodes that are in different rows/columns to get the same behavior as when previously enabling the property. -
Property
SimplexNodePlacer.SwimLaneCrossingWeight
has been renamed toLayoutGridCrossingWeight
. Note that the class has been renamed toCoordinateAssigner
. -
The
TypeBasedDrawingDistanceCalculator
class has been removed. -
The classes
ILayeredComponentsMerger
andDefaultLayeredComponentsMerger
have been removed. The functionality is integrated into theMultiComponentLayerer
, which now offers a newMergingPolicy
property and protected methodMerge
for the case that a custom merging approach is required. -
The
HierarchicLayout.OrthogonalRouting
property has been removed. To specify orthogonal or other routing styles, the routing style on theHierarchicalLayoutEdgeDescriptor
must be used instead. -
Renamed
IPortAllocator
toIHierarchicalLayoutPortAssigner
. -
Renamed
DefaultPortAllocator
toHierarchicalLayoutPortAssigner
. -
Properties
HierarchicLayout.RecursiveGroupLayering
andHierarchicLayout.CompactGroups
are combined intoHierarchicalLayout.GroupLayeringPolicy
. -
BusDescriptor
is renamed toGridComponentDescriptor
. -
HierarchicLayout.BusDescriptorDpKey
is renamed toGridComponentDescriptorDataKey
. -
HierarchicLayoutData.Buses
is renamed toGridComponents
. -
HierarchicLayoutData.BusRootOffsets
is renamed toGridComponentRootOffsets
. -
NodeDataType.BusStructureDummy
is renamed toGridComponentBusNode
. -
Renamed
SimplexNodePlacer.BarycenterMode
toSymmetryOptimizationStrategy
and changed its type toSymmetryOptimizationStrategy
. It now supports performing strong, weak and no additional symmetry optimization. -
Refactored the enum
HierarchicLayout.LayoutMode
property into a booleanFromSketchMode
property and removed theLayoutMode
enum. -
The
ICandidateMatcher
interface has been removed. For an advanced customization of the port selection consider implementing a customIPortCandidateSelector
. -
Moved
HierarchicLayout.StopAfterLayering
/Sequencing toHierarchicalLayoutCore
. -
The
ILayoutDataProvider
interface is removed and its functionality is moved toHierarchicalLayoutContext
. -
The
ILayers
interface is moved to theHierarchicalLayoutContext
, and methods that acceptedILayers
as a parameter instead acceptHierarchicalLayoutContext
now. -
The
IItemFactory
interface is moved to theHierarchicalLayoutContext
, and methods that acceptedIItemFactory
as a parameter instead acceptHierarchicalLayoutContext
now. -
The obsolete extension methods
CreateLayerConstraintFactory
andCreateSequenceConstraintFactory
have been removed fromHierarchicLayout
. To specify layer and sequence constraints, useLayoutData
instead. -
LayerConstraintData
no longer inherits fromLayoutData
. -
SequenceConstraintData
no longer inherits fromLayoutData
. -
NodeLayoutDescriptor.NodeLabelMode
was removed. If node labels shall be considered by the layout algorithm, they are now considered during all phases. In particular, self-loops do not overlap node labels anymore. -
The
NodeLabelMode
enum was removed. -
The
NodeLayoutDescriptor
class of theHierarchicLayout
algorithm, which was renamed toHierarchicalLayoutNodeDescriptor
, does no longer allow to specify the border-to-port gap ratios individually for each node side. TheBorderToPortGapRatio
property now defines the value for all four node sides. -
Property
HierarchicLayoutData.SelfLoopCalculatorData
was removed. Settings like minimum lengths for self-loop edges are specified via theHierarchicalLayoutEdgeDescriptor
class like for normal edges. -
The
SelfLoopCalculator
andSelfLoopCalculatorData
classes was removed from the API. -
In the sub-data
SequenceConstraintData
of theHierarchicalLayoutData
PlaceBefore
andPlaceAfter
were replaced byPlaceInOrder
. -
In the sub-data
LayerConstraintData
of theHierarchicalLayoutData
PlaceAbove
andPlaceBelow
were replaced byPlaceInOrder
. -
The
INodePlacer
interface of the hierarchic layout has been renamed toICoordinateAssigner
. Its implementation has been renamed fromSimplexNodePlacer
toCoordinateAssigner
. -
The
HierarchicLayout.SeparateLayers
property has been moved toCoordinateAssigner.SeparateLayers
, since it has always only worked when using that implementation. -
The
IEdgeReverser
interface and theHierarchicLayoutCore.CreateEdgeReverser
method have been removed. -
The
GroupTransposition
property has been removed fromDefaultLayerSequencer
class. The Transposition property should now be used for groups too. -
The
HierarchicLayoutCore
class is not a standalone layout algorithm anymore but now offers only access to more advanced features of theHierarchicLayout
class.-
All public data keys were moved to the
HierarchicLayout
class. - The protected API of both classes was reduced, but still even highly advanced customization are possible.
-
All public data keys were moved to the
-
The protected methods
DefaultPortAllocator.GetPortBorderGap
,DefaultPortAllocator.GetPortBorderGapRatio
, andDefaultPortAllocator.GetPortDistanceDelta
were removed. -
Removed members
HierarchicLayout.CreateLayerConstraintFactory
,HierarchicLayoutData.LayerConstraintFactory
,HierarchicLayout.CreateSequenceConstraintFactory
andHierarchicLayoutData.SequenceConstraintFactory
. The factories are no longer required to define layering and sequence constraints.-
The recommended way is to use properties
HierarchicLayoutData.LayerConstraints
andHierarchicLayoutData.SequenceConstraints
. -
For expert uses cases (e.g. algorithm customization), the low-level helper classes
LayoutGraphLayerConstraints
andLayoutGraphSequenceConstraints
were added.
-
The recommended way is to use properties
-
Removed the keys
HierarchicLayout.LayerConstraintsMementoDpKey
andHierarchicLayout.SequenceConstraintsMementoDpKey
. -
Class
TopLevelGroupToSwimlaneStage
has been removed from the library.
Incompatible Behavior Changes
-
The
HierarchicalLayout
now considers node labels by default. -
The
HierarchicalLayout
now places edge labels by default using an integrated labeling algorithm. -
Changed the default edge routing style of the
HierarchicalLayout
class from Polyline to Orthogonal.
Tree Layout
Incompatible API Changes
-
Renamed
TreeLayout.MultiParentAllowed
toAllowMultiParent
. -
Renamed
TreeReductionStage.MultiParentAllowed
toAllowMultiParent
. -
Renamed "NodePlacer" to "SubtreePlacer" in the following types and members:
-
Renamed the
DefaultNodePlacer
class toSingleLayerSubtreePlacer
. -
Renamed the
DelegatingNodePlacer
class toSingleSplitSubtreePlacer
. -
Renamed the
DoubleLineNodePlacer
class toDoubleLayerSubtreePlacer
. -
Renamed the
FreeNodePlacer
class toFixedSubtreePlacer
. -
Renamed the
GridNodePlacer
class toMultiLayerSubtreePlacer
. -
Renamed the
GroupedNodePlacer
class toMultiSplitSubtreePlacer
. The class now considers port grouping (useTreeLayoutData.Ports
) to define how child nodes are split. -
Renamed the
LayeredNodePlacer
class toLevelAlignedSubtreePlacer
. -
Renamed the
TreeLayout.DefaultNodePlacer
property toDefaultSubtreePlacer
. -
Renamed the
TreeLayoutData.DelegatingNodePlacerPrimaryNodes
property toSingleSplitSubtreePlacerPrimaryNodes
. -
Renamed the
TreeLayoutData.GridNodePlacerRowIndices
property toMultiLayerSubtreePlacerLayerIndices
.
-
Renamed the
-
Renamed
ConnectorDirection
toSubtreeConnectorDirection
, and the valuesNorth
toSubtreeConnectorDirection.Up
,East
toSubtreeConnectorDirection.Right
,South
toSubtreeConnectorDirection.Down
, andWest
toSubtreeConnectorDirection.Left
. -
Renamed the values of
ParentConnectorDirection
:North
toParentConnectorDirection.Up
,East
toParentConnectorDirection.Right
,South
toParentConnectorDirection.Down
, andWest
toParentConnectorDirection.Left
. -
Replaced
Tree.Matrix
with theSubtreeTransform
enum and renamed constants:-
Matrix.Default
toSubtreeTransform.None
. -
Matrix.MirHor
toSubtreeTransform.FlipY
. -
Matrix.MirVert
toSubtreeTransform.FlipX
. -
Matrix.Rot90
toSubtreeTransform.RotateLeft
. -
Matrix.Rot180
toSubtreeTransform.Rotate180
. -
Matrix.Rot270
toSubtreeTransform.RotateRight
. -
Matrix.MirVertRot90
toSubtreeTransform.RotateRightFlipY
. -
Matrix.MirHorRot90
toSubtreeTransform.RotateLeftFlipY
.
-
-
Renamed
TreeLayoutData.OutEdgeComparers
toTreeLayoutData.ChildOrder
and changed the types to Comparison function. -
Removed
TreeLayout.DefaultOutEdgeComparer
. UseTreeLayoutData.ChildOrder
instead. Also removedNodeOrderComparer
class. -
Removed the
SimpleNodePlacer
class; useDefaultSubtreePlacer
class instead. -
Replaced
DefaultNodePlacer.ChildPlacement
property with the newSingleLayerSubtreePlacer.Transformation
property. The formerChildPlacement.HorizontalDownward
value now maps toSubtreeTransform.None
,ChildPlacement.HorizontalUpward
toSubtreeTransform.FlipY
,ChildPlacement.VerticalToLeft
toSubtreeTransform.RotateRight
, andChildPlacement.VerticalToRight
toSubtreeTransform.RotateLeftFlipY
. -
Renamed
RootAlignment.CenterOverChildren
toSubtreeRootAlignment.CenterOfChildren
. -
Renamed
RootAlignment.Leading
toSubtreeRootAlignment.Left
,RootAlignment.Trailing
toSubtreeRootAlignment.Right
,RootAlignment.LeadingOffset
toSubtreeRootAlignment.Leading
, andRootAlignment.TrailingOffset
toSubtreeRootAlignment.Trailing
. -
The
TreeComponentLayout
class has been removed. -
Renamed
FillStyle
toAspectRatioChildAlignmentPolicy
andAspectRatioNodePlacer.FillStyle
toChildAlignmentPolicy
. -
The
AspectRatioTreeLayout
has been removed together withAspectRatioTreeLayoutData
,RootPlacement
, andSubtreeArrangement
. Use theTreeLayout
with theAspectRatioSubtreePlacer
instead. -
Replaced
TreeLayoutData.OutEdgeComparers
property with new, more powerfulChildOrder
property. -
The
TreeReductionStage.NonTreeEdgeLabelingAlgorithm
property has been renamed toNonTreeEdgeLabeling
. -
Remove methods
GetPortBorderGap
andGetPortDistanceDelta
from theDefaultPortAssignment
(renamed toTreeLayoutPortAssigner
) class. -
Removed the
NodePlacerBase
class. ImplementISubtreePlacer
interface instead. -
Removed the method
PlaceSubtree
(Node
,ParentConnectorDirection
) of former subclasses ofNodePlacerBase
class. OverridePlaceSubtree
method(IMapper
<Node,SubtreeShape
>,IMapper
<Node,SubtreeShape
>,LayoutGraph
, Node) instead. -
Removed the
DetermineChildConnector
method of former subclasses ofNodePlacerBase
class. OverrideDetermineChildConnectors
method instead. -
Removed the methods
GetNodeShape
andGetSubtreeShape
from former subclasses ofNodePlacerBase
class. - Renamed all types, methods and properties containing "NodePlacer" to "SubtreePlacer".
-
The
DefaultPortAssignment.BorderGapToPortGapRatio
property was renamed toBorderToPortGapRatio
. -
Tree.PortAssignmentMode
valuePortConstraint
has been removed. Port candidates are always considered if they are specified. -
Tree.PortAssignmentMode
valuesDistributedEast
,DistributedWest
,DistributedNorth
,DistributedSouth
have been replaced by valueDistributed
. The side can be specified by usingTreeLayoutData.Ports
. -
Tree.PortAssignmentMode.None
has been renamedTree.PortAssignmentMode.Center
. -
TreeLayout.GetPortAssignment
can no longer be overridden. To specifyIPortAssignment
strategies per node,TreeLayoutData.PortAssigners
can be used. -
TreeLayout.GetNodePlacer
can no longer be overridden. To specifyNodePlacer
strategies per node,TreeLayoutData.SubtreePlacers
can be used. -
The following methods of
TreeLayout
have been removed:-
ReverseEdges
. -
GetRootsArray
. -
GetOutEdgeComparer
-TreeLayoutData.ChildOrder
can be used instead. -
CreateNodeShape
-ModifyNodeShape
can be used instead to modify the shape. -
DirectTree
-TreeLayoutData.TreeRoot
can be used to accomplish the same result.
-
-
DefaultNodePlacer.CalculateParentConnector
has been removed. Custom implementations can be inlined at the end ofPlaceSubtree
. -
SubtreeShape.AddBoundsToShape
accepts a singleRectD
parameter instead of its deconstructed values. -
SubtreeShape.AssignValuesTo
has been removed -CreateCopy
can be used instead. -
The API of the node placer implementations has been simplified and improved. The
INodePlacer
interface was renamed toISubtreePlacer
. - The class hierarchy of the various node placer implementations has been simplified. The rotatable base class implementation has been removed from the hierarchy.
-
Renamed
IPortAssignment
toITreeLayoutPortAssigner
. -
Renamed
DefaultPortAssignment
toTreeLayoutPortAssigner
. -
Renamed
TreeLayout.PortAssignmentDpKey
toPortAssignerDataKey
. -
Renamed
TreeLayoutData.PortAssignments
toPortAssigners
. -
Renamed the property
RoutingStyle.Polyline
toSingleLayerSubtreePlacerRoutingStyle.StraightLineToChildConnector
,RoutingStyle.Fork
property toSingleLayerSubtreePlacerRoutingStyle.Orthogonal
, andRoutingStyle.ForkAtRoot
property toSingleLayerSubtreePlacerRoutingStyle.OrthogonalAtRoot
. -
Added
SingleLayerSubtreePlacerRoutingStyle.Polyline
property which leads to a polyline routing style. -
The
ClassicTreeLayout
has been removed together with the enumsLeafPlacement
,EdgeRoutingStyle
, andPortStyle
. TheTreeLayout
can be used instead. -
The properties
TreeLayout.SourcePortConstraintDataAcceptor
andTreeLayout.TargetPortConstraintDataAcceptor
have been removed. -
The properties
TreeLayout.SourceGroupDataAcceptor
andTreeLayout.TargetGroupDataAcceptor
have been removed. -
Removed the
TreeLayout.DefaultLeafPlacer
property as well asLeafNodePlacer
class. -
DelegatingNodePlacer
now implementsISubtreePlacer
instead ofIFromSketchNodePlacer
. -
BusNodePlacer
now implementsISubtreePlacer
instead ofIFromSketchNodePlacer
. -
Renamed
IProcessor
toISubtreePlacerProcessor
. -
All layouts suitable for trees, such as
TreeLayout
,RadialTreeLayout
, now default to using theTreeReductionStage
to temporarily remove non-tree edges from the graph during layout calculation. -
The
GridNodePlacer.AutomaticRowAssignment
property (now renamed toMultiLayerSubtreePlacer
) was removed. The layers are now always automatically assigned if no layer indices are defined viaTreeLayoutData.MultiLayerSubtreePlacerLayerIndices
. -
The
TreeLayout.graph
field has been removed. For customizations in theTreeLayout
the graph is available whatsoever and can if required be queried from the node/edge items.-
Method
TreeLayout.LayoutRoot
now has an additional parameter of typeLayoutGraph
as its first argument.
-
Method
-
Removed the
LayeredNodePlacer.Id
property (class was also renamed toLevelAlignedSubtreePlacer
). The ID can still be provided via the constructor. Reading it later should never be necessary. -
The factory
TreeReductionStage.CreateStraightLineRouter
method has been removed. The standalone routerStraightLineEdgeRouter
class should be used instead when straight-line edges are required.
Incompatible Behavior Changes
- Port candidates are always considered if they are specified.
-
The
TreeLayout
now considers node labels by default. -
The
TreeLayout
now places edge labels by default using an integrated labeling algorithm.
Orthogonal Layout
Incompatible API Changes
-
The
LayoutStyle
enum (belonging to theOrthogonalLayout
) has been renamed toOrthogonalLayoutMode
. Furthermore, the new values are Strict (former Default),ForcedStraightLine
(former Box) , and Relaxed (formerFixedMixed
). The former values Uniform,FixedBox
, and Mixed have been removed from the enum. -
The
OrthogonalLayout
properties related to substructures have all been renamed to contain "substructure" in their name.ChainStyle
,ChainSize
,TreeStyle
,TreeSize
,TreeOrientation
,CycleStyle
,CycleSize
are now calledChainSubstructureStyle
,ChainSubstructureSize
,TreeSubstructureStyle
,TreeSubstructureSize
,TreeSubstructureOrientation
,CycleSubstructureStyle
,CycleSubstructureSize
. -
The following properties have been removed from the
OrthogonalLayout
class: Randomization,CrossingReduction
,EdgeLengthReduction
,OptimizePerceivedBends
andFaceMaximization
. Use the newQualityTimeRatio
property instead. -
Removed the
CompactOrthogonalLayout
class. -
The
DirectedEdges
properties ofOrthogonalLayoutData
andPartialLayoutData
are now both of typeItemMapping
with the nameEdgeOrientation
and support floating-point values to also specify edges oriented against the main layout direction. -
EdgeDirectednessDpKey
on all supportingILayoutAlgorithm
s have been combined into a global data keyLayoutKeys.EdgeDirectednessDataKey
. -
PartialLayout.DirectedEdgesDpKey
is renamed toEdgeOrientationDataKey
and now also allows specifying edges should be routed against the main layout orientation. -
Renamed
EdgeLayoutDescriptor
toOrthogonalLayoutEdgeDescriptor
. -
Renamed
OrthogonalLayout.EdgeLayoutDescriptor
toDefaultEdgeDescriptor
. -
Renamed
OrthogonalLayout.EdgeLayoutDescriptorDpKey
toEdgeDescriptorDataKey
. -
Renamed
OrthogonalLayoutData.EdgeLayoutDescriptors
toEdgeDescriptors
.
Incompatible Behavior Changes
-
The
OrthogonalLayout
now considers node labels by default. -
The
OrthogonalLayout
now places edge labels by default using an integrated labeling algorithm.
Edge Router
Incompatible API Changes
-
The
MonotonicPathRestriction
enum is now a flags enum and is calledMonotonicPathRestrictions
. -
The
SelfLoopRouter.SmartSelfLoopPlacement
property has been removed. It was enabled by default and the algorithm now always behaves like when it was enabled previously. To get all self-loops on the same node corner independently of other edges, theSelfLoopRouter
can be applied in a separate post-processing step where only self-loops are present in the graph (useSubgraphLayoutStage
). -
Method
ParallelEdgeRouter.LayoutParallelEdges
was renamed toRouteEdges
. -
Renamed
ParallelEdgeRouter.RoutedParallelEdgesDpKey
toRoutedMultiEdgesResultDataKey
. -
Renamed
ParallelEdgeRouter.FindAndHideParallelEdges
toFindAndHideMultiEdges
. -
Renamed
ParallelEdgeRouterData.RoutedParallelEdges
toRoutedMultiEdgesResult
. -
The
ParallelEdgeRouter.AbsJoinEndDistance
property has been renamed toAbsoluteJoinEndDistance
. -
The
ParallelEdgeRouter.RelJoinEndDistance
property has been renamed toRelativeJoinEndDistanceFactor
, and its default value now is 0. -
The
ParallelEdgeRouter.LineDistance
property has been renamed toEdgeDistance
. -
The
SelfLoopRouter.LineDistance
property has been renamed toEdgeDistance
. -
The
SelfLoopRouter.LayoutSelfLoops
method has been removed. To route the self-loop edges, theSelfLoopRouter
class should be applied to the graph. -
The
SelfLoopRouter.LayoutStyle
property has been renamed toRoutingStyle
. The respective enum type has been renamed toSelfLoopRoutingStyle
. -
The
OrganicEdgeRouter.CreateNodeEnlargementStage
method has been removed and is now replaced by the newAllowMovingNodes
property. -
The
OrganicEdgeRouter.EdgeNodeOverlapAllowed
property has been renamed toOrganicEdgeRouter.AllowEdgeNodeOverlaps
. -
The
BusRouter
class and all API members related to it have been removed. For bus-style edge routing, useEdgeRouter
instead. -
Renamed the
CurveEdgeLayoutDescriptor.MinimumEdgeToEdgeDistance
property toMinimumEdgeDistance
. -
Renamed the
EdgeLayoutDescriptor.MinimumEdgeToEdgeDistance
property (EdgeRouter
) toMinimumEdgeDistance
. -
Renamed the
PenaltySettings.MinimumEdgeToEdgeDistancePenalty
property toEdgeRouterCosts.MinimumEdgeDistanceCost
. -
Renamed
Interval.Min
toInterval.Minimum
. -
Renamed
Interval.Max
toInterval.Maximum
. -
Renamed
OrthogonalInterval.Min
toOrthogonalInterval.Minimum
. -
Renamed
OrthogonalInterval.Max
toOrthogonalInterval.Maximum
. -
Replaced
EdgeRouter.EdgeComparer
property of typeIComparer
withEdgeRouterData.EdgeProcessingComparison
of type Comparison function. -
The
EdgeRouter.IgnoreInnerNodeLabels
property has been removed from the API. Consideration is controlled viaEdgeRouter.NodeLabelPlacement
. Inner labels of non-group are only ignored when choosing valueEdgeRouterNodeLabelPlacement.Ignore
; labels of group nodes alone can be ignored when choosingEdgeRouterNodeLabelPlacement.IgnoreGroupLabels
. -
The protected
EdgeRouter.CreateDefaultEdgeOrderComparer
method has been removed. UseEdgeRouterData.EdgeProcessingComparison
instead. -
Refactored the API for customizing the
EdgeRouter
class.-
The classes/interfaces
PathSearch
,PathSearchResult
,CellSegmentInfo
,EdgeInfo
, Channel,ChannelBasedPathRouting
,SegmentInfo
,SegmentInfoBase
,SegmentGroup
,Router.Polyline.Alignment
,DynamicObstacleDecomposition
,IObstaclePartition
,IPartition
,GraphPartition
,GraphPartitionExtensionAdapter
,IDecompositionListener
,IDynamicDecomposition
,IEnterIntervalCalculator
andIGraphPartitionExtension
have been removed. -
The
PartitionCell.CreateBorderInterval
method has been removed alongside with thePartitionCellBorder
enum. -
The properties
EdgeCellInfo.EnterSegmentGroup
,EdgeCellInfo.ExitSegmentGroup
andEdgeCellInfo.CellSegmentInfos
have been removed. -
The properties
EdgeRouter.RegisteredPartitionExtensions
,RegisteredPathSearchExtensions
and Partition have been removed, as well as methodsCreateObstacleDecomposition
,CreatePathSearch
,CreatePathSearchContext
,ConfigurePathSearch
,CreatePathRouting
,CreateConfiguration
,ConfigureGraphPartition
andCleanUpGraphPartition
. -
The properties
PathSearchContext.PathSearch
andPathSearchContext.PathSearchResult
have been removed. -
Added new methods
EdgeRouter.AddPathSearchExtension
andEdgeRouter.AddPartitionExtension
. -
Added
PartitionExtension
class as replacement forIGraphPartitionExtension
. -
Added new
IRouterPartition
interface as replacement ofIObstaclePartition
andIPartition
. -
The Partition property has been added to
PathSearchConfiguration
class. -
The
Path.Length
property has been renamed toPathSearchResult.CellEntranceCount
.
-
The classes/interfaces
-
Renamed
Obstacle
toRoutingObstacle
. -
Renamed
Path
toPathSearchResult
. -
Renamed
PathRequest
toPathSearchRequest
. -
Renamed
EdgeLayoutDescriptor
toEdgeRouterEdgeDescriptor
. -
Renamed
CurveEdgeLayoutDescriptor
toCurveRoutingEdgeDescriptor
. -
Renamed
EdgeRouter.EdgeLayoutDescriptorDpKey
toEdgeDescriptorDataKey
. -
Renamed
EdgeRouter.DefaultEdgeLayoutDescriptor
toDefaultEdgeDescriptor
. -
Renamed
EdgeRouter.GetEdgeLayoutDescriptor
toGetEdgeDescriptor
. -
Renamed
EdgeRouterData.EdgeLayoutDescriptors
toEdgeDescriptors
. -
Renamed
PathSearchContext.CurrentEdgeLayoutDescriptor
toCurrentEdgeDescriptor
. -
Renamed
CurveRoutingStage.DefaultEdgeLayoutDescriptor
toDefaultEdgeDescriptor
. -
Renamed
CurveRoutingStage.CurveEdgeLayoutDescriptorDpKey
toEdgeDescriptorDataKey
. -
Renamed
CurveRoutingStageData.EdgeLayoutDescriptors
toEdgeDescriptors
. -
EdgeRouter.Grid
has been replaced byEdgeRouter.GridSpacing
. -
The class
Polyline.Grid
has been removed. -
The
EdgeRouter
and all its related classes have been moved from namespaceyWorks.Layout.Router.Polyline
toyWorks.Layout.Router
. -
Class
PenaltySettings
andEdgeLayoutDescriptor.PenaltySettings
property where renamed toEdgeRouterCosts
andEdgeRouterEdgeDescriptor.EdgeRouterCosts
. -
The already obsolete properties
EdgeRouter.PolylineRouting
,EdgeRouter.PreferredPolylineSegmentLength
andEdgeRouter.MaximumPolylineSegmentRatio
have been removed. They are replaced by respective properties on theEdgeRouterEdgeDescriptor
class. -
The
PolylineLayoutStage
class has been renamed toOctilinearRoutingStage
. ItsPreferredPolylineSegmentLength
property has been renamed toPreferredOctilinearSegmentLength
. -
The type of
IntermediateRoutingPoints
property has been changed fromIList
toIEnumerable
.
Incompatible Behavior Changes
-
The default of
ParallelEdgeRouter.RelativeJoinEndDistanceFactor
has changed from 0.1 to 0. -
The
EdgeRouter
now considers node labels by default. -
The
EdgeRouter
now places edge labels by default using a generic labeling algorithm.
Labeling
Incompatible API Changes
-
The
PreferredPlacementDescriptor
class has been renamed toEdgeLabelPreferredPlacement
.-
The
IEdgeLabelLayout.PreferredPlacementDescriptor
property has been removed. Instead, the preferred placement can be specified usingEdgeLabelPreferredPlacement.EdgeLabelPreferredPlacementDataKey
.
-
The
-
Removed the interfaces
INodeLabelLayout
andIEdgeLabelLayout
. Labels of theLayoutGraph
are instead represented by typesNodeLabel
andEdgeLabel
. -
Removed
LayoutGraph.GetLabelLayout
. Labels can instead be retrieved usingNode.Labels
andEdge.Labels
. -
Removed the
ILabelLayoutFactory
class. Labels can instead be created and removed usingLayoutGraph.AddLabel
andLayoutGraph.Remove
. -
Removed the interfaces
INodeLabelLayoutModel
,IEdgeLabelLayoutModel
and all implementations. To specify valid positions forGenericLabeling
, the typesNodeLabelCandidates
andEdgeLabelCandidates
offer methods for creating positions that correspond to the old model implementations. Candidates can be specified usingGenericLabelingData.NodeLabelCandidates
andGenericLabelingData.EdgeLabelCandidates
. -
Summarized layout algorithm properties such as
ConsiderNodeLabels
,ConsiderEdgeLabels
,IntegratedNodeLabeling
,IntegratedEdgeLabeling
, andNodeLabelingPolicy
as two propertiesNodeLabelPlacement
andEdgeLabelPlacement
. -
Removed
LabelLayoutTranslator
,LabelLayoutData
,LabelLayoutKeys
and related classes. The behavior ofLabelLayoutData
can be recreated usingNodeLabel.AbsolutePlacement
andEdgeLabel.AbsolutePlacement
. -
Removed properties
RemoveNodeOverlaps
,RemoveEdgeOverlaps
andEdgeGroupOverlapAllowed
fromGenericLabeling
. -
Introduced
GenericLabeling.QualityTimeRatio
property providing the possibility of balancing runtime and quality. -
Added intersection information to
LabelCandidate
class, which provides means to compute profits and to mimic the behavior of the removed properties. -
Removed
MISLabelingBase.OptimizationStrategy
. UseGenericLabeling.DefaultNodeLabelingCosts
andGenericLabeling.DefaultEdgeLabelingCosts
instead. Additionally individual costs can now be set for each label, usingGenericLabelingData.NodeLabelingCosts
andGenericLabelingData.EdgeLabelingCosts
. -
Removed
LabelingBase.AutoFlipping
. Automatically flipping labels right-side up is handled by the view, e.g.SmartEdgeLabelModel.AutoRotation
. -
Removed the
IProfitModel
interface and propertiesLabelingBase.ProfitModel
andMISLabelingBase.CustomProfitModelRatio
. Custom weights for a label candidate can be set at creation of the candidate withNodeLabelCandidates
andEdgeLabelCandidates
, or through a callback for each label usingGenericLabelingData.NodeLabelCandidateProcessors
andGenericLabelingData.EdgeLabelCandidateProcessors
. -
Removed the classes
MISLabelingBase
andLabelingBase
. -
Removed the following protected methods from
GenericLabeling
:CreateEdges
,AssignProfit
,FoundLabelOverlap
,FoundNodeOverlap
,FoundEdgeOverlap
,FoundHaloOverlap
,FoundPartitionGridLineOverlap
,FoundPartitionGridInsetOverlap
,FoundPartitionGridInteriorOverlap
. -
Made enums
LabelAngleOnRightSideRotations
andLabelAngleReferences
non-flags enums. -
Removed the
LabelAngleOnRightSideOffsets
enum. -
Changed the
PreferredPlacementDescriptor.AngleOffsetOnRightSide
enum property to theAddHalfRotationOnRightSide
bool property. -
MISLabelingBase.ReduceAmbiguity
is removed. Ambiguous label placements can instead be penalized usingLabelingCosts.AmbiguousPlacementCost
. -
Removed the
GraphModelManager.LabelLayerPolicy
property. Use the more specific propertiesNodeLabelLayerPolicy
,EdgeLabelLayerPolicy
andPortLabelLayerPolicy
instead. -
The
SandwichLabelModel
has been removed. It can be emulated using aCompositeLabelModel
with the top and bottom position of anExteriorNodeLabelModel
. -
Renamed
LabelSideReferences.AbsoluteWithLeftInNorth
toAbsoluteWithLeftAbove
. -
Renamed
LabelSideReferences.AbsoluteWithRightInNorth
toAbsoluteWithRightAbove
. -
ILabelCandidateDescriptor
and related interfaces have been removed. -
LayoutGraphAdapter
: removedGetLabelCandidateDescriptorProvider
andGetLabelCandidateDescriptor
. -
Renamed
SliderMode
toEdgeLabelSliderMode
. -
Values of
DiscreteNodeLabelPositions
have been renamed:-
DiscreteNodeLabelPositions.Top
,DiscreteNodeLabelPositions.TopLeft
, ... have been renamed toTopInside
,TopLeftInside
, ... -
DiscreteNodeLabelPositions.North
,DiscreteNodeLabelPositions.NorthWest
, ... have been renamed toDiscreteNodeLabelPositions.Top
,DiscreteNodeLabelPositions.TopLeft
, ...
-
-
Values of
DiscreteNodeLabelPositions
enum have been renamed.-
InternalMask
toInside
. -
EightPosMask
toDiscreteNodeLabelPositions.Outside
. -
SidesMask
toSides
. -
CornerMask
toCorners
. -
Removed value
SandwichMask
.
-
-
Removed
DescriptorWrapperLabelModel
. -
The configuration
LabelingData
class for theGenericLabeling
algorithm has been renamed toGenericLabelingData
to be more in line with otherLayoutData
implementations.
Organic Layout
Incompatible API Changes
-
TreeSubstructureStyle.Balloon
has been renamed toRadialTree
. -
Renamed
OrganicLayout.ClusterAsGroupSubstructureAllowed
toAllowClusterAsGroupSubstructure
. -
Renamed
OrganicLayout.NodeEdgeOverlapAvoided
toAvoidNodeEdgeOverlap
. -
Renamed
OrganicLayout.NodeOverlapsAllowed
toAllowNodeOverlaps
. -
The classes
OrganicRemoveOverlapsStage
andShuffleLayout
have been removed from the library. To solve the task of overlap removal, theRemoveOverlapsStage
class is still available and the style previously generated byOrganicRemoveOverlapsStage
can be triggered via the policyOverlapRemovalPolicy.PreserveRelativeLocations
. -
The
OrganicPartitionGridLayoutStage
class has been removed. -
The
RecursiveShuffleLayout
class has been removed from the API. -
Renamed
GroupNodeMode.Normal
toGroupNodeHandlingPolicy.Free
. -
Renamed
OrganicLayoutData.SourceGroupIds
toSubstructureSourceGroupIds
.OrganicLayout
now usesOrganicLayout.SubstructureSourceGroupIdDataKey
instead ofLayoutKeys.SourceEdgeGroupIdDataKey
. -
Renamed
OrganicLayoutData.TargetGroupIds
toSubstructureTargetGroupIds
.OrganicLayout
now usesOrganicLayout.SubstructureTargetGroupIdDataKey
instead ofLayoutKeys.TargetEdgeGroupIdDataKey
. -
Renamed the
OrganicLayout.GroupNodeModeDpKey
property toGroupNodeHandlingPolicyDataKey
. -
The
OrganicLayout
now configures theComponentLayout
by default, andSmartComponentLayout
was removed. -
OrganicLayout.ConfigureComponentLayout
andDisposeComponentLayout
were removed. To configure theComponentLayout
, replace the instance of theComponentLayout
in theLayoutStageStack
with a suitably configured instance. -
Removed
ConstraintFactory
andOrganicLayout.CreateConstraintFactory
. UseOrganicLayoutData.Constraints
instead. -
OrganicConstraintData.AddFloatingBoundingBox
now acceptsSizeD
its deconstructed values. -
OrganicConstraintData.AddFloatingBoundingBox
now acceptsRectD
its deconstructed values. -
OrganicLayout.ConsiderNodeSizes
was removed. TheOrganicLayout
now always considers node sizes. -
OrganicConstraintData
no longer inherits fromLayoutData
. -
The
OutputRestriction
class and the associated properties have been renamed toShapeConstraint
. -
Removed the
ClusterNodes
property fromOrganicLayout
. It is replaced byClusteringPolicy
property. To disable the clustering, specifyClusteringPolicy.None
. To enable it choose one of the available other policies. -
Removed the
ClusteringQuality
property fromOrganicLayout
. UseQualityTimeRatio
instead. -
The
OrganicLayout
class no longer offers valueClusteringPolicy.UserDefined
. Now, cluster IDs provided by users viaOrganicLayoutData.ClusterIds
property or data keyOrganicLayout.ClusterIdDataKey
are always considered first. If none are defined, the specifiedOrganicLayout.ClusteringPolicy
is considered. -
The
ClassicOrganicLayout
class has been removed. It is superseded by the more powerfulOrganicLayout
algorithm that should be used instead.
Incompatible Behavior Changes
-
The
OrganicLayout
now considers node labels by default. -
The
OrganicLayout
now places edge labels by default using a generic labeling algorithm. -
The default style of the
OrganicLayout
'sComponentLayout
is changed toPackedCircle
. -
The
OrganicLayout
now always considers node sizes.
Interactive Organic Layout
Incompatible API Changes
-
The
InteractiveOrganicLayoutData
class has been added. It handles the initial settings per node and edge. -
The classes
InteractiveOrganicNodeHandle
andInteractiveOrganicEdgeHandle
have been added. They handle the settings per node and edge while the algorithm runs. -
The properties, getters, and setters on
InteractiveOrganicLayout
that concern settings for individual items have been moved toInteractiveOrganicLayoutData
or the handles as appropriate. -
The
InteractiveOrganicLayout.AddStructureUpdate
method has been removed. -
The methods
InteractiveOrganicLayout.CommitPositions
andCommitPositionsSmoothly
have been combined as theInteractiveOrganicLayoutData.UpdateNodeCenters
method. -
The
InteractiveOrganicLayout.OutputRestriction
property has been renamed toShapeConstraint
. -
The
InteractiveOrganicLayout.PreferredEdgeLength
property has been renamed toDefaultPreferredEdgeLength
. -
The
InteractiveOrganicLayout.SyncStructure
method has been removed.
Circular Layout
Incompatible API Changes
-
Renamed the
ExteriorEdgeLayoutDescriptor.EdgeToEdgeDistance
property toCircularLayoutExteriorEdgeDescriptor.EdgeDistance
. -
The type of the
CircularLayout.MaximumDeviationAngle
property has been changed to double. -
Renamed
CircularLayout.LayoutStyle
toCircularLayout.PartitioningPolicy
. -
Renamed
Circular.LayoutStyle
toCircular.PartitioningPolicy
. -
Removed the enum value
LayoutStyle.CustomGroups
. If custom partitions are specified usingCircularLayoutData.Partitions
, they are respected by theCircularLayout
automatically. -
The
INodeSequencer
class has been removed from the API. Use the newCircularLayoutData.NodeComparison
property to specify custom node orders. -
The
CircularLayout.LayoutStyle
property has been renamed toPartitioningPolicy
to better reflect the fact that it controls how nodes are partitioned. The corresponding enum has also been renamed from toPartitioningPolicy
. -
Renamed
EdgeLayoutDescriptor
toCircularLayoutEdgeDescriptor
. -
Renamed
CircularLayout.DefaultEdgeLayoutDescriptor
toEdgeDescriptor
. -
Renamed
ExteriorEdgeLayoutDescriptor
toCircularLayoutExteriorEdgeDescriptor
. -
Renamed
CircularLayout.ExteriorEdgeLayoutDescriptor
toExteriorEdgeDescriptor
. -
The
SingleCycleLayout
has been removed. TheCircularLayout
withPartitioningPolicy
set toSingleCycle
can be used instead. -
CircularLayout.SingleCycleLayout
has been replaced byCircularLayout.PartitionDescriptor
. -
CircularLayout.DefaultEdgeLayoutDescriptor
has been renamed toEdgeDescriptor
. -
CircularLayout.BalloonLayout
has been renamed toBackboneLayout
. -
Removed the enum value
EdgeRoutingPolicy.MarkedExterior
. To manually select which edges should be routed externally, use theCircularLayoutData.ExteriorEdges
property instead.
Incompatible Behavior Changes
-
The
CircularLayout
now considers node labels by default. -
The
CircularLayout
now places edge labels by default using a generic labeling algorithm. -
The default style of the
CircularLayout
'sComponentLayout
is changed toPackedCircle
. -
PartitionDescriptor.InitialAngle
is measured in degrees rather than radians.
Radial Layout
Incompatible API Changes
-
Radial.NodeInfo
is renamed toRadialLayoutNodePlacementResult
. -
The read/write
CenterNodesDpKey
property from theRadialLayout
class has been removed. It was replaced by the static read-only keyRadialLayout.CenterNodesDataKey
that must now be used instead to mark the custom center nodes. -
Renamed the
RadialLayout.MinimumNodeToNodeDistance
property toMinimumNodeDistance
. -
Renamed the
RadialLayout.MinimumEdgeToEdgeDistance
property toMinimumEdgeDistance
. -
Renamed
Radial.LayeringStrategy
toRadialLayeringStrategy
. -
Replaced
ItemMapping
OutEdgeComparers
withChildOrderData
ChildOrder
. -
Replaced properties
RadialLayoutData.NodeComparables
andRadialLayoutData.OutEdgeComparers
with new, more powerfulChildOrder
property. -
Removed the enum value
Radial.LayeringStrategy.UserDefined
. Custom layers are now always used if defined viaRadialLayoutData.LayerIds
property. -
Radial.NodeInfo
has been renamed toRadialLayoutNodePlacementResult
. -
Removed the enum value
CenterNodesPolicy.Custom
. Custom center nodes are now always used if defined viaRadialLayoutData.CenterNodes
property.
Incompatible Behavior Changes
-
Custom layers are now always used if defined via
RadialLayoutData.LayerIds
property. -
The
RadialLayout
now considers node labels by default. -
The
RadialLayout
now places edge labels by default using a generic labeling algorithm. -
The default style of the
RadialLayout
'sComponentLayout
is changed toPackedCircle
. -
The
RadialLayoutNodePlacementResult.SectorStart
property is now interpreted in clockwise direction. -
Custom center nodes are now always used if defined via
RadialLayoutData.CenterNodes
property.
Radial Tree Layout
Incompatible API Changes
-
BalloonLayout
has been renamed toRadialTreeLayout
, andBalloonLayoutData
has been renamed toRadialTreeLayoutData
. -
The following members have been removed from
BalloonLayout
(nowRadialTreeLayout
): The fieldgraph
, theBalloonLayout
class.NodeInfo
, the methodsGetInfo
,CalculateChildArrangement
,CalculateAngles
,DetermineRoot
, andSortChildNodes
, theFromSketchMode
property (use the new enum valueFromSketch
ofChildOrderingPolicy
instead), and theInterleavedMode
property (useRadialTreeLayoutData.InterleavedNodes
instead). -
The following members of
BalloonLayout
(nowRadialTreeLayout
) have been renamed:PreferredChildWedge
has been renamed toPreferredChildSectorAngle
,PreferredRootWedge
has been renamed toPreferredRootSectorAngle
, and theGetPreferredChildWedge
method has been renamed toGetPreferredChildSectorAngle
. -
The
InterleavedMode
enum has been removed. -
The enum value
InterleavedMode.MarkedNodes
has been removed. To define specific parents for interleaved placed child nodes use theRadialTreeLayoutData.InterleavedNodes
property. -
The enum value
RootNodePolicy.SelectedRoot
has been removed. A custom root node is now always used if defined viaRadialTreeLayoutData.TreeRoot
property. -
The types of the following properties have been changed to double:
PreferredChildSectorAngle
,PreferredRootSectorAngle
,MinimumEdgeLength
, andMinimumNodeDistance
. -
Renamed
RootNodePolicy
toRootSelectionPolicy
. -
Removed
BalloonLayout.Comparer
. UseRadialTreeLayoutData.ChildOrder
instead. -
Replaced layout data
OutEdgeComparer
property withChildOrderData
ChildOrder
. -
Replaced
BalloonLayoutData.OutEdgeComparer
property with new, more powerfulChildOrder
property (class is renamed toRadialTreeLayoutData
).
Incompatible Behavior Changes
- The compactness factor is now interpreted differently. Larger values result in more compact drawings. Its range has been changed to [0, 1].
-
The from-sketch option of
RadialTreeLayout
sorts like before but no longer takes precedence over orders specified with theRadialTreeLayoutData
propertiesChildOrder
orNodeTypes
. -
The
RadialTreeLayout
now considers node labels by default. -
The
RadialTreeLayout
now places edge labels by default using an integrated labeling algorithm. -
The default style of the
RadialTreeLayout
's (formerlyBalloonLayout
's)ComponentLayout
is changed toPackedCircle
.
Radial Group Layout
Incompatible API Changes
-
Renamed
CactusGroupLayout.GroupSizingPolicy
toRadialGroupLayout.GroupSizePolicy
. -
Replaced
CactusGroupLayout.NodeComparer
property of typeIComparer
withRadialGroupLayoutData.ChildNodeComparison
of type Comparison function. -
The
CactusGroupLayout
has been renamed toRadialGroupLayout
, and theCactusGroupLayoutData
has been renamed toRadialGroupLayoutData
. -
Property
PreferredRootWedge
has been renamed toPreferredRootSectorAngle
.
Incompatible Behavior Changes
-
The
RadialGroupLayout
now places edge labels by default using a generic labeling algorithm. -
The default of the
PreferredRootSectorAngle
property has been changed from 180 to 360. -
The default style of the
RadialGroupLayout
's (formerlyCactusGroupLayout
's)ComponentLayout
is changed toPackedCircle
.
Series-parallel Layout
Incompatible API Changes
-
Renamed the
SeriesParallelLayout.MinimumNodeToNodeDistance
property toMinimumNodeDistance
. -
Renamed the
SeriesParallelLayout.MinimumEdgeToEdgeDistance
property toMinimumEdgeDistance
. -
Removed
SeriesParallelLayout.DefaultOutEdgeComparer
. UseSeriesParallelLayoutData.ChildOrder
instead. Also removedDefaultOutEdgeComparer
class. -
Replaced
SeriesParallelLayoutData
property .OutEdgeComparers
with new, more powerfulChildOrder
property. -
The
GeneralGraphHandling
property was removed.SeriesParallelLayout
now handles general graphs by default. -
The
DefaultPortAssignment.BorderGapToPortGapRatio
property was renamed toBorderToPortGapRatio
. -
Remove methods
GetPortBorderGap
andGetPortDistanceDelta
from theDefaultPortAssignment
class. -
The
SeriesParallelLayout.NonSeriesParallelEdgeLabelingAlgorithm
property has been renamed toNonSeriesParallelEdgeLabeling
. -
Renamed
EdgeLayoutDescriptor
toSeriesParallelLayoutEdgeDescriptor
. -
Renamed
SeriesParallelLayout.DefaultEdgeLayoutDescriptor
toDefaultEdgeDescriptor
. -
Renamed
SeriesParallelLayout.EdgeLayoutDescriptorDpKey
toEdgeDescriptorDataKey
. -
Renamed
SeriesParallelLayoutData.EdgeLayoutDescriptors
toEdgeDescriptors
. -
Renamed the
SeriesParallelLayout.VerticalAlignment
property toParallelSubgraphAlignment
. -
The combinations of the enums
ForkStyle
andPortAssignmentMode
have been integrated into thePortAssignmentMode
enum, and theForkStyle
enum has been removed. -
DefaultPortAssignment.ForkStyle
has been removed. -
Renamed
IPortAssignment
toISeriesParallelLayoutPortAssigner
. -
Renamed
DefaultPortAssignment
toSeriesParallelLayoutPortAssigner
. -
Renamed
SeriesParallelLayout.PortAssignmentDpKey
toPortAssignerDataKey
. -
Renamed
SeriesParallelLayoutData.PortAssignments
toPortAssigners
.
Incompatible Behavior Changes
-
SeriesParallelLayout
now handles general graphs by default. -
The
SeriesParallelLayout
now considers node labels by default. -
The
SeriesParallelLayout
now places edge labels by default using an integrated labeling algorithm.
Compact Disk Layout
Incompatible Behavior Changes
-
The
CompactDiskLayout
now considers node labels by default. -
The
CompactDiskLayout
now places edge labels by default using a generic labeling algorithm.
Multi-page Layout
Incompatible API Changes
-
MultiPageLayoutResult
is now an inner class ofMultiPageLayout
. -
Renamed
GroupingPolicy
toMultiPageGroupingPolicy
. -
Renamed
Multipage.NodeType
toMultiPageNodeType
and its valueNormal
toMultiPageNodeType.Regular
. -
Renamed
Multipage.EdgeType
toMultiPageEdgeType
and its valueNormal
toMultiPageEdgeType.Regular
. -
The
EdgeBundleModes
enum and the associated properties have been renamed toMultiEdgeConnectorPolicy
. The enum values have been renamed toSeparate
,ShareForSameDirection
andShare
, respectively. The correspondingEdgeDataKey
has been renamed toMultiEdgeConnectorIdDataKey
(previouslyEdgeTypeDpKey
). -
The
MultiPageLayout.CreateProxyReferenceNodes
property has been renamed toUseProxyReferenceNodes
. -
The
EdgeBundleModes
enum has been renamed toMultiEdgeConnectorPolicy
and converted from a flags enum to a regular enum. To manually select which multi-edges should be distinguished, use theMultiPageLayoutData.MultiEdgeConnectorIds
property. -
The properties
MultiPageLayout.EdgeBundleModeMask
,MultiPageLayout.EdgeTypeDpKey
, andMultiPageLayoutData.EdgeTypes
have been renamed toMultiPageLayout.MultiEdgeConnectorPolicy
,MultiPageLayout.MultiEdgeConnectorIdDataKey
, andMultiPageLayoutData.MultiEdgeConnectorIds
. -
The public API of the
MultiPageLayout
class has been changed.-
The
ILayoutCallback
interface has been removed. The respectiveMultiPageLayout.LayoutCallback
property is now an Action delegate instead. Furthermore,MultiPageLayout.CalculateLayout
method has been removed, meaning the layout can and should only be started like all other algorithms (e.g. via theLayoutExecutor
orIGraph.ApplyLayout
). -
The
IElementFactory
interface and theDefaultElementFactory
class have been removed. The replacement isMultiPageElementFactory
class which can be accessed and modified usingMultiPageLayout.ElementFactory
property. -
The
MultiPageLayout.CreateElementFactory
method has been removed. The factory can be get and set usingMultiPageLayout.ElementFactory
property. -
The
IElementInfoManager
interface has been removed. -
The
LayoutContext
class of theMultiPageLayout
has been renamed toMultiPageLayoutContext
and its properties Graph and Layout have been removed. -
The
INodeInfo
,IEdgeInfo
,INodeLabelInfo
,IEdgeLabelInfo
interfaces related toMultiPageLayout
have been removed. The data provided by them can now be retrieved via methods of theMultiPageLayoutContext
(which is available also as property on theMultiPageLayoutResult
). -
The callback methods
MultiPageLayout.RemoveConnectorPair
,RouteRestoredEdges
andApplyIncrementalLayout
have been removed.
-
The
-
MultiPageLayoutResult.GetPage
andPageCount
have been replaced byPageGraphs
. -
MultiPageLayoutData
handles the ID mapping automatically. Consequently, the explicit mappingsNodeIds
,EdgeIds
,NodeLabelIds
, andEdgeLabelIds
have been removed. Original graph items can be obtained by callingMultiPageLayoutData.GetOriginalItem
.
Partial Layout
Incompatible API Changes
-
Renamed
Partial.LayoutOrientation
toPartialLayoutOrientation
. -
Removed the enum value
ComponentAssignmentStrategy.Customized
. Custom components are now always used if defined withPartialLayoutData.ComponentIds
,ClearAreaLayoutData.ComponentIds
orFillAreaLayoutData.ComponentIds
respectively. -
The
PartialLayout.LayoutSubgraph
method has been removed. -
The callback
ConfigureEdgeRouter
method has been removed from classesPartialLayout
andClearAreaLayout
. The router instance can be specified via thePartialLayout.EdgeRouter
andClearAreaLayout.EdgeRouter
properties so that an additional configuration callback is not necessary.
Incompatible Behavior Changes
-
Custom components are now always used if defined with
PartialLayoutData.ComponentIds
.
Tabular Layout
Incompatible API Changes
-
Replaced
TabularLayout.NodeComparer
property of typeIComparer
withTabularLayoutData.FreeNodeComparison
of type Comparison function. -
Renamed
Tabular.LayoutPolicy
toTabularLayoutMode
. -
The
TabularLayout
class now features its own data key (LayoutGridCellDescriptorResultDataKey
) where it will publish cell IDs of nodes that it explicitly assigned to the cells. Previously it reused the common data keyPartitionGrid.PartitionCellIdDpKey
. -
Renamed
NodeLayoutDescriptor
toTabularLayoutNodeDescriptor
. -
Renamed
TabularLayout.DefaultNodeLayoutDescriptor
toDefaultNodeDescriptor
. -
Renamed
TabularLayout.NodeLayoutDescriptorDpKey
toNodeDescriptorDataKey
. -
Renamed
TabularLayoutData.NodeLayoutDescriptors
toNodeDescriptors
.
Incompatible Behavior Changes
-
The
TabularLayout
now considers node labels by default. -
The
TabularLayout
now places edge labels by default using a generic labeling algorithm.
Component Layout
Incompatible API Changes
-
If
ComponentLayout
is used as a pre-processing step to apply a layout algorithm on multiple connected components, theStopDuration
of that layout is divided appropriately over all components, instead of being applied once per component. -
The
IsolatedGroupComponentLayout
class has been removed. -
Renamed
ComponentArrangementStyles.None
toComponentArrangementStyle.KeepCenters
. -
Removed the
ComponentArrangement
property fromComponentLayout
; use the newComponentArrangementStyle.None
instead to avoid arranging components. -
The
ComponentArrangementStyles
enum has been renamed toComponentArrangementStyle
, as it is no longer a Flags-Enum.-
Removed
ComponentArrangementStyles.Mask
. -
Replaced
ComponentArrangementStyles.ModifierNoOverlap
withTryKeepCenters
. -
Replaced
ComponentArrangementStyles.ModifierAsIs
withComponentLayout.FromSketchMode
.
-
Removed
-
Renamed
ComponentLayout.CalculateBounds
toCalculateComponentBounds
. -
Renamed
ComponentLayout.SetOrigin
toSetComponentLocation
. -
Removed
ComponentLayout.ArrangeFields
method. -
Simplified parameter lists of methods
ComponentLayout.ArrangeComponents
andComponentLayout.SetOrigin
to now accept instances of Component class.
Incompatible Behavior Changes
-
ComponentArrangementStyle.PackedCircle
andComponentArrangementStyle.PackedRectangle
now consider the convex hulls of components to determine overlaps.
Tree Map Layout
Incompatible API Changes
-
Replaced
TreeMapLayout.NodeComparer
property of typeIComparer
withTreeMapLayoutData.ChildNodeComparison
of type Comparison function. -
Removed the
NodeWeightComparer
class. -
Renamed
TilingPolicy
toTilingStrategy
andTreeMapLayout.TilingPolicy
toTreeMapLayout.TilingStrategy
.
Recursive Group Layout
Incompatible API Changes
-
RecursiveGroupLayout.NullLayout
is renamed toRecursiveGroupLayout.FixContentLayout
. -
FixGroupLayoutStage
is removed and its functionality is replaced byRecursiveGroupLayout
usingRecursiveGroupLayout.FixGroupLayout
for all groups. -
The
RecursiveGroupLayout
class now ignores empty group nodes by default (seeConsiderEmptyGroups
property). -
The signature of
IGroupBoundsCalculator.CalculateBounds
method was changed. The given children are now of typeIListEnumerable
.<Node>
-
The
GroupBoundsCalculator
implementation now keeps the center of empty group nodes ifConsiderEmptyGroups
is enabled. -
Method
GroupBoundsCalculator.CalculateBounds
now correctly considers the specified children. Previously, the given children were ignored and all graph elements were considered when calculating the group bounds.
Layout Grid
Incompatible API Changes
- Renamed all types, methods and properties containing "CellId" to "CellDescriptor".
-
Removed properties
OptimizeRowOrder
andOptimizeColumnOrder
fromPartitionGridData
class. -
Removed the data key
PartitionGrid.PartitionGridDpKey
. The keyLayoutGrid.LayoutGridCellDescriptorDataKey
is now the only data key which can be used to specify layout grids. -
Removed data key
RecursiveGroupLayout.GroupNodePartitionGridDpKey
. The keyLayoutGrid.LayoutGridCellDescriptorDataKey
is now the only data key which can be used to specify layout grids. -
Renamed inset properties on classes
LayoutGridColumn
(formerlyColumnDescriptor
) andLayoutGridRow
(formerlyRowDescriptor
) to now be called padding (e.g.,LeftPadding
instead ofLeftInset
). -
The methods
PartitionGrid.PrepareOrientationChange
andPartitionGrid.FinalizeOrientationChange
have been removed. -
Removed properties
OriginalPosition
andOriginalWidth
fromLayoutGridColumn
class (formerlyColumnDescriptor
). Use propertiesLayoutGridColumn.Position
(formerlyComputedPosition
) orLayoutGridColumn.Width
(formerlyComputedWidth
). -
Removed properties
OriginalPosition
andOriginalHeight
fromLayoutGridRow
class (formerlyRowDescriptor
). Use propertiesLayoutGridRow.Position
(formerlyComputedPosition
) orLayoutGridRow.Height
(formerlyComputedHeight
). -
PartitionGrid
is renamed toLayoutGrid
. This also affects the related classesPartitionGridData
,GenericPartitionGridStage
, andGenericPartitionGridStageData
. -
Renamed
ColumnDescriptor
toLayoutGridColumn
&RowDescriptor
toLayoutGridRow
. -
Renamed
PartitionCellId
toLayoutGridCellDescriptor
. -
The
SwimlaneDescriptor
class has been removed from the API. UseLayoutGrid
class (formerly calledPartitionGrid
) instead, which is able to model one-dimensional and two-dimensional grids. -
The
PartitionGridLayoutStage
class has been removed. It is not necessary to manually add this stage, sinceHierarchicalLayout
can supportLayoutGrid
out-of-the-box. -
Removed helper class
Swimlanes
andLayout.SwimlaneRepresentative
. -
Removed the
SwimlanesMode
enum.
Other Layouts
Incompatible API Changes
-
Removed the
InterEdgeRoutingStyle
enum. -
Renamed
CurveFittingLayoutStage
toCurveFittingStage
. -
Renamed
FixNodeLayoutStage
toLayoutAnchoringStage
andFixNodeLayoutData
toLayoutAnchoringStageData
. In addition:-
Renamed
FixPointPolicy
toLayoutAnchoringPolicy
. -
Renamed
FixNodeLayoutStage.FixedNodeDpKey
toNodeAnchoringPolicyDataKey
. -
Renamed
CalculateFixPoint
toCalculateAnchorPoint
. -
Removed
FixNodeLayoutData.FixedNodes
. Graph elements to anchor the graph on can be specified by setting the respectiveAnchoringPolicies
usingLayoutAnchoringStageData
.
-
Renamed
Algorithms
Incompatible API Changes
-
Removed the Groups class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Renamed the Dendrogram class to
HierarchicalClusteringDendrogram
. -
Renamed
ParallelEdges.FindParallelEdges
toLayoutGraphAlgorithms.FindMultiEdges
. -
Renamed
Analysis.Component
toConnectedComponent
. -
The
Algorithms.NodeAggregation
class has been renamed toLayoutGraphNodeAggregation
, emphasizing that this class is intended for users working with theLayoutGraph
API only.-
Furthermore, its member
NodeTypeDpKey
has been removed. The replacement is keyLayoutKeys.NodeTypeDataKey
. -
Also, its member
NodeCenterDpKey
has been removed. Node centers are now directly read from theLayoutGraph
instance which must contain the coordinates of nodes if useful results should be generated.
-
Furthermore, its member
-
Removed the utility class
Sorting
that offered methods to get a sorted node array based on node degrees or another criterion. The functionality is written without this utility by first getting the array of nodes from the graph and then sorting it using standard built-in sorting utilities. -
Removed namespace
Algorithms.Util
. The types are now in namespace Algorithms. -
Removed the
GraphConnectivity
class. Use corresponding methods ofLayoutGraphAlgorithms
instead. -
Removed the
IndependentSets
class. Use corresponding methods ofLayoutGraphAlgorithms
instead. -
Removed the enum value
EuclideanSquared
fromDistanceMetric
enum. Use enum value Euclidean instead which now calculates with squared values. -
Removed the
DistanceMetric
enum ofKMeansClustering
class. UseKMeansDistanceMetric
enum instead. -
Removed the
AggregationPolicy
enum ofNodeAggregation
class. UseAggregationPolicy
enum instead. -
Removed the
ShortestPaths
class. Use corresponding methods ofLayoutGraphAlgorithms
class instead (e.g.ShortestPath
). - The Triangulator algorithm class has been removed.
-
Removed the
BfsDirection
enum. UseTraversalDirection
instead. -
Removed the Intersections class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the
IntersectionAlgorithm
class. Use corresponding methods ofLayoutGraphAlgorithms
instead. -
Removed the Substructures class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the Trees class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the
NetworkFlows
class. Use corresponding methods ofLayoutGraphAlgorithms
instead (e.g.MaximumFlow
). -
Removed the
NodeOrders
class. Use corresponding methods ofLayoutGraphAlgorithms
instead (e.g.TopologicalNodeOrder
). -
Removed the Bipartitions class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the Cycles class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the
ParallelEdges
class. Use corresponding methods ofLayoutGraphAlgorithms
instead. -
Removed the Transitivity class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
The
SpanningTrees
class has been removed. To compute a minimum spanning tree, useLayoutGraphAlgorithms.MinimumSpanningTree
method. -
The
RankAssignments
class has been removed in favor of the singleLayoutGraphAlgorithms.SimplexRankAssignment
method that offers access to the rank assignment algorithm. -
The
GraphChecker
class has been removed and most of its methods are now available onLayoutGraphAlgorithms
. -
The
TreeAnalyzer
class has been removed. Use the more convenient and powerfulTreeAnalysis
class instead. -
Removed the Centrality class. Use corresponding methods of
LayoutGraphAlgorithms
instead. -
Removed the Bfs class. Use
LayoutGraphAlgorithms.Bfs
instead. -
Removed the Dfs class. Use
LayoutGraphAlgorithms.Dfs
instead.
Analysis
Incompatible API Changes
-
Renamed
GraphStructureAnalyzer.HasMultipleEdges
toHasMultiEdges
. -
Renamed
GraphStructureAnalyzer.GetMultipleEdges
toGetMultiEdges
. -
Renamed
AggregationInfo
toNodeAggregationInfo
. -
Renamed
AggregationInfo.ParentAggregation
toParentNodeAggregation
. -
Renamed
NodeAggregation.AggregationPolicy
toNodeAggregationPolicy
. -
Renamed
NodeAggregation.Aggregation
toAggregationPolicy
. -
Renamed
DistanceMetric
toKMeansDistanceMetric
. -
The
NodeAggregation.NodeTypeHandling
property has been renamed toNodeTypePolicy
. -
The
NodeTypeHandlingPolicy
enum has been renamed toNodeTypePolicy
. -
Renamed
Analysis.Component
toConnectedComponent
. -
Renamed
Substructure
toSubstructureItems
. -
Replaced enum
Algorithms.Linkage
withHierarchicalClusteringLinkage
.
Collections
Incompatible API Changes
-
The
YList.ElementAt
method was removed. -
Renamed
ICursor.Prev
toICursor.Previous
. -
Renamed
ListCell.Succ
toListCell.Next
. -
Renamed
ListCell.Pred
toListCell.Previous
. -
Removed the
IsEmpty
method fromYList
class. TestYList.Count
property for 0 instead. -
Removed the methods
SuccCell
andPredCell
fromYList
class. Use new propertiesListCell.Next
andListCell.Previous
instead. -
Removed the methods
CyclicSucc
,CyclicPred
,ContainsAll
andRetainAll
fromYList
class. -
Removed the methods Succ and Pred from
ListCell
class. Use new properties Next and Previous instead. -
Removed the Peek method from
YList
class. Use First property instead.
Geometry
Incompatible API Changes
-
The
GeomUtilities
class has been renamed toGeometryUtilities
. - Implicit and explicit conversion operators between yFiles geometry types and the platform geometry types have been removed.
-
Renamed the
GeomUtilities.FindRayIntersection
method toGetSegmentRayIntersection
. -
Renamed the
GeomUtilities.FindEllipseLineIntersection
method toGetEllipseLineIntersection
. -
Moved
Geom.Collinear
method toGeometryUtilities
class and renamed toAreCollinear
. -
Moved
Geom.CalcConvexHull
method toGeometryUtilities
class and renamed toGetConvexHull
. -
Moved the
Geom.CalcIntersection
method toGeometryUtilities
class and renamed toGetLineLineIntersection
. -
Removed the
Geom.Projection
method. UsePointD.GetProjectionOnSegment
method instead. -
Removed the methods
DistanceToLineSegment
of Geom class. UsePointD.DistanceToSegment
method instead. -
Moved
IPlaneObject
andLineSegment
to namespaceyWorks.Geometry
. -
The copy constructors on the
RectD
,PointD
, andSizeD
classes were removed. Use theToRectD
,ToPointD
, orToSizeD
methods respectively instead. -
All
Intersects
methods of theGeneralPath
class are now calledPathIntersects
. -
The
MayIntersectClip
method of theGeneralPath
class is now calledPathMayIntersectClip
. -
All
AreaContains
methods of theGeneralPath
class now have an optionalflatteningTolerance
parameter. -
The
IsEmpty
method of theGeneralPath
class was removed. Use theIsVisible
method or theCount
property, instead. -
The
GetBounds
overload of theGeneralPath
class that returns the approximate bounds for BΓ©zier segments is now calledGetApproximateBounds
. -
Renamed the
LineSegment.XOffset
property toYIntercept
. -
Renamed the
LineSegment.IsInXIntervall
method toLineSegment.IsInXInterval
andLineSegment.IsInYIntervall
method toLineSegment.IsInYInterval
. -
Made
LineSegment
class sealed. -
The
IRectangle
interface no longer implementsIPoint
. You can get the top-left corner of a rectangle with itsGetTopLeft
method. For usages of the dynamic behavior ofIPoint
, like in a customIPositionHandler
, we recommend to let theIPositionHandler
implementIPoint
, too. -
The
IMutableRectangle
interface no longer implementsIMutablePoint
. When working with theMutableRectangle
class, use itsLocation
property to get a dynamic point of the location.
yFiles.NET 5.6
This release brings exciting new major features, and many other minor new features, improvements, and bugfixes to all parts of the library.
If you are updating from an older version of yFiles.NET, have a look at the list of incompatible changes.
Major new features
- Constraint organic layout and more
-
The
OrganicLayout
class now supports different types of constraints that restrict the placement of the graph's nodes that are specified with the newOrganicLayoutData.Constraints
property.In addition, organic layout now supports:
-
Integrated edge labeling, which can be enabled with the
OrganicLayout.IntegratedEdgeLabeling
property -
Drawing edges such that they point to the main layout direction, specified with the new
OrganicLayoutData.EdgeOrientations
property -
Individual minimum lengths of edges that can be specified with the new
OrganicLayoutData.MinimumEdgeLengths
property.
-
Integrated edge labeling, which can be enabled with the
- Compact tabular layout
-
The
TabularLayout
class now supports the calculation of node arrangements that lead to a low overall edge length. This feature can be enabled with the new propertyconsiderEdges
. - New alignment layout stage
-
The new
AlignmentStage
class places the nodes of a given layout on automatically determined horizontal and/or vertical lines. This stage is particularly designed as a post-processing step that snaps suitable nodes to the same x- or y-coordinates to obtain a grid-like structure. When rearranging the initial layout, the stage moves the nodes as little as possible.The associated new
AlignmentStageData
class allows specifying custom data considered during the layout calculation. - Improved group node style
-
The last major release brought a powerful
GroupNodeStyle
, that got even more features and improvements in this release, namely:-
If
GroupNodeStyle
's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e., the corners of the content area on the side of the style's tab) to 0. -
The new
GroupNodeStyle.MinimumContentAreaSize
property simplifies enforcing a minimum size for the content area a group node. -
GroupNodeStyle
offers the possibility to have its tab width grow (or shrink) depending on the preferred size of associated tab and tab background labels. -
The new
GroupNodeStyle.RenderTransparentContentArea
property controls whether a semi-transparent value for thecontentAreaFill
property works as expected by showing what's behind the group node.
-
If
- Support for .NET 8.0
-
To facilitate using our library with .NET 8.0 and to improve compatibility a .NET 8.0 version of the library has been added.
New Features
Styles
-
Selection, focus, and highlight visualizations can now be easier customized with a node, edge,
label, or port style. These style instances can be set to the corresponding properties of the new
GraphSelectionIndicatorManager
,GraphFocusIndicatorManager
, andGraphHighlightIndicatorManager
classes that can be set as corresponding managers on theGraphControl
. This removes the need forNodeStyleDecorationInstaller
, etc. -
To render items in a zoom-invariant fashion, their style can be wrapped in one of the new
IndicatorNodeStyleDecorator
,IndicatorEdgeStyleDecorator
,IndicatorLabelStyleDecorator
, orIndicatorPortStyleDecorator
classes. The main use case for these decorators is using item styles as selection, focus or highlight indicators.
Layout
-
The
OrganicLayout
class now provides a feature that dynamically detects whether nodes already lie almost on a common line or circle and, if so, snaps the nodes to this line/circle. This new feature can be enabled with theChainRecognition
andCircleRecognition
properties. -
PreferredPlacementDescriptor
instances can now be created fromILabelModel
andILabelModelParameter
instances, respectively, via theirToDescriptor
extension method. -
The
RadialLayout
class now allows defining a custom order of child nodes around a local root node. The order can be individually specified for each node by using the newRadialLayoutData.OutEdgeComparers
property. It is especially suitable for tree-like input graphs. For specifying a single global order for all nodes, for example, alphabetically, the newRadialLayoutData.NodeComparables
property is a more convenient option. -
The
CircularLayout
class now offers the possibility to define star substructures. TheCircularLayout.StarSubstructureStyle
property specifies the style of star substructures and theCircularLayout.StarSubstructureSize
property their minimum size (structures of smaller size are not handled as a star substructure). Furthermore, theCircularLayout.StarSubstructureTypeSeparation
property specifies whether star substructures should be separated by the node type. -
The
CircularLayoutData
class offers the newEdgeDirectedness
property that influences the detection of star-substructures; seeCircularLayout.StarSubstructureStyle
.
Improvements
Graph
-
EdgePathLabelModel
andEdgeSegmentLabelModel
have been improved to provide better placements with edge-cases where the path is too short for the label or degenerates completely. -
GroupNodeLabelModel
no longer triggers anArgumentException
when used with / set for a node that does not useGroupNodeStyle
.GroupNodeLabelModel
is still not intended to be used with nodes that do not useGroupNodeStyle
. This restriction has been lifted to support workflows where the node style is set toGroupNodeStyle
after the label model is set toGroupNodeLabelModel
. - Changing the height of an arc or bridge edge via its handle is now undoable.
View
-
The rendering order of nodes in the
GraphOverviewControl
has been improved to be more in sync with the rendering order in the correspondingGraphControl
. -
GraphOverviewControl
now uses itsContentGroup
instead of theRootGroup
to add the visualization of its graph content. This makes it easier to customize the overview for example by adding a background visual. -
The
LabelLayerPolicy
property ofGraphModelManager
, which defines whether labels should be rendered at their owner or in a separate layer, has been split into three separate propertiesNodeLabelLayerpolicy
,EdgeLabelLayerPolicy
, andPortLabelLayerPolicy
to support different policies for node, edge, and port labels. -
The new
SelectionModelChanged
event ofGraphControl
is raised when the model managing the selection is changed itself, not when the selected items change.
Styles
-
The
ArrowEdgeStyle
's bounds now are tightly enclosing the rendered shape. Before they were too large. -
Bends in edges that use
ArcEdgeStyle
,ArrowEdgeStyle
, orBridgeEdgeStyle
are no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they lie in the selection rectangle.
Interaction
-
The method
PortRelocationHandle.CreateDummyEdge
is now virtual and can be overridden. -
The protected property
DummySourceNodePort
has been added toCreateEdgeInputMode
to simplify overridingCreateDummyEdge
. -
The protected virtual method
CreateEdgeInputMode.CreateDummyBend
has been added that can be overridden to customize bends added during edge creation. -
The edge creation start gesture while dragging inside the source node can now be customized with
CreateEdgeInputMode.SourceNodeDraggingFinishedRecognizer
. -
The
ItemDroppedInputMode.DragDropped
event is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
The
MoveInputMode
,MoveLabelInputMode
, andHandleInputMode
sub-modes ofGraphEditorInputMode
no longer have a pre-setSnapContext
. Instead, they get theirSnapContext
from theInputModeContext
. That way, setting theSnapContext
onGraphEditorInputMode
will affect all sub-modes unless a customSnapContext
is set to them. - The resize handle rendering order has been adapted to improve usability for small nodes.
GraphBuilder
-
The
GetUpdatedStyle
method of theNodeCreator
/EdgeCreator
/LabelCreator
classes now uses the default style from the graph as fallback if the style provider is not set. -
The
LabelCreator.GetUpdatedLayoutParameter
method now uses the default layout parameter from the graph as fallback if the layout parameter provider is not set. -
The
NodeCreator
,EdgeCreator
, andLabelCreator
classes can now be used without aGraphBuilder
. This enables developers to apply styles and labels from a data object in cases where aGraphBuilder
is not suitable for graph creation. -
A
NodeSource
now allows for recursive definition of child nodes in a grouping hierarchy. The new methodsAddChildNodesSource
andCreateChildNodesSource
allow for defining a source to fetch child node items from a node data item. -
A
NodeSource
now allows for implicit definition of parent nodes in a grouping hierarchy. The new methodsAddParentNodesSource
andCreateParentNodesSource
allow for defining a source to fetch a parent node item from a node data item.
GraphML
-
Improved GraphML serialization of
Color.Transparent
.
Layout
-
If
AffectedLabels
are set inLabelingData
but noDpKey
has been provided for them, the key set asAffectedLabelsDpKey
on the labeling algorithm will be used. - For oriented rectangles the intersection test no longer allocates unnecessary memory and no longer creates unnecessary objects, which improves its allocation performance.
-
The
HierarchicLayout
class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (propertyHierarchicLayout.RecursiveGroupLayering
). Previously, such constraints were ignored in that case. -
The
TreeLayout
class now places the ports of edges incident to multi-parent nodes and with port constraints (excluding any-side constraints) at the nodes' border. Previously, unlike as for edges incident to other nodes, the edge ports where located at the nodes' center. -
The
RadialLayout
class now supports node types. The types influence the ordering of nodes of the same circle such that nodes of the same type are preferably placed next to each other if this does not induce additional crossings or conflicts with other constraints. Node types can be defined via theRadialLayoutData.NodeTypes
property.
Bugfixes
Graph
-
Fixed
NullReferenceException
that occured when removing highlighted edges from their graph. - Fixed a bug where labels with an initial opening brace were not correctly serialized.
-
NinePositionsEdgeLabelModel
center placements above and below the edge have been improved when the angle wasn't close to one of the two coordinate axes and the distance was non-zero. Previously, labels could seem to jump around when the path changed and weren't always close to the center of the path. -
GroupNodeLabelModel
no longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle
. -
NavigationInputMode.ExpandGroup
,EnterGroup
, and theExpandGroup
andEnterGroup
commands do not create empty undo units anymore if nothing has changed. -
NavigationInputMode.ExitGroup
and theExitGroup
command now create undo units if the bounds of the exited group node were adjusted. -
GroupingSupport
's methodsEnlargeGroupNode
andEnlargeAllGroupNodes
do not create empty undo units anymore if nothing has changed.
View
-
CanvasControl
: Animated viewport changes could lead to strange behavior if maximum or minimum zoom were set and violated by the viewport change. -
GroupNodeStyle
's associatedINodeInsetsProvider
now correctly calculates insets for "small" nodes, i.e. nodes whose height (or width) is less than the style'sTabHeight
property. - Fixed a bug which might have caused port selection visualizations to disappear in image export or printing under rare conditions.
Styles
-
With
ArcEdgeStyle
, the 3 center positions of theNinePositionEdgeLabelModel
are now in the right places. Previously they were often way off. -
GroupNodeStyle
's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests. -
GroupNodeStyle
no longer renders a hairline in place of the tab when using aPen
withTabWidth
0. -
ImageNodeStyleRenderer
'sGetBounds
method now returns the actual image bounds instead of the node layout's bounds ifKeepAspectRatio
is enabled. -
DefaultLabelStyle
now adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape. - Bezier edges no longer devolve into polyline paths under rare circumstances.
-
ArrowEdgeStyle
now correctly considers its visibility with thicknesses greater than 13. -
MemoryImageNodeStyle
andUriImageNodeStyle
now properly respect theirKeepAspectRatio
property for rendering, hit testing, and outline. -
The hit test for
PolylineEdgeStyle
,ArcEdgeStyle
,BezierEdgeStyle
, andBridgeEdgeStyle
has been fixed. Previously, the hit area was too large when using thicker pens.
Interaction
- The default visualization for selected ports is now displayed properly.
-
Fixed an issue where changing the
GraphControl.InputMode
while the context menu is open would lead to a crash. -
Fixed a bug in
HighlightIndicatorManager
that could result in missing or surplus highlight visualizations when changing theGraphControl.HighlightIndicatorManager
. - Self-loops no longer disappear when resizing nodes while orthogonal editing is enabled.
-
Fixed a bug in
MoveViewportInputMode
that caused the inertia feature to mistakenly start moving the viewport after the mouse pointer has stopped before being released. -
Starting a
CanvasControl
/GraphControl
viewport animation now properly stops a runningMoveViewportInputMode
inertia animation. - The direction of the first edge segment during orthogonal edge creation is now correctly determined when the source port candidate lies on the node border.
- Fixed a bug in some input modes which led to undefined behavior if the mode has been uninstalled in a handler for its own events.
GraphML
-
Fixed GraphML serialization and deserialization for certain configurations of
GroupNodeStyle
andRectangleNodeStyle
.
Animations
- Layout animation performance has been improved for edges with many bends.
Analysis
-
Fixed the issue of excessive memory consumption in the analysis algorithm
Paths
when a large number of start and end nodes were set. -
The
ShortestPaths
class now correctly calculates the k-shortest paths of graphs (see methodsShortestPaths.KShortestPaths
andShortestPaths.KShortestPathsCursor
). Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.
Layout
Hierarchic Layout
-
Rare combinations of
PortCandidates
inPortCandidateSets
no longer result in exceptions. -
For input graphs with a
PartitionGrid
structure, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
if it is already compatible with the specified grid structure.
Organic Layout
-
The
OrganicLayout
class no longer produces edge overlaps when propertyChainRecognition
is enabled. - In rare cases fixed nodes could move when also a group node was fixed.
Radial Layout
-
The
RadialLayout
class no longer throws an exception if the layout algorithm is executed too many times from the same instance.
Circular Layout
-
The
CircularLayout
class no longer throws an exception if propertyStarSubstructureStyle
is set toStarSubstructureStyle.Radial
and the whole input graph is a star.
Clear Area Layout
-
The
ClearAreaLayout
class no longer produces results where the specified area is not cleared for some input graphs when propertyClearAreaStrategy
is set toPreserveShapes
orPreserveShapesUniform
.
Partial Layout
-
The
PartialLayout
class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
PartialLayout
class now correctly places disconnected components for cases where a layout orientation is specified, and the propertyComponentAssignmentStrategy
is not Single. Previously, such components were sometimes placed far away from the remaining graph elements.
Edge Router
-
The
EdgeRouter
class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
EdgeRouter
class no longer produces self-crossing routes of edges with labels if propertyIntegratedEdgeLabeling
is enabled. -
The
EdgeRouter
class no longer produces bad layout results for some scenarios with grouped edges and multiplePortCandidates
. Previously, the algorithm selected any of them without considering the alternative options.
Orthogonal Layout
-
The
OrthogonalLayout
class no longer throws an exception for some input graphs with tree substructures when theTreeStyle
is set to a value different fromTreeLayoutStyle.None
.
Demo Improvements
-
Fixed
BPMN
-DI
import forLaneSets
in a Subprocess.
Incompatible Changes
Requirements
- yFiles does not support .NET Core 3.1 anymore. Minimum .NET version is 6.0 now. Minimum .NET Framework version still is 4.0. For the Layout only packages, the minimum requirements still are .NET Framework 3.5 and .NET Standard 2.0
- The Layout package, i.e. the package which provides only the layout and analysis library, now only provides libraries for .NET Framework 3.5 and .NET Standard 2.0. These are compatible with all supported .NET versions, though.
API
-
The property
GraphModelManager.LabelLayerPolicy
has been marked as deprecated and may be removed in future releases. Use the more specific propertiesNodeLabelLayerPolicy
,EdgeLabelLayerPolicy
, andPortLabelLayerPolicy
instead. -
HoveredItemChangedEventArgs
is no longer a subclass of the unrelatedItemEventArgs
. -
TreeNodeSource
andAdjacencyNodesSource
no longer inherit fromNodeSource
. -
TreeBuilder.SetData
only accepts aTreeNodesSource
and no longer aNodesSource
as a parameter.
Layout
-
CactusGroupLayout.DefaultNodeComparator
has been renamed toDefaultNodeComparer
.
Interaction
-
The
ItemDroppedInputMode.DragDropped
event is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
Bends in edges that use
ArcEdgeStyle
,ArrowEdgeStyle
, orBridgeEdgeStyle
are no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they lie in the selection rectangle. -
The
MoveInputMode
,MoveLabelInputMode
, andHandleInputMode
sub-modes ofGraphEditorInputMode
no longer have a pre-setSnapContext
. Instead, they take theSnapContext
from theInputModeContext
. That way, changing theSnapContext
onGraphEditorInputMode
will also affect the sub-modes.
Changes of Default Behavior
-
EdgePathLabelModel
andEdgeSegmentLabelModel
have been modified to yield better results for some degenerate path cases. This leads to greater visual stability when the path is not long enough for the label or even completely invisible due to overlapping nodes. Technically, this can result in slightly different placements with the same parameter values in these edge-cases. -
Adding a label with
GroupNodeLabelModel
to a node that does not useGroupNodeStyle
or setting aGroupNodeLabelModel
-created parameter for a label whose owner node does not useGroupNodeStyle
no longer throws anArgumentException
claiming "The parameter does not support this kind of label.". -
If
GroupNodeStyle
's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e. the corners of the content area on the side of the style's tab) to 0.
Layout
-
The
EdgeRouter
class now ignores inner node labels by default, see propertyIgnoreInnerNodeLabels
. Previously, this property was disabled by default.
yFiles.NET 5.5.0.1
Bugfixes
View
-
ViewportAnimations
now are properly cleaned up onCancel
. -
GroupNodeStyle
's associatedINodeInsetsProvider
now correctly calculates insets for "small" nodes, i.e. nodes whose height (or width) is less than the style'sTabHeight
property. -
Inertia in
MoveViewportInputMode
no longer stops working randomly.
Graph
-
EdgePathLabelModel
'sFindBestParameter
method now creates correct parameters for locations close to bends. -
NinePositionsEdgeLabelModel
center placements above and below the edge have been improved when the angle wasn't close to one of the two coordinate axes and the distance was non-zero. Previously, labels could seem to jump around when the path changed and weren't always close to the center of the path. -
GroupNodeLabelModel
no longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle
. -
NavigationInputMode.ExpandGroup
,EnterGroup
, and theExpandGroup
andEnterGroup
commands do not create empty undo units anymore if nothing has changed. -
NavigationInputMode.ExitGroup
and theExitGroup
command now create undo units if the bounds of the exited group node were adjusted. -
GroupingSupport
's methodsEnlargeGroupNode
andEnlargeAllGroupNodes
do not create empty undo units anymore if nothing has changed. -
EdgePathLabelModel
,EdgeSegmentLabelModel
, andSmartEdgeLabelModel
FindBestParameter
implementations now create correct parameters for label boxes that overlap the edge's source or target node.
Interaction
-
Fixed an issue where changing the
GraphControl.InputMode
while the context menu is open would lead to a crash. -
Fixed a bug in
MoveViewportInputMode
that caused the inertia feature to mistakenly start moving the viewport after the mouse or touch pointer has stopped before being released. -
Starting a
CanvasControl
/GraphControl
viewport animation now properly stops a runningMoveViewportInputMode
inertia animation. - The direction of the first edge segment during orthogonal edge creation is now correctly determined when the source port candidate lies on the node border.
-
SmartEdgeLabelModel
now properly supports the original position snap line.
Styles
-
GroupNodeStyle
's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests. -
ShapeNodeStyleRenderer
now always uses the protectedGetBrush
andGetPen
methods for all shapes instead of falling back to the respective style properties for some shapes. -
ImageNodeStyleRenderer
'sGetBounds
method now returns the actual image bounds instead of the node layout's bounds ifKeepAspectRatio
is enabled. -
DefaultLabelStyle
now adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape.
Table
-
Fixed a bug in
StretchStripeLabelModel
that was causing incorrect handling of insets.
GraphML
-
Fixed an issue in
GraphMLIOHandler
'sWriteEvents
where theDataWriting
event has been dispatched after the writing process instead of before. -
Fixed GraphML serialization and deserialization for certain
configurations of
GroupNodeStyle
andRectangleNodeStyle
.
GraphBuilder
-
Fixed a potential memory leak in
AdjacencyGraphBuilder
. Some internal references were not cleaned up after items have been removed duringUpdateGraph
. -
Fixed a bug in
GraphBuilder
where updating an existing edge whose (new) source or target nodes cannot be resolved did not remove the edge from the graph. -
Fixed a potential memory leak in
GraphBuilder
,AdjacencyGraphBuilder
, andTreeBuilder
. Some internal map entries for labels were not discarded after their owner nodes or edges were removed.
Layout
Edge Router
-
The
EdgeRouter
class no longer produces bad layout results for some scenarios with grouped edges and multiplePortCandidates
. Previously, the algorithm selected any of them without considering the alternative options.
Circular Layout
-
A circular layout with
LayoutStyle.BccIsolated
can no longer get into an infinite loop for inputs where a component consists only of articulation points.
Generic Labeling
-
The
GenericLabeling
class no longer produces bad label placements for edges with direct group content routing, i.e., edges that connect a group node with one of its descendants and are routed directly without leaving the group.
Hierarchical Layout
-
For input graphs with a
PartitionGrid
structure, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
if it is already compatible with the specified grid structure. -
The
HierarchicLayout
class no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode. -
The results of the
DefaultLayerSequencer
class are now deterministic by default, since it no longer aborts the calculation after 10s. For this, itsMaximumDuration
value is now unrestricted.
Organic Layout
-
The
OrganicLayout
class now satisfies propertyOrganicLayout.Deterministic
for more cases when the maximum duration is restricted. Note, however, that non-deterministic behavior is still possible when restricting the duration. -
The
OrganicLayout
class no longer produces violations of the specified minimum node distance for separated radial substructures (see propertyStarSubstructureStyle.SeparatedRadial
).
Orthogonal Layout
-
The
OrthogonalLayout
class no longer generates overlaps between edge segments (of a parallel edge) and edge labels of other edges for some rare scenarios.
Single Cycle Layout
-
The
SingleCycleLayout
class no longer produces violations of the specified minimum node distance.
Incompatible Changes
Minor
-
The value of the
DefaultLayerSequencer.MaximumDuration
property is now unrestricted. Previously, it was restricted to 10 seconds. It is used by theHierarchicLayout
class, which still adheres to its own maximum duration.
yFiles.NET 5.5
Major new features
- New styles for graph items
-
The
RectangleNodeStyle
class is a new node style that uses a rectangular shape whose corners are either rounded or cut diagonally. Its properties specify which corners get rounded, the corner radius, its fill, and its border stroke.The new
GroupNodeStyle
class is a node style primarily designed for collapsed and expanded group nodes. It draws a (rounded) rectangle with an optional tab or ribbon, and offers extensive configuration options for an optional icon, its various fills, and paddings.The new
ArrowNodeStyle
class draws a node as an arrow shape. The arrow can point in one of the four compass directions, and the arrow head slope, the shaft thickness, the fill, and the border stroke can be configured.Similarly, the new
ArrowEdgeStyle
class draws an edge as an arrow shape. This style always points from the source port to the target port, ignoring bends, and can be configured in the same way as the node style.The
DefaultLabelStyle
class now supports different common background shapes.The
ShapeNodeStyle
class now supports three additional shapes:Hexagon2
(a six-sided polygon with tips at top and bottom),Star5Up
(a five-pointed star with one tip pointing upwards), andPill
(a stadium shape with the shorter sides rounded).Its new property
KeepIntrinsicAspectRatio
defines whether to keep the intrinsic aspect ratio of the shape.The new
BridgeEdgeStyle
class renders an edge as a 3-segment bridge with a given height between the edge's source and target port locations. This is especially useful to distinguish parallel multi-edges between the same pair of nodes. - Wrap text to shape
-
The text wrapping feature of
DefaultLabelStyle
now wraps the text inside a given shape instead of just the rectangular label bounds. TheTextWrappingShape
enum provides the predefined shapes, and includes for example pill, ellipse, and hexagon. The newDefaultLabelStyle.TextWrappingPadding
property defines the padding between the chosen shape and the text.If the predefined shapes don't fit your needs, you can override the
DefaultLabelStyleRenderer.GetTextWrappingOutline
method to return any custom convex path asGeneralPath
instead. - Compact disk layout
-
The new
CompactDiskLayout
class arranges a graph on a disk, packing the nodes as dense as possible. This layout is mostly suitable for graphs with small components whose loosely connected nodes should be grouped and packed in a small area.The associated new class
CompactDiskLayoutData
allows to specify custom data considered during the layout calculation. - Cactus group layout
-
The new
CactusGroupLayout
class offers an alternative representation of hierarchically nested data. It places the children of a group along the groups circular border, resembling the structure of a cactus.The associated new class
CactusGroupLayoutData
allows to specify custom data considered during the layout calculation.The
LargeGraphsAggregation
demo has been modified to demonstrate that layout.
New Features
View
-
The new class
PortLocationModelParameterSerializer
provides static helper methods which can convert the built-inIPortLocationModelParameter
implementations into key-value pairs. It also supports creatingIPortLocationModelParameter
instances from these key-value pairs. -
Added the new property
AspectRatio
to theGeneralPathNodeStyle
which defines the aspect ratio of the path. -
The new property
CanvasControl.MouseWheelZoomEventRecognizer
can be used to set the modifier for distinguishing between mouse wheel scrolling and zooming. -
The new class
LabelModelParameterSerializer
provides static helper methods which can convert the built-inILabelModelParameter
implementations into key-value pairs. It also supports creatingILabelModelParameter
instances from these key-value pairs. -
The methods
GetNodesRevealedAfterExpand
,GetEdgesChangedAfterExpand
, andGetEdgesChangedAfterCollapse
have been added toFoldingManager
that can be used to retrieve information about folding states that would be used when a specified group node would be expanded or collapsed.
Interaction
-
Handles can now react to mouse clicks and touch tap events. The
HandleClick
method has been added to theIHandle
interface and is called whenHandleInputMode.ClickedRecognizer
orHandleInputMode.ClickedRecognizerTouch
was triggered on a targeted handle. To customize the general handle click handling, theClicked
event can be listened to or the methodHandleInputMode.HandleClick
can be overridden.
Hierarchic Layout
-
The
HierarchicLayout
class now supports so-called tabular group nodes. The children of such groups are arranged in a compact tabular fashion (i.e., like a single column table for layout orientation left-to-right). PropertyHierarchicLayoutData.TabularGroups
allows to mark groups as "tabular" and propertyHierarchicLayoutData.TabularGroupChildComparers
to specify a custom order for the children.
Organic Layout
-
The
OrganicLayout
class now offers the possibility to define a group substructure scope, see propertyGroupSubstructureScope
. Group substructures that lie in the specified scope are treated as substructures in the layout process, i.e., the child nodes are arranged on a disk that is contained in the group node. -
In addition, the new property
ClusterAsGroupStructureAllowed
allows to specify whether or not detected clusters (see propertyClusteringPolicy
) are taken into account as group substructures. -
The
OrganicLayout
class now offers two newChainSubstructureStyles
calledDisk
andDiskNested
that lead to a compact disk-like layout for chains. -
The
OrganicLayout
class now offers the possibility to define tree substructures (stars, chains, cycles and parallel structures are already supported). TheOrganicLayout.TreeSubstructureStyle
property specifies the style of tree substructures and theOrganicLayout.TreeSubstructureSize
property specifies their minimum size (structures of smaller size are not handled as a tree substructure).
Radial Layout
-
The
RadialLayout
now supports a new layering strategy that produces a circular dendrogram drawing. -
The
RadialLayout
now supports two new edge routing styles, namely a radial polyline style and a curved style. The radial polyline style produces edge paths which consist of a series of straight and arc segments. The curved polyline style routes the edges as curved bezier paths. In the latter case, the edge paths can be also returned as control points that represent cubic bezier control points. -
The
RadialLayout
now supports integrated node labeling i.e., the node labels are taken into consideration when determining the positions for the nodes of the graph and guarantees that labels will not overlap with other objects in the graph.
Balloon Layout
-
The
BalloonLayout
class now supports node types. The types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are weaker than a user-specified custom order defined via a comparison function. Types can be defined via theBalloonLayoutData.NodeTypes
property.
Circular Layout
-
The
CircularLayout
now supports integrated node labeling i.e., the node labels are taken into consideration when determining the positions for the nodes of the graph and guarantees that labels will not overlap with other objects in the graph. -
The
CircularLayout
class now supports curved edge routing within and between circles.
Analysis
-
Added the new
RankAssignment
analysis algorithm class that solves the rank assignment problem on an acyclic graph using the simplex method. -
The new analysis class
Intersections
finds intersections and overlaps between graph items, featuring flexible configuration options to find only specific intersections. The respectiveyWorks.Layout.Intersections
class provides the functionality also for theLayoutGraph
API, but offers less convenience.
Improvements
General
- yFiles now provides assemblies for .NET 7. The assemblies for .NET 5 have been removed.
- The documentation about configuring the item visualization has been improved. All styles and their configuration options are now described in a Developer's Guide chapter.
View
-
GraphClipboard
now respects thePasteDelta
value when pasting items without owner (e.g. edges without selected source or target node). -
ModelManager
and its derived classesHighlightIndicatorManager
,SelectionIndicatorManager
, andFocusIndicatorManager
now haveInstall
andUninstall
methods for properly allocating and freeing resources when setting or removing a manager to aCanvasControl
. -
GraphModelManager
: the propertiesNodeManager
,EdgeManager
,PortManager
,EdgeLabelManager
,NodeLabelManager
,PortLabelManager
, andProvideUserObjectOnMainCanvasObject
have been made public.
Interaction
-
The
MoveViewportInputMode.Uninstall
method is now virtual and can be overridden in derived classes. - The behavior of the inertia during touch inputs has been improved.
-
A
SizeConstraintProvider
property was added toNodeReshapeHandleProvider
andNodeReshapeHandlerHandle
that is queried during node resize gestures if no explicitMinimumSize
,MaximumSize
orMinimumEnclosedArea
is set. - Cursor property changes of active input modes are now immediately reflected in the application's mouse cursor. Previously, the application mouse cursor might have been updated only after the next mouse event.
-
The new
MoveInputMode.ValidBeginCursor
property offers the possibility to use different cursors for signaling a valid position for beginning a move operation and actually moving items. -
The
ResizeStripeInputMode
class now offers the possibility to customize the cursors for signaling a valid position for beginning a resize operation as well as actually resizing columns or rows. -
The
ResizeStripeInputMode
class now offers properties to set an invalid end cursor for column and row resize. The invalid end cursor is shown during resize operations if the column or row in question cannot be resized to the current mouse position. -
The properties
ValidBeginRecognizer
andValidBeginCursor
have been added toLassoSelectionInputMode
,MarqueeSelectionInputMode
, andMoveViewportInputMode
. TheValidBeginRecognizer
can be used to indicate whether the selection respectively move viewport gesture may begin in which case theValidBeginCursor
is used. -
The property
MouseHoverInputMode.ValidHoverLocationCursor
has been added that is used when theValidHoverLocationHitTestable
returns true for a location. -
The property
ContextMenuInputMode.ValidMenuLocationCursor
has been added that is used when theValidMenuLocationHitTestable
returns true for a location. -
IReparentHandler.IsValidParent
is now also called withnull
as new parent during the drag gesture if no real parent node has been tested for the location. -
Keyboard navigation with
NavigationInputMode
now always considers the current item to navigate from, regardless of the value of theNavigableItems
property. -
The
GraphClipboard
now raises the eventsElementsCutting
,ElementsCopying
,ElementsPasting
, andElementsDuplicating
at the very beginning of theCut
,Copy
,Paste
, andDuplicate
methods. -
GraphEditorInputMode
now raises theSelectionGrouping
andSelectionGrouped
events at the start and end of theGroupSelection
method. Similarly, theSelectionUngrouping
andSelectionUngrouped
events are raised at the start and end ofUngroupSelection
method. -
The new
CreateEdgeInputMode.SourceNodeDraggingCursor
property offers the possibility to customize the cursor that is shown while the mouse is still over the source node after starting the edge creation. -
Changes to
ItemHoverInputMode
'sHoverCursor
property now take effect immediately if the mouse pointer is currently hovering over an item. -
The
TextEditorInputMode
now releases the mutex before dispatching theTextEdited
event. - The input modes do not perform hit tests upon automatically repeated key down events for modifier keys anymore.
Styles
-
Added a new property
KeepAspectRatio
toImageNodeStyle
andMemoryImageNodeStyle
to support keeping the image's aspect ration during resizes. -
Nodes rendered with the
ShapeNodeStyle
now respect their actual outline shape when selected with theLassoSelectionInputMode
. -
The icon for
IconLabelStyle
is now rendered above the wrapped label style. This enables the icon to be rendered above the background provided byDefaultLabelStyle
. -
DefaultLabelStyleRenderer.GetPreferredSize
has been made virtual. -
CollapsibleNodeStyleDecorator
now can handle rotated icons.
GraphBuilder
-
GraphBuilder
now offers simplified access to a node/edge that has been created with a given ID or data item or accessing the data a node/edge has been created for via the new methodsGetNodeById
,GetNodeForItem
,GetDataItem(INode)
,GetEdgeById
,GetEdgeForItem
, andGetDataItem(IEdge)
. -
TreeBuilder
andAdjacencyGraphBuilder
now offer simplified access to a node that has been created with a given ID or data item or accessing the data a node/edge has been created for via the new methodsGetNodeById
,GetNodeForItem
,GetDataItem(INode)
, andGetDataItem(IEdge)
.
Hierarchic Layout
-
The
HierarchicLayout
class now allows to combine theSimplexNodePlacer.StraightenEdges
andSimplexNodePlacer.BarycenterMode
properties. Previously, edge straightening was not supported in barycenter mode. -
The
HierarchicLayout
class generates more compact results for some cases with edges between nodes of the same layer and integrated edge labeling where previously unnecessarily large distances to the label and edge were kept. -
The
HierarchicLayout
class now places nodes without any edges as far left as possible without violating any constraints. That way they do not disturb the layout for the connected part of the graph. -
For input graphs with a
PartitionGrid
structure, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
if it is already compatible with the specified grid structure. Previously, for such cases, the algorithm may have calculated an entirely different layer assignment. -
The
HierarchicLayout
class now considers the flow direction to place the ports of port groups when combined with direct group content edges. -
The
HierarchicLayout
class comes with an improved support for subcomponent layouts (seeHierarchicLayoutData.Subcomponents
). Defining subcomponents now works by assigning instances of the newSubcomponentDescriptor
class to nodes so that nodes mapped to the same descriptor instance form a component. Components that have inter-edges only to a single non-component node are now integrated directly at that node when using the new placement policiesSubcomponentPlacementPolicy.AlwaysIntegrated
orSubcomponentPlacementPolicy.Automatic
(and if the orientation of the sub-layout permits it). The overall results for such cases feature better edge routing quality and more compact drawings. -
The
HierarchicLayout
class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (propertyHierarchicLayout.RecursiveGroupLayering
). Previously, such constraints were ignored in that case. -
The
HierarchicLayout
class now uses a more compact layer placement for graphs with edge labels between layers. -
The
HierarchicLayout
class now requires fewer bends for some inputs with grouped edges and port constraints or port candidates.
Organic Layout
-
The
OrganicLayout
class now produces stable results for inputs with node labels and in deterministic mode, where it previously could generate a slightly different arrangement when applied twice with the same parameters. -
The
OrganicLayout
class now allows to specify custom node clusters by setting theClusteringPolicy
property toClusteringPolicy.UserDefined
. The custom cluster IDs have to be specified by means of theOrganicLayoutData.ClusterIds
property.
Circular Layout
-
The
CircularLayout
class now supports node types (seeCircularLayoutData.NodeTypes
) also for the layout of the cycle partitions. Previously, the types had an influence only on the layout of a partition itself. If all nodes of a partition are of the same type, then the partition gets that type as well, so that partitions of same type are preferably placed next to each other. -
The
CircularLayout
class has received a faster algorithm for calculating edge bundles.
Tree Layout
-
Root Alignment in
GenericTreeLayout
can also factor in the port position to straighten out an edge. -
The
TreeLayout
class now also supports integrated edge labeling for configurations that use aLayeredNodePlacer
.
Edge Router
-
The
EdgeRouter
class now produces better results for some setups with monotonic path restrictions and edges with vertically/horizontally overlapping endpoints. -
The
EdgeRouter
class now tries to avoid routes that cross fixed external ports of other edges as well as fixed internal ports at group nodes of other edges. The new propertyPenaltySettings.PortCrossingPenalty
allows to specify the cost of such crossings. -
The
EdgeRouter
class now supports buses that include self-loops (see classBusDescriptor
). Previously, self-loops were ignored.
Generic Labeling
- The generic labeling algorithm has an additional preset to avoid overlaps of labels and the partition grid.
Layout
- Improved the initialization time and memory consumption of layout animations.
-
The
TemporaryGroupNodeInsertionStage
class now automatically marks inserted group nodes with anIDataProvider
registered to the input graph with the keyInsertedGroupNodeDpKey
. -
The
TemporaryGroupNodeInsertionStage
class now also supports specifying hierarchically nested temporary groups. Therefore, the newTemporaryGroupDescriptor
class has been added.
Analysis
-
The
TraversalDirection
enumeration used by theNeighborhood
andBfs
algorithms has been extended. The enum valueUndirected
has been added that ignores the edge direction and corresponds semantically with the previous valueBoth
. The semantic ofBoth
has been adjusted to indeed return the union of theSuccessor
and thePredecessor
results. To keep the default behavior of theNeighborhood
andBfs
algorithms, the default value of theirTraversalDirection
property has been changed fromBoth
toUndirected
. -
The
GraphStructureAnalyzer
class now supports operating on a subset of the graph. -
The new
SubgraphNodes
andSubgraphEdges
properties on theReachability
class allow to define a subset of nodes/edges the algorithm should operate on.
Bugfixes
View
-
Combining
HierarchicNestingPolicy.GroupNodes
,LabelLayerPolicy.AtOwner
and undo no longer throws aNullReferenceException
. -
Viewport animations no longer suddenly stop when the zoom level is near
CanvasControl.MinimumZoom
orMaximumZoom
. - Holding down a scrollbar button no longer scrolls beyond the scrollable area indicated by this scrollbar.
-
Changing the
ICanvasObject.Group
property no longer triggers unnecessary recreation of the visuals anymore. -
Fixed a bug in
SelectionIndicatorManager
that didn't callRemoveSelection
when an item was deselected. -
Changing the
GraphControl.GraphModelManager
property no longer leaks memory in certain situations. -
A tooltip which is displayed at a given location by calling the
MouseHoverInputMode.Show
method is no longer immediately hidden after each mouse move. It now respects theMouseHoverSize
property. -
Calling
IFoldingView.Collapse
on a normal (i.e. non-group) node no longer creates anUndoUnit
or a view state (which included an unexpected call toIFolderNodeConverter.InitializeFolderNode
even though the result would never have been used). Now callingIFoldingView.Collapse
on a normal node does nothing. - The automatic flipping behavior of labels now also works with projections that distort the labels.
-
Fixed potential text clipping issue with
HighDPI
displays in conjunction with display scaling.
Graph
-
Fixed a bug in
FilteredGraphWrapper
'sNodeRemoved
event where the provided old parent might have been present in the wrapped graph but not in the filtered graph. -
The
FilteredGraphWrapper
class now raises the correct events when filtering out port labels. Previously, the events contained incorrect owner information.
Interaction
-
After pasting, a closed group node within another closed group now stays closed. Previously, it
was open due to a bug in the
GraphClipboard
class. -
The
GraphEditorInputMode.AdjustContentRect
method now only updates theCanvasControl.ContentRect
property once per call. Previously there have been circumstances where the property would have been updated twice unnecessarily. -
The
TableEditorInputMode
class no longer changes theGraphControl.Selection
property unnecessarily when theGraphControl.Graph
property is changed. -
An instance of the
HandleInputMode
class is no longercanceled
if a handle is removed during its ownDragFinished
call. This fixes some very rare exceptions under complicated circumstances. -
Multiple
DropInputMode
instances now correctly consider their respective priorities. -
UndoEngine
no longer adds an empty undo unit for an aborted operation in certain rare cases. -
Setting the
CanvasControl.DoubleClickTime
to one second no longer causes an exception and setting it above one second now correctly considers the total duration, not just the fractional second part, inClickInputMode
. -
The
QueryItemToolTip
event of theGraphEditorInputMode
andGraphViewerInputMode
is now only triggered once when hovering over a graph element instead of twice.
Styles
-
Cloning an
ITable
instance now properly clones all of the table's internal state. Previously, changing a cloned table's insets could result in the cloned table's stripes not updating their geometry. -
TableNodeStyle
now allows the table background style to access the table node's tag. - The built-in styles with rounded corners now have the correct outline shape for all calculations.
- Edges with Bézier paths can now also be animated into non-Bézier paths.
-
Edge cropping now works as expected when using the
BezierEdgeStyle
class and the terminating nodes have styles that do not provide an outline in theirIShapeGeometry
implementation. -
DefaultLabelStyle
now considers theNoWrap
flag of theFormatFlags
of itsStringFormat
property correctly. PreviouslyClipText
was often used to determine the clip and wrap behavior. -
DefaultLabelStyle
'sNormalizeBrushes
now properly handles rotated brushes. -
ImageIcon
now considers the pixel size of the image for painting instead of the physical size. This means it is now consistent with its ownSize
property. -
Setting a new projection on
CanvasControl
now correctly keeps the viewport center the same.
Licensing
-
License validation no longer fails when dynamic assemblies are loaded or yFiles code is called
indirectly from dynamic methods. This could have resulted in licensing failures, e.g. when using yFiles in
ASP.NET
web services.
GraphML
-
The
key
parameter ofInputHandlerBase.SetValue
method is now annotated correctly as nullable. The key may benull
when the model item used as key is created after its data has been parsed.
GraphBuilder
-
Label bindings which don't provide label data (or
null
) no longer add empty labels. Instead, no label will be added.
Designer
-
Setting the
GraphEditorInputMode
orGraphViewerInputMode
in the Visual Studio Designer no longer causes an Exception in the designer.
Hierarchic Layout
-
The
SimplexNodePlacer
class used by theHierarchicLayout
no longer throws an error due to an internal overflow for very wide layouts. -
The
HierarchicLayout
class now correctly considers the specified halos of group nodes when there is a partition grid defined. -
The
HierarchicLayout
class no longer generates broken non-orthogonal edge segments of same-layer edges for some cases in conjunction with integrated edge labeling and edge labels placed at the ports. -
The
HierarchicLayout
class now properly satisfiesPortCandidates
defined for same-layer edges at nodes where other edges with (rather large) source/target port labels additionally exist. -
The
HierarchicLayout
class now produces a correct edge grouping structure for short edges having the same source and target group ID. -
The
HierarchicLayout
class no longer throws an exception when the edge-directedness feature (HierarchicLayoutData.EdgeDirectedness
) is used in conjunction with enabled back-loop routing (HierarchicLayout.BackLoopRouting
). -
The
HierarchicLayout
class no longer creates unnecessary spacing between sub-components (seeHierarchicLayoutData.SubComponents
) and other elements. This previously happened in some cases due to edge/node labels being present. In consequence, these cases are now more compact. -
The
HierarchicLayout
class no longer produces overlaps between (large) external node labels and unrelated edges. -
The
HierarchicLayout
class no longer produces overlaps between sub-component elements (seeHierarchicLayoutData.SubComponents
) and edges that are not part of the component. -
The
HierarchicLayout
class now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled (see propertyHierarchicLayoutData.UniformPortAssignmentGroups
) for some cases where it previously did not yield a uniform port distribution. -
The
HierarchicLayout
now correctly considers thePreferredPlacementDescriptor
settings of an edge label when there are additionally edge groupings defined. Previously, it could, for example, happen that the edge label was placed on the wrong side of the edge. -
The
HierarchicLayout
class now adheres more closely to its maximum duration and itsAbortHandler
. -
The
HierarchicLayout
class now considers thePortCandidate
directions correctly for layout orientations other thanTopToBottom
. This also improves the optimization results withPortCandidateSet
s that allow multiple directions to connect to nodes.
Organic Layout
-
The
OrganicLayout
class no longer produces broken routes of self-loops at group nodes if the Scope is not equal to All. -
The
OrganicLayout
class now correctly considers the specifiedPartitionGrid
if substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored. -
The
OrganicLayout
class now correctly considers fix-contents and fix-bounds groups (see enumGroupNodeMode
) if the substructure detection is enabled. -
The
OrganicLayout
class now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData.NodeTypes
).
Clear Area Layout
-
The
ClearAreaLayout
class no longer produces results where the specified area is not cleared for some input graphs when propertyClearAreaStrategy
is set toPreserveShapes
orPreserveShapesUniform
. -
The
ClearAreaLayout
class now correctly considers the initial partition grid assignment of nodes.
Orthogonal Layout
-
The
OrthogonalLayout
class no longer produces bad edge routes where the path is non-orthogonal and does not connect to the source node anymore for some rare cases containing parallel edges or chain substructures. -
The
OrthogonalLayout
class now correctly considers the specified minimum group node sizes (seeGroupingKeys.MinimumNodeSizeDpKey
). Previously, the minimum sizes were always enlarged by the groups' insets (seeGroupingKeys.GroupNodeInsetsDpKey
). Actually, the minimum size should include the insets. -
The
OrthogonalLayout
class now correctly handles input graphs with parallel edges if thePreferParallelRoutes
property is enabled. Previously, such inputs have caused exceptions in some rare cases.
Edge Router
-
The
EdgeRouter
class now correctly interprets specified intermediate points (EdgeLayoutDescriptor.IntermediateRoutingPoints
) as well as bus points (BusDescriptor.BusPoints
) in the case when the algorithm runs inside an orientation layout with an orientation other thanTopToBottom
. -
The
EdgeRouter
class now correctly considers the maximum duration and theAbortHandler
when the octilinear routing style is chosen. Previously, it could happen that the algorithm kept on running even though the time was up. -
The
EdgeRouter
class no longer throws an exception for some rare cases with collinear bends. -
The
EdgeRouter
class now correctly handles direct content edges that are incident to group nodes withPortCandidateSets
.
Generic Labeling
-
The
GenericLabeling
class no longer produces superfluous label overlaps if one of itsRemoveNodeOverlaps
orRemoveEdgeOverlaps
properties is enabled.
Layout
-
TableLayoutConfigurator
now considers the correct \OriginalPosition
of the \RowDescriptor
and \ColumnDescriptor
when table insets are used. -
The
TableLayoutConfigurator
class now treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception. -
CurveRoutingStage
now correctly uses theMinimumNodeToEdgeDistance
from the edge layout descriptor. -
EdgeRouter
now indeed stops more reliably close to its maximum duration. This has been reported as improved before, but did not actually work. -
The
PolylineLayoutStage
class now correctly considers a registeredAbortHandler
instance so that it is possible to terminate early. Previously, the stage ignored theAbortHandler
. -
The
TabularLayout
class now always uses the correct bounding box values for node labels that are considered. Previously, wrong label bounds could lead to unnecessarily large rows or columns. -
The
IsolatedGroupComponentLayout
class no longer produces unnecessarily large group nodes if the specifiedGridSpacing
is zero.
Incompatible Changes
API
-
Due to the new
Install
andUninstall
methods of theModelManager
class, the following of its members have been changed:- The
CanvasControl
constructor parameter has been removed. Instead, you can call the newInstall
method with theCanvasControl
as parameter. Similarly, theCanvasControl
constructor parameters of the derived classes have been removed, too. - Its existing protected methods
Install
andUninstall
have been renamed toInstallItem
andUninstallItem
. - Its protected methods
Add
andRemove
have been renamed toAddItem
andRemoveItem
.
- The
-
The optional
SelectionModel
andModel
parameters ofHighlightIndicatorManager
andSelectionIndicatorManager
have been removed from the constructors, too. Instead, you can set the corresponding properties directly. -
The
NavigationInputMode.AdjustGroupNodeLocation
method has now an additional parameterexpandedSize
that specifies the size of the group node when it is expanded. -
yWorks.Layout.LayoutMultiplexer
: ThegetCoreLayout
method has been renamed toGetCoreLayout
. -
yWorks.Layout.Multipage.MultiPageLayout
: ThecalculateLayout
method has been renamed toCalculateLayout
. -
yWorks.Layout.Organic.OrganicLayout
: TheconfigureComponentLayout
method has been renamed toConfigureComponentLayout
. -
The
LabelCreator.AddLabel
method can returnnull
if no label is added. -
The
LabelCreator.UpdateLabel
method now returns a boolean value:true
if the label has been updated,false
if the label should be removed. -
The
IHandle
interface has a new methodHandleClick
. This method must be implemented by custom handle implementations. -
The
WeakDictionaryMapper
<K, V> now is constrained to reference types as keys. -
The
DataProviderAdapter.Defined
method has been removed since it had no effect. -
The
NodeLabelingPolicy
enum has been moved fromyWorks.Layout.Tree
toyWorks.Layout
. The reason is that the policy is now not only supported byBalloonLayout
but also byCircularLayout
,RadialLayout
andCactusGroupLayout
. -
The type of the
EdgeCellInfo.CellSegmentInfos
property has been changed fromYList
to
.CellSegmentInfo
[] -
The
HierarchicLayoutData.SubComponents
property is replaced by the newHierarchicLayoutData.Subcomponents
property with a different signature. The new property uses instances of the newSubcomponentDescriptor
class to define subcomponents, and the layout algorithm responsible for a component is now specified via the newSubcomponentDescriptor.LayoutAlgorithm
property. -
Similarly, the data provider keys
HierarchicLayout.SubComponentIdDpKey
andHierarchicLayout.SubComponentLayoutAlgorithmDpKey
are replaced by the new keyHierarchicLayout.SubcomponentDescriptorDpKey
that assigns instances of the newSubcomponentDescriptor
class to nodes. -
The
TemporaryGroupNodeInsertionData.Components
property is replaced by the newTemporaryGroups
property of typeTemporaryGroupDescriptor
, which now specifies groups and the applied recursive group layout algorithm. -
Similarly, the data provider key
TemporaryGroupNodeInsertionStage.ComponentLayoutAlgorithmDpKey
was removed and the name of the keyTemporaryGroupNodeInsertionStage.ComponentIdDpKey
was changed toTemporaryGroupDescriptorDpKey
.
Styles
-
The property
DefaultLabelStyle.ClipText
does not influence the text wrapping behavior anymore but is only used to clip any text outside the label bounds.
Changes of Default Behavior
-
Licensing via the License Compiler now only works for .NET Framework. Previously,
using a
.licx
file in the project would still work with .NET 5 and earlier when building in Visual Studio (though not on the command line). The recommended way to embed theyFiles.NET
license is adding the licenseXML
file as an embedded resource, which will work reliably in all supported platforms and target frameworks. -
The semantic of the
TraversalDirection.Both
enumeration value used by theNeighborhood
andBfs
algorithms has been changed and does not ignore the direction anymore, but now returns a union of theSuccessor
and thePredecessor
results instead. The old behavior can be restored by using the newTraversalDirection.Undirected
enum value. Consequently, the default value of theTraversalDirection
property of both theNeighborhood
and theBfs
algorithm has been changed fromBoth
toUndirected
. -
With the graph builder classes, label bindings which don't provide label data (or provide
null
) no longer add empty labels. Instead, no label will be added. Similarly, for label sources, no label will be added for data items for which theLabelCreator.TextProvider
returnsnull
. -
When starting to drag the handle of a selected item, the handle isn't replaced anymore by a new
handle instance provided for the selected item. Previously, this happened automatically, regardless of whether
necessary to support use cases where state changes should result in a different handle instance. Now, the
GraphEditorInputMode.RequeryHandles
method has to be called explicitly when changes are made that affect handles that are potentially already visible. Alternatively, a proxy implementation can be used that dynamically dispatches to new instances on its own when required. -
The
HandleInputMode
class doesn't initialize a handle drag as soon as the handle is pressed, anymore. Instead, it waits until theDraggedRecognizer
orDraggedRecognizerTouch
is triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting theRequestMutexOnPress
property tofalse
. -
The lists returned by the
GraphPartition.GetCells
,DynamicObstacleDecomposition.GetCells
andDynamicObstacleDecomposition.GetObstacles
methods are no longer unmodifiable.
Deprecations
-
The
BevelNodeStyle
,ShinyPlateNodeStyle
, andPanelNodeStyle
classes and their renderers are now deprecated. Their appearance is rather outdated, and some of them are not very configurable. For group nodes, have a look at the newGroupNodeStyle
class.
Demo Improvements
Improvements
-
The
ZOrder
demo'sZOrderSupport
does not use custom overrides ofGraphEditorInputMode
,GraphModelManager
, andGraphMLIOHandler
anymore. That way, using theZOrderSupport
class in other applications that already use a customGraphEditorInputMode
orGraphModelManager
is now easier.
New Demos
-
The Arrow Node Style Demo shows the new
ArrowNodeStyle
and its setting options. -
The Rectangle Node Style Demo shows the new
RectangleNodeStyle
and its setting options. -
The Shape Node Style Demo shows the shapes that are available for the
ShapeNodeStyle
. -
The Default Label Style Demo shows the background shapes that are now available for the
DefaultLabelStyle
. - The Text Wrapping Demo shows the various options of the new text wrapping feature for labels.
- The Simple Arrow Demo shows how to implement a custom arrow.
- The Sankey demo shows how to visualize flow information in which the thickness of the edges is proportional to the flow quantity.
yFiles.NET 5.4.0.2
Improvements
Hierarchic Layout
-
The
HierarchicLayout
class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (propertyHierarchicLayout.RecursiveGroupLayering
). Previously, such constraints were ignored in that case.
Bugfixes
Graph
-
Fixed a bug in
FilteredGraphWrapper
'sNodeRemoved
event where the provided old parent might have been present in the wrapped graph but not in the filtered graph.
Interaction
-
After pasting, a closed group node within another closed group now stays closed. Previously, it
was open due to a bug in the
GraphClipboard
class.
View
-
Fixed a bug that resulted in a
NullReferenceException
whenHierarchicNestingPolicy.GroupNodes
,LabelLayerPolicy.AtOwner
and undo support were used together. -
Viewport animations no longer suddenly stop when the zoom level is near
CanvasControl.MinimumZoom
orMaximumZoom
.
Generic Labeling
-
The
GenericLabeling
class no longer produces superfluous label overlaps if one of itsRemoveNodeOverlaps
orRemoveEdgeOverlaps
properties is enabled.
Orthogonal Layout
-
The
OrthogonalLayout
class now correctly considers the specified minimum group node sizes (seeGroupingKeys.MinimumNodeSizeDpKey
). Previously, the minimum sizes were always enlarged by the groups' insets (seeGroupingKeys.GroupNodeInsetsDpKey
). Actually, the minimum size should include the insets.
Hierarchic Layout
-
The
SimplexNodePlacer
class used by theHierarchicLayout
no longer throws an error due to an internal overflow for very wide layouts.
Layout
-
The
TabularLayout
class now always uses the correct bounding box values for node labels that are considered. Previously, wrong label bounds could lead to unnecessarily large rows or columns. -
The
IsolatedGroupComponentLayout
class no longer produces unnecessarily large group nodes if the specifiedGridSpacing
is zero.
yFiles.NET 5.4.0.1
Bugfixes
Interaction
-
TableEditorInputMode
no longer changes theGraphControl
'sSelection
property unnecessarily whenGraphControl
'sGraph
property is changed. -
HandleInputMode
is no longer canceled if a handle is removed during its ownDragFinished
call. This fixes some very rare exceptions under complicated circumstances. -
CreateEdgeInputMode
now correctly toggles the direction of an orthogonal edge segment when the mouse is over a potential target.
Licensing
-
License validation no longer fails when dynamic assemblies are loaded or yFiles code is called
indirectly from dynamic methods. This could have resulted in licensing failures, e.g. when using yFiles in
ASP.NET
web services.
Graph
-
The
FilteredGraphWrapper
class now raises the correct events when filtering out port labels. Previously, the events contained incorrect owner information. -
The
CompositeUndoUnit.UndoName
property now indeed sets the undo name, not the redo name.
Styles
- The built-in styles with rounded corners now have the correct outline shape for all calculations.
- Edges with Bézier paths can now also be animated into non-Bézier paths.
-
Edge cropping now works as expected when using the
BezierEdgeStyle
class and the terminating nodes have styles that do not provide an outline in theirIShapeGeometry
implementation.
Hierarchic Layout
-
The
HierarchicLayout
class now correctly considers the specified halos of group nodes when there is a partition grid defined. -
The
HierarchicLayout
class no longer produces misplaced edge labels for some rare cases with grouped edges. -
The
HierarchicLayout
class no longer generates broken non-orthogonal edge segments of same-layer edges for some cases in conjunction with integrated edge labeling and edge labels placed at the ports. -
The
HierarchicLayout
class now correctly routes grouped edges, where previously there could be overlaps of nodes and edges in some rare cases. -
The
HierarchicLayout
class now properly satisfiesPortCandidates
defined for same-layer edges at nodes where other edges with (rather large) source/target port labels additionally exist. -
The
HierarchicLayout
class now produces a correct edge grouping structure for short edges having the same source and target group ID. -
The
HierarchicLayout
class no longer throws an exception when the edge-directedness feature (HierarchicLayoutData.EdgeDirectedness
) is used in conjunction with enabled back-loop routing (HierarchicLayout.BackLoopRouting
). -
The
HierarchicLayout
class no longer creates unnecessary spacing between sub-components (seeHierarchicLayoutData.SubComponents
) and other elements. This previously happened in some cases due to edge/node labels being present. In consequence, these cases are now more compact. -
The
HierarchicLayout
class no longer produces overlaps between (large) external node labels and unrelated edges. -
The
HierarchicLayout
class no longer produces overlaps between sub-component elements (seeHierarchicLayoutData.SubComponents
) and edges that are not part of the component. -
The
HierarchicLayout
class no longer produces superfluous port overlaps if there are edges with strong port constraints. -
The
HierarchicLayout
class now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled (see propertyHierarchicLayoutData.UniformPortAssignmentGroups
) for some cases where it previously did not yield a uniform port distribution. -
The
HierarchicLayout
now correctly considers thePreferredPlacementDescriptor
settings of an edge label when there are additionally edge groupings defined. Previously, it could, for example, happen that the edge label was placed on the wrong side of the edge.
Organic Layout
-
The
OrganicLayout
class now correctly considers the specifiedPartitionGrid
if substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored. -
The
OrganicLayout
class now produces correct results if auto-clustering is enabled (i.e., itsClusteringPolicy
property is notNone
) and theGroupNodeMode
property is set toFixBounds
orFixContents
. -
The
OrganicLayout
class now correctly considers fix-contents and fix-bounds groups (see enumGroupNodeMode
) if the substructure detection is enabled. -
The
OrganicLayout
class now correctly handles nodes with several degree-one neighbors. Previously, such inputs could cause arrangement artifacts if theStarSubstructureStyle
wasNone
. -
The
OrganicLayout
class now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData.NodeTypes
).
Orthogonal Layout
-
The
OrthogonalLayout
class now correctly handles input graphs with parallel edges if thePreferParallelRoutes
property is enabled. Previously, such inputs have caused exceptions in some rare cases.
Circular Layout
-
The
CircularLayout
class no longer crashes when applying it on a graph that contains parallel edges and both edge bundling is enabled and node types are defined. -
The
CircularLayout
class no longer produces node overlaps if theSingleCycleLayout.MinimumNodeDistance
property is set to 0.
Clear Area Layout
-
The
ClearAreaLayout
class now correctly considers the initial partition grid assignment of nodes. -
The
ClearAreaLayout
class now correctly routes the edges if itsEdgeRoutingStrategy
property is set toStraightline
. Previously, in some rare cases, this setting could cause broken edge routes.
Partial Layout
-
The
PartialLayout
class now correctly routes the edges if itsAllowMovingFixedElements
property is enabled. Previously, in some rare cases, this setting could cause broken edge routes.
Edge Router
-
The
EdgeRouter
class no longer produces artifacts if there are edges with curved routing style and labels, and the integrated edge labeling is disabled (see propertyEdgeRouter.IntegratedEdgeLabeling
). -
The
EdgeRouter
class now correctly handles direct content edges that are incident to group nodes withPortCandidateSets
.
Layout
-
TableLayoutConfigurator
now considers the correctOriginalPosition
s of theRowDescriptor
s andColumnDescriptor
s when table insets are used. -
TableLayoutConfigurator
now treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception. -
EdgeRouter
now correctly considers octilinear segments when using theSegmentsAsNeeded
orPathAsNeeded
RoutingPolicy
enumeration value. -
The graph's
UndoEngine
no longer gets corrupted after an exception in a layout algorithm has been raised and caught. -
The
TabularLayout
class now correctly handles the case that the input graph contains only a single node. Previously, the node was not properly assigned to a partition cell and the partition cell row/column did not get correct values for its computed width, height and position.
View
-
Changing the
GraphControl.GraphModelManager
property no longer leaks memory in certain situations. -
The
CanvasControl.ZoomToAnimated
method now works correctly when aCanvasControl.Projection
is set. This has previously been reported as fixed, but was not. -
Fixed a bug in
ContextConfigurator
which resulted in misplaced decorations if the decorations were rendered in view coordinates and a scale value other than 1 was used. -
Fixed an
OutOfMemoryException
which could occur if nodes with a width or height < 1e-6 were rendererd.
yFiles.NET 5.4
This release brings a couple of exciting new major features and lots of other smaller new features, improvements, and bugfixes for all parts of the library.
Major New Features
- Smooth viewport animations
-
Many viewport transitions are now smoothly animated. This prominently includes scrolling and zooming with the mouse wheel, but also the various commands, such as zooming via a toolbar button, fitting the graph into the viewport, interacting with the overview, and many others. This can be turned off for individual interactions via the new
CanvasControl.AnimatedViewportChanges
property, and customized with the new protected methodCanvasControl.GetViewportAnimationDuration
. - Support Nodes of Different Types in Layout
-
Many of the yFiles layout styles now support node types. Typically, a layout places nodes of the same type closer together or in a similar way. The following layout styles support node types:
In the
HierarchicLayout
class, types influence the ordering of nodes within their layers as a subordinate optimization criteria. More precisely, nodes of the same type are more likely to be placed next to each other if this does not violate other constraints.For the
TreeLayout
andClassicTreeLayout
classes the types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are a weak criterion, i.e., if the ordering and placement is determined by other constraints, these are prioritized. Types can be defined via theTreeLayoutData.NodeTypes
property.The
OrganicLayout
class now allows to define node types via the newOrganicLayoutData.NodeTypes
property . The types control the detection of substructures (e.g. stars, parallel structures). When types are defined, only nodes of the same type can form a substructure. For star-like and parallel substructures, it is also possible to have a single substructure with nodes of different types, see propertiesParallelSubstructureTypeSeparation
andStarSubstructureTypeSeparation
. The algorithm still tries to highlight the different types by choosing a suitable layout for these components (e.g., placing nodes of the same type closer together or on the same circle).The
OrthogonalLayout
class now allows to define node types via the newOrthogonalLayoutData.NodeTypes
property. The types control the detection of substructures, i.e., chains, cycles and trees. When types are defined, only nodes of the same type can form a substructure.The
CircularLayout
class is now able to separate nodes that are on the same cycle with respect to their node type. For this, the newNodeTypeAwareSequencer
class can be set asNodeSequencer
on theCircularLayout.SingleCycleLayout
. Node types are specified via theCircularLayoutData.NodeTypes
property.The
ComponentLayout
class now supports node types. The types influence the arrangement and ordering of the the components such that components consisting mostly of nodes of the same type are put close to other components consisting of nodes of that type. Use theComponentLayoutData.NodeTypes
property to define types.The node types feature is shown in the new
Node Types Demo
. - Edge Routing Only if Needed
-
Optionally, the
EdgeRouter
,ChannelEdgeRouter
andBusRouter
classes now automatically determine whether or not a new path should be calculated for a certain edge. This is controlled via the new propertiesEdgeRouterEdgeLayoutDescriptor.RoutingPolicy
,ChannelEdgeRouter.RoutingPolicy
andBusRouterBusDescriptor.RoutingPolicy
, respectively. The decision is based on the quality of the existing routes - edges with strict violations of the routing style or that intersect other elements will be selected for routing. Available options:-
RoutingPolicy.Always
: A new route is calculated in any case. This was the previous behavior and remains the default. -
RoutingPolicy.PathAsNeeded
: The algorithm determines whether a new route is needed. If an edge is selected, its current path is not considered when computing a new route. -
RoutingPolicy.SegmentsAsNeeded
: The algorithm determines whether a new route is needed. If an edge is selected, its current path is preserved as much as possible. Only the required segments are changed. This is only supported by theEdgeRouter
class.
The new penalty property
PenaltySettings.SketchViolationPenalty
supported by theEdgeRouter
class defines the cost for a deviation from the original edge path if the new routing policy property is set toSegmentsAsNeeded
. -
- Support for .NET 6.0
- To facilitate using our library with .NET 6.0 and to improve compatibility a .NET 6.0 version of the library has been added. Also, the demo and tutorial samples now automatically reference the highest .NET SDK which is available on the current machine.
New Features
View
-
The new
EdgePathPortLocationModel
for ports owned by edges can be used to define port locations as a ratio of the edge path length. This keeps the port location stable when bends are added onto the edge path, for example during orthogonal edge editing. -
Added a mechanism to support disposing and caching Visuals which are created by
IVisualCreator.CreateVisual
:- Added methods
SetDisposeCallback
,ChildVisualRemoved
, andRegisterForChildrenIfNecessary
to support the registration of a callback for disposal. - Added the delegate
DisposeVisualCallback
for this purpose.
- Added methods
Analysis
-
The new
TreeAnalysis
algorithm offers a convenient way of analyzing tree structures and querying tree-related properties (e.g. leaf nodes, parent-child relations and more).
GraphBuilder
-
The graph and tree builders now support bindings for bend locations. This is implemented by new
bend-related members of the
EdgeCreator
class.
Algorithms
-
The new
ParallelEdges.FindParallelEdges
method allows to find all sets of parallel edges contained in a given graph or incident to a specific node.
Layout
-
The new
GenericLayoutData
class is a generic implementation ofLayoutData
that allows to pass arbitrary data to layout stages. As a consequence, theLayoutData.Apply
,ItemCollection.ProvideMapper
andItemMapping.ProvideMapper
methods were removed. -
The new
SelfLoopRouterData
class specifies custom data for theSelfLoopRouter
class. In more details, it allows to define which self-loop edges should be routed and which should keep their current path. -
The new
PortPlacementStageData
class specifies custom data for thePortPlacementStage
class. In more details, it allows to define port candidates, port constraints, and node port candidate sets which are then considered by that layout stage. -
The
SubgraphLayout
class now allows to define which edges must be included or excluded in the subgraph. Previously, only nodes could be specified. The newSubgraphLayoutData
class offers theSubgraphNodes
andSubgraphEdges
properties to conveniently define the nodes and edges that should form the subgraph the core layout runs on. -
The
OrganicLayout
class offers the newClusteringPolicy
property, which allows to specify the clustering algorithm that is applied to the input graph. Three clustering algorithms are available: Louvain modularity, edge betweenness, and label propagation. Previously, the node clustering was always based on edge betweenness. By default, clustering is disabled. -
The
PartialLayout
class offers a new propertyMoveFixedElements
to allow moving fixed elements. This often yields a better layout quality even though the preservation of the mental map declines because the fixed elements may change their position. -
The
OrganicLayout
andClassicOrganicLayout
classes support the new scopeMainlySubsetGeometric
. In addition to the actual affected nodes, this scope may to some degree move nodes that are geometrically close to an affected node. The existing scopeMainlySubset
is similar, but it does determine the closeness of other nodes by using the graph structure instead of the current geometry (i.e. location).
New Demos
-
The new
LensInputMode
demo shows how to create anInputMode
to show a magnifying glass effect on the canvas. -
The new
Neo4JIntegrationDemo
shows how theNeo4J.Driver
library can be included in yFiles applications to create diagrams fromNeo4J
databases. -
The new
NodeTypes
demo shows how to use the node type support of the yFiles layout algorithms.
Improvements
Interaction
-
The new
HandleInputMode.QueryClosestHandle
event can be used to provide the closest handle for a certain query location. -
Tooltip contents can now be provided asynchronously. As an alternative to setting the tooltip
content directly, the
ToolTipQueryEventArgs
class also accepts aTask
that provides the tooltip content asynchronously. -
The
HandleInputMode.BeginDragging
method now returns aTask
which indicates whether the drag of a handle has been finished or canceled. -
Validation of the text of edited labels can now be provided asynchronously. The new
LabelTextValidationEventArgs.ValidatedText
property accepts aTask
that provides the validated text asynchronously. - Changing the selection state of a large number of elements is now faster.
-
The
OrthogonalEdgeEditingContext.CreateOrthogonalEdgeDragHandler
method now accepts anIPortOwner
instead of only anINode
as dragged item. This can be used for custom edge drag handling that should support orthogonal edge editing. -
The
ItemCopiedEventArgs
class now guarantees that itsOriginal
andCopy
properties are notnull
.
Graph
-
The
DefaultFolderNodeConverter
andFoldingEdgeConverterBase
classes now havePortLabelStyle
andPortLabelLayoutParameter
properties to control the style and label layout parameter of copied port labels. -
The new
NodeInsetsProvider
class is anINodeInsetsProvider
that returns the same insets for each node.
View
-
The
CanvasControl.EnsureVisible
,CanvasControl.FitContent
, andGraphControl.FitGraphBounds
methods now return aTask
that completes when the view port adjustment has been finished. -
The new
Install
andUninstall
methods of theGraphModelManager
class simplify exchanging the manager used by aGraphControl
. They are called when setting/removing aGraphModelManager
asGraphControl.GraphModelManager
and should also be called when combining aGraphModelManager
with aCanvasControl
. -
The new
Animations.CreateDelay
method creates an animation that does nothing. This is especially useful in combination with other animations that run in parallel or in sequence to create complex multi-sequence animations. The accompanying extension methodCreateDelayedAnimation
for theIAnimation
interface delays the provided animation. -
The
CanvasControl.EnsureVisible
method now respects margins defined by theCanvasControl.ContentMargins
property . Ensure visible is called for example by keyboard navigation,. -
The
Zoom
command now respects margins defined by theCanvasControl.ContentMargins
property when executed with a rectangle as parameter. -
The
ZoomToCurrentItemCommand
now respects the margins defined in theCanvasControl.ContentMargins
property. -
Setting the various descriptor properties of the
GraphModelManager
class no longer causes updates for every installed item if the descriptor hasn't actually changed. -
The
OverviewInputMode
now renders its handle on top of the viewport rectangle instead of below it. -
The
ViewportLimiter.LimitViewport
method now has an optional parameter that enforces theViewportLimitingPolicy.Strict
policy. -
The
CanvasControl.EnsureVisible
method now has an additional parameter to specify insets to keep around what to make visible in the viewport. -
The
CanvasControl.EnsureVisible
method now has an additional overload to make a set of points visible in the viewport. This is mainly useful when using a Projection and trying to make something visible that is not a rectangle in world coordinates. -
All of the following features no longer block user interaction: the viewport animations for
CanvasControl.EnsureVisible
, executing scroll commands when theCanvasControl.AnimateScrollCommands
property is enabled, and executingGraphControl.ZoomToCurrentItemCommand
. -
The
CanvasControl.FitContent
andGraphControl.FitGraphBounds
methods now have an optional parameter that allows changing the viewport in an animated fashion. -
TextVisual
has a new propertyMaximumSize
. Text will be clipped if a value is set and the text is larger than that value. -
The
PixelImageExporter
'sSmoothingMode
,TextRenderingHint
, andInterpolationMode
properties now default to high quality rendering.
GraphBuilder
-
The
GraphBuilder
,TreeBuilder
, andAdjacencyGraphBuilder
classes no longer throw Exceptions during calls toUpdateGraph
when the graph was modified.
Hierarchic Layout
-
The
HierarchicLayout
class now has an improved strategy for choosing the port candidates for same-layer edges with multiple available candidates. Previously, the chosen candidate may have led to superfluous back-loops. -
The
HierarchicLayout
class now generates shorter paths for edges that cross borders ofPartitionGrid
columns in cases where there are no other obvious constraints that require the edge to be longer. This holds for the default vertical layout orientation; for a horizontal orientation, edges that cross borders of rows are affected by this improvement. -
The
HierarchicLayout
class now considers the edge direction when choosing a port candidate for edges with multiple candidates. This new strategy often leads to less bends.
Organic Layout
-
For the substructures in the
OrganicLayout
it is now possible to explicitly specify whether structures are allowed to be nested or not. Previously, substructures were allowed to be nested by default. New styles were added while the old styles now will not generated nested structures anymore.- Star structures offer the new styles
StarSubstructureStyle.RadialNested
andStarSubstructureStyle.CircularNested
. ChainSubstructureStyle.RectangularNested
andChainSubstructureStyle.StraightLineNested
are the new styles for nested chains.CycleSubstructureStyle.CircularNested
is the new style for nested cycles.
- Star structures offer the new styles
-
The
OrganicLayout
class now offers the possibility to define the minimum sizes of substructures (stars, chains, cycles and parallel structures). Structures of smaller size are not handled as a substructure. For each type of structure a new property was added:OrganicLayout.StarSubstructureSize
,OrganicLayout.ChainSubstructureSize
,OrganicLayout.CycleSubstructureSize
andOrganicLayout.ParallelSubstructureSize
. -
With substructures, the
OrganicLayout
class now often produces more compact results and comes with an improved placement of degree-one nodes. -
When specified for the
OrganicLayout
class, the scopeMainlySubset
now works together with more of its other features and constraints, and has a larger impact. For example, it previously had very little or no effect when a partition grid or an output restriction was defined.
Edge Routing
-
When the
EdgeRouter
class runs with a highly restricted maximum duration or is aborted via theAbortHandler
class, i.e., the router operates in the fastest possible mode, the calculated edge routes now are of higher quality. The quality improvements mainly affect cases with fixed port locations. -
The
EdgeRouter
class now allows to explicitly define the costs for different types of edge crossings. The new propertiesPenaltySettings.AdjacentEdgeCrossingPenalty
andPenaltySettings.SelfCrossingPenalty
relate to crossings between two adjacent edges and crossings between two line segments that belong to the same edge, respectively. Previously, all types of crossings were covered by the existingEdgeCrossingPenalty
property.- By default, now, crossings of adjacent edges are more expensive than normal ones and self-crossings are the most expensive.
- Furthermore, the default values of the
EdgeLengthPenalty
andGroupNodeCrossingPenalty
properties were increased to obtain more balanced results.
-
The
EdgeRouter
class now produces more suitable routes for edges with octilinear routing style. Previously, the diagonal segments where often omitted after/before an edge's first/last segment.
Layout
-
The new
BalloonLayoutData.OutEdgeComparer
property specifies a comparison function used to sort a nodes' outgoing edges. -
The new
LayoutGraphAdapter.OriginalTagDpKey
data provider key provides access to the object stored in thetag
property of the original graph item from within custom layout code. -
The quality of the curved edge routing was improved with respect to various aspects and such that
it yields aesthetically nicer curves. To further configure the curve routing, the following settings were added.
CurveShortcuts
: if shortcuts are allowed, curves can become smoother and more direct but may violate other constraints (e.g. edge-edge distance). Available forHierarchicLayout
(RoutingStyle.CurveShortcuts
),EdgeRouter
(EdgeLayoutDescriptor.CurveShortcuts
) andCurveRoutingStage
(CurveEdgeLayoutDescriptor.CurveShortcuts
).CurveUTurnSymmetry
: allows to specify the symmetry preference for u-turns (180 degree turns) of curved routes. The default is zero so that results are equal to previous results. Available forHierarchicLayout
(RoutingStyle.CurveUTurnSymmetry
),EdgeRouter
(EdgeLayoutDescriptor.CurveUTurnSymmetry
) andCurveRoutingStage
(CurveEdgeLayoutDescriptor.CurveUTurnSymmetry
).
-
The
HierarchicLayout
,EdgeRouter
, andCurveRoutingStage
classes now avoid unnecessary, consecutive Bezier segments for modeling larger straight-line parts of an edge path. The resulting reduced bend count improves the user experience when working with theBezierEdgeStyle
. -
The
ClassicTreeLayout
class now features propertiesMinimumFirstSegmentLength
andMinimumLastSegmentLength
that allow to specify the minimum first and last segment length for the orthogonal routing style. -
The new
ParallelEdgeRouterData.RoutedParallelEdges
property returns which edges theParallelEdgeRouter
class routed and thus were hidden during the core layout. This can be useful if parallel, non-leading edges need further handling, e.g., for placing their labels.
Demo Improvements
-
The demo and tutorial projects for .
NET
Framework have been updated to target the most recent .NET
FrameworkSDK
. -
The .
NET
demos and tutorials now automatically reference the newest .NET
SDK
which is available on the machine they are installed on.
Bugfixes
View
- The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
-
The clipboard now doesn't copy labels or ports if they are not selected and their owner's
IClipboardHelper
forbids copying the owner. -
The
ZoomToCurrentItem
command no longer moves the current item outside the visible area in rare cases. This was caused by a problem in theViewportLimiter
class. -
Callbacks registered for removed visuals on the
CanvasObject
tree now reliably run after the visual is indeed no longer visible. -
Callbacks registered with the
IRenderContext.SetDisposeCallback
method now are reliably called, even when a canvas object has been explicitly removed. -
The
CanvasControl.EnsureVisible
method no longer ignores the limited viewport size in certain cases. -
The Scale is honored for the
VisibilityThreshold
of theGridVisual
. -
EmfImageExporter
now properly extends the background brush into the margins.
Interaction
-
When expanding a closed group, the parent groups of the expanded group no longer become
unnecessarily large. The incorrect behavior could be observed only under certain conditions and was caused by a bug
in the
NavigationInputMode
class. - Auto dragging was not stopped in certain cases.
-
The text box shown by the
TextEditorInputMode
class is now correctly placed if theTextBoxPlacementPolicy.MoveTextBox
is set and a projection is used. -
Fixed editing self-loops with
PolylineEdgeStyle
and orthogonal edge editing enabled.
Graph
-
The
ITable.StripeChanged
event now reports the correct parent when re-parenting will be undone or redone. -
A label with
EdgeSegmentLabelModel
orEdgePathLabelModel
now moves steadily when the segment to which it belongs moves. -
The
FilteredGraphWrapper
class now dispatchesParentChanged
events in the correct order after predicate changes. -
All
SetFactory
methods of theNode
-,Edge
-,Label
-,Port
-, andBendDecorator
classes now respect theNullIsFallback
property.
Styles
-
The parameter of type
IShapeGeometry
of theDefaultEdgePathCropper.IsInside
andGetIntersection
methods is now nullable.
Geometry
-
The
Area
property of an emptyRectD
instance (includingRectD.Empty
) is now always zero, and no longer a negative value.
Hierarchic Layout
-
The
HierarchicLayout
class no longer produces an infinite looping issue in the incremental layout mode for some input graphs with layer constraints that specify that a node should be placed in the topmost/bottommost layer. -
The
HierarchicLayout
class no longer produces unnecessary edge crossings between self-loop edges at the same node in cases where a larger number of self-loops exist at a node. -
The
HierarchicLayout
class no longer ignores edges connected to group nodes when the group node contains a bus structure (seeHierarchicLayoutData.Buses
) and no other elements. Such edges were previously actually removed from the layout graph such that other stages (e.g. theComponentLayout
) could have failed with an exception. -
The
HierarchicLayout
class no longer occasionally throws an exception when enablingHierarchicLayout.CompactGroups
and in conjunction with layering constraints and/or a group node marked as incremental. -
The
HierarchicLayout
class does no longer violate the specified minimum length for edges incident to group nodes. -
The sequencing phase of the
HierarchicLayout
class is now faster for large graphs with sequence constraints and non-incremental layout mode.
Edge Routing
-
The
BusRouter
class now produces more suitable edge routes for rare cases that were caused by an unsuitable bus placement. -
The
EdgeRouter
class now uses the given ports for edges of a bus with fixed edges. -
The
EdgeRouter
class now correctly considers edges incident to a fixed inner port of a group node when the routing algorithm has restricted maximum duration. Previously, this setup sometimes led to strange edge routes with many superfluous bends. -
The
CurveRoutingStage
class now correctly considers the minimum distance to nodes specified as value of theCurveEdgeLayoutDescriptor.MinimumNodeToEdgeDistance
property. Previously, the curves could violate the distance and get too close to nodes. -
The
EdgeRouter
class no longer contains edges with self-crossings in some rare cases where it previously failed to eliminate them. -
The
EdgeRouter
andCurveRoutingStage
classes no longer change the path of unaffected (fixed) edges when theCreateControlPoints
property of their associatedEdgeLayoutDescriptor
instance (CurveEdgeLayoutDescriptor
respectively) is enabled. -
The
EdgeRouter
class now correctly supports the use case that a subset of edges is routed with the curved routing style while another subset is routed with another routing style and different settings on the associated individualEdgeLayoutDescriptor
instances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used. -
The
OrthogonalSegmentDistributionStage
class does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that theChannelEdgeRouter
class is affected too, as the stage is by default called from within the router. -
The
EdgeRouter
class no longer has a problem that appeared with a bus containing affected as well as non-affected (fixed) edges at the same time. Previously, this could trigger an Exception or lead to the incorrect behavior that an actually affected other edge was not routed. -
The
EdgeRouter
class no longer occasionally throws an exception if the input contains bus edges defined viaBusDescriptor
. -
The
BusRouter
class no longer fails to generate connected buses for cases with fixed and incremental edges on the same bus. Previously it sometimes generated a disjoint bus even though the bus IDs were equal. -
The
BusRouter
class no longer ignores edges that should be routed when a they are on a bus with fixed edges (seeBusDescriptor.Fixed
property) and when they share both source and target port with a fixed edge. -
The
EdgeRouter
class no longer has a problem that occasionally resulted in bad edge routing artifacts if edge grouping is enabled and non-affected edges are grouped at both end points.*. -
The
ParallelEdgeRouter
class no longer throws an exception if the input has both a large number of parallel edges and a leading edge with ports on the node border. -
The
EdgeRouter
class no longer occasionally throws an exception if the input contains bus edges (defined viaBusDescriptor
). -
The
OrganicEdgeRouter.KeepExistingBends
property now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends.
Layout
-
The comparison delegates defined in
TreeLayoutData.OutEdgeComparers
andSeriesParallelLayoutData.OutEdgeComparers
no longer receivenull
elements during runtime. -
The
SimpleProfitModel
class now computes meaningful different profits based on thePreferredPlacementDescriptor
for candidates that belong to aSliderEdgeLabelLayoutModel
or aDiscreteEdgeLabelLayoutModel
. Previously, the computed profit was equal for all candidates. -
Fixed a bug in
LayoutExecutor
which caused port labels not to be placed in their calculated position after a layout animation. -
The
LayoutExecutor
class now uses the correct target bounds when a projection is set on theGraphControl
. -
The
OrganicLayout
class no longer throws an exception when running it on a graph with a partition grid, group nodes and such that the IDs of the group nodes (see provider keyGroupingKeys.NodeIdDpKey
) are defined using a provider that cannot handlenull
as argument to its get method. -
The
OrganicLayout
andClassicOrganicLayout
classes no longer cause undesired layout side effects when a mapper is registered with keyRecursiveGroupLayout.GroupNodeLayoutDpKey
or when data is provided via theRecursiveGroupLayoutData.GroupNodeLayouts
property. Previously, the layout algorithms registered there could be applied to nodes that should actually be kept fix by the organic layout. -
The
HierarchicLayout
class now correctly considers the specified port groups for edges (seeHierarchicLayoutData.SourcePortGroupIds
). Previously, such groups were not always considered properly if there are either critical edges or propertySimplexNodePlacer.StraightenEdges
is enabled. -
The
HierarchicLayout
class now correctly handles grouped input graphs if the node compaction is enabled (see propertySimplexNodePlacer.NodeCompaction
). Previously, the algorithm sometimes produced less compact results for such inputs. -
The
HierarchicLayout
class now adheres more closely to its maximum duration and itsAbortHandler
when propertySimplexNodePlacer.BendReduction
is enabled. -
The
HierarchicLayout
now considers thePortCandidate
directions correctly for layout orientations other thanTopToBottom
. This also improves the optimization results withPortCandidateSets
that allow multiple directions to connect to nodes. -
The
HierarchicLayout
now correctly processes input graphs with sub-components (HierarchicLayoutData.SubComponents
) and curved edge routing style. Previously, such setups may have a caused an exception. -
The
HierarchicLayout
class now correctly considers the specified critical edge priorities (seeHierarchicLayoutData.CriticalEdgePriorities
) if the input graph contains grouped edges. -
The
CircularLayout
class no longer produces node label overlaps when itsPlaceChildrenOnCommonRadius
property is disabled. -
The
EdgeRouter
class no longer generates unnecessary detours in the routes when it is configured withMonotonicPathRestriction.Both
. -
The
ClearAreaLayout
class now correctly considers node labels. Previously, there could be results where node labels intersected with the specified area to be cleared. -
The
HierarchicLayout
class now adheres more closely to its maximum duration and itsAbortHandler
. -
The
ParallelEdgeRouter
class now produces correct parallel routes if itsJoinEnds
property is enabled. -
Improved the reaction time of the
EdgeRouter
class when theMaximumDuration
is exceeded or the algorithm should stop due toAbortHandler
for some cases where previously the search for a path kept on running for a long time. -
The
RadialLayout
class is now much faster if the input graph is a very large tree structure. -
The
OrganicLayout
andClassicOrganicLayout
classes no longer produce an internal integer overflow that may lead to an early exit and, thus, poor layout results for very large input graphs. -
The
ClearAreaLayout
class no longer throws an exception for some scenarios where the same algorithm instance was first applied to a graph withPartitionGrid
and later to a graph without grid. -
The
ClearAreaLayout
andFillAreaLayout
classes no longer throw an exception for some input graphs with edge labels if propertyConsiderEdgeLabels
is enabled. -
The
TreeLayout
class now correctly handles trees with group nodes. Previously, it sometimes produced overlapping elements and halo violations for such inputs. -
Curved edge routes generated by
HierarchicLayout
,EdgeRouter
andCurveRoutingStage
no longer contain a self-crossing for edges that connect to a group node and where the connection styleCurveConnectionStyle.Organic
is specified. -
The curved edge routes produced by
HierarchicLayout
,EdgeRouter
orCurveRoutingStage
no longer violate the minimum node-edge distance or intersect the node. Intersections could previously happen especially when the specified node-edge distance was zero. -
The
PartialLayout
class now transfers the value of itsPartialLayout.MaximumDuration
property to the internally used edge routing algorithm. This means that when the partial layout has a restricted running time, the routing part will be restricted, too. Previously, the duration of the edge routing was unrestricted. Note that if the router instance is user-specified, this instance will not get a maximum duration. -
The element processing order in the
BendConverter
layout stage is now deterministic. The previous non-deterministic order of inserting and removing elements could lead to non-deterministic behavior for consecutive layout calculations. -
The
FamilyTreeLayout
class now properly handles the case that the family tree contains cycles, e.g., due to a family founded by parent and (step-)child. Previously, it sometimes produced a stack overflow or non-orthogonal routes for such an input. -
The
HierarchicLayout
class now correctly considers input graphs with group nodes and aPartitionGrid
. Previously, in some rare cases, such inputs may have caused overlapping group nodes. -
A potential
NullReferenceException
for theOrganicLayout
with very small graphs has been fixed.
Incompatible Changes
-
The out-of-support .
NET
Core 3.0SDK
is no longer supported by yFiles. The minimum supported .NET
Core version now is .NET
Core 3.1. -
The protected method
HandleInputMode.IsHovering
has been removed. To customize what handle should be used for a certain query location, the newHandleInputMode.QueryClosestHandle
event can be used. -
The methods
MouseHoverInputMode.OnShow
andShow
now return aTask
that completes when the tooltip content is available and provides whether the tooltip is actually displayed. -
The
HandleInputMode.BeginDragging
method now returns aTask
. -
The
GraphEditorInputMode.OnLabelTextEdited
method now returns aTask
that completes when the text validation is done and provides whether the validation succeeded or was canceled. -
The protected method
GraphEditorInputMode.EditLabelCore
now returns a Task instead of a Future. -
The new
GenericLayoutData
class is a generic implementation ofLayoutData
that allows to pass arbitrary data to layout stages. As a consequence, theLayoutData.Apply
,ItemCollection.ProvideMapper
andItemMapping.ProvideMapper
methods were removed. -
The
PolylineEdgeRouterData
class has been renamed toEdgeRouterData
to match the name of the layout algorithm it supports. -
The methods
CanvasControl.FitContent
andGraphControl.FitGraphBounds
now have an optional parameter that allows changing the viewport in an animated fashion. -
The
CanvasControl.Projection
property no longer accepts transforms with a non-zero translation component. -
The
CanvasControl.FitContentViewMargins
property has been renamed toContentMargins
. Accordingly, theOnFitContentViewMarginsChanged
method and theFitContentViewMarginsChanged
event have been renamed toOnContentMarginsChanged
andContentMarginsChanged
, respectively. -
The
ViewportLimiter.LimitViewport
method now has an optional parameter that enforces theViewportLimitingPolicy.Strict
policy. -
The
CanvasControl.EnsureVisible
method now has an additional parameterviewportInsets
. -
The
TextEditorInputMode.GetTextBoxBounds
method has been removed. -
The
PixelImageExporter
'sSmoothingMode
,TextRenderingHint
, andInterpolationMode
properties now default to high quality rendering. -
The return value of the
MouseHoverInputMode.GetToolTipContent
method has been changed toobject
to accommodate being able to return aTask
as well.<string>
Behavior
-
The provider returned by
EdgeReconnectionPortCandidateProviders.AllNodeAndEdgeCandidates
now doesn't return port candidates of the reconnected edge itself anymore as this lead to an unstable reconnection behavior. -
The
FitContent
andFitGraphBounds
commands now change the viewport in an animated fashion. -
Zooming with the mouse wheel to the center of the viewport by using
CanvasControl
'sCenterZoomRecognizer
no longer uses theIncreaseZoom
andDecreaseZoom
commands. - During animated viewport transitions, for performance reasons, mouse events are not redispatched, anymore, except for the last frame of the animation.
-
The
OrganicLayout
substructure stylesStarSubstructureStyle.Radial
,StarSubstructureStyle.Circular
,ChainSubstructureStyle.Rectangular
,ChainSubstructureStyle.StraightLine
andCycleSubstructureStyle.Circular
do no longer allow that the detected substructures are nested inside other substructures. To get the old behavior and allow nesting, new style values were added (e.g.StarSubstructureStyle.RadialNested
). -
The following behavior change applies to class
HierarchicLayout
with polyline edge routing style: the default value of propertyyWorks.Layout.Hierarchic.EdgeLayoutDescriptor.MinimumSlope
was changed from 0.3 to 0.2 which makes the sloped segments less steep and the overall results more compact. -
In organic layout, the way edge grouping influences the layout of certain substructures has
changed. Structures are not anymore split-up into several ones when edges of nodes in the structure have different
group IDs. Now, the new node types can be used to split-up structures (see
OrganicLayoutData.NodeTypes
). If a structure contains different edge groups, the grouping is properly considered and may influence the sorting of elements within the structure. Affected substructure styles areStarSubstructureStyle.SeparatedRadial
,ParallelSubstructureStyle.Radial
,ParallelSubstructureStyle.StraightLine
andParallelSubstructureStyle.Rectangular
. -
As the
OrganicEdgeRouter.KeepExistingBends
property now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends, a new property to get the old behavior was introduced:OrganicEdgeRouter.ConsiderExistingBends
. Existing bends are considered, but their absolute coordinates are not kept. -
The default value of the
ClassicTreeLayout.MinimumLayerDistance
property was changed from 40.0 to 20.0 and the default value of theClassicTreeLayout.BusAlignment
property was changed from 0.3 to 0.5. In addition, the newMinimumFirstSegmentLength
andMinimumLastSegmentLength
properties may lead to different results compared to previous versions. Setting both properties to zero will neutralize their influence on the result. -
For the
DefaultNodePlacer
class that is used by theTreeLayout
, the default values of theHorizontalDistance
andVerticalDistance
properties were changed from 40.0 to 20.0, and the default values of theMinimumFirstSegmentLength
andMinimumLastSegmentLength
properties were changed from 0.0 to 20.0. -
For the
CompactNodePlacer
class that is used by theTreeLayout
, the default values of theHorizontalDistance
andVerticalDistance
properties were changed from 40.0 to 20.0, and the default values of theMinimumFirstSegmentLength
andMinimumLastSegmentLength
properties were changed from 10.0 to 20.0. -
The default value of the
LayeredNodePlacer.BusAlignment
property was changed from 0.3 to 0.5.
Deprecations
-
The
CanvasControl.AnimateScrollCommands
property has been deprecated in favor of the newAnimatedViewportChanges
property, which offers more control over viewport animations, not just the scroll commands. -
The
OrganicLayout.ClusterNodes
property is now deprecated. It is replaced by the newOrganicLayout.ClusteringPolicy
property. To disable clustering specifyClusteringPolicy.None
. To enable it and use the same algorithm as before, specifyClusteringPolicy.EdgeBetweenness
.
yFiles.NET 5.3.0.2
Improvements
- A dedicated .NET 5.0 version of the library now is bundled to facilitate the use with NuGet and to improve compatibility with certain obfuscation tools. A .NET 5.0 version of the samples is provided, too.
View
-
The
ViewportLimiter
class now always centers the viewport if itsHonorBothDimensions
property is disabled.
Layout
-
The
HierarchicLayout
class now has an improved strategy for choosing the port candidates for same-layer edges with multiple available candidates. Previously, the chosen candidate may have led to superfluous back-loops.
Algorithms
-
The
LabelPropagationClustering
algorithm now produces normalized, continuous clustering IDs. In other words, for example, if it finds 5 clusters, they get IDs from 0 to 4. Previously, the range of IDs may have contained holes. If initial label values are provided, this normalization is omitted.
Bugfixes
View
-
The clipboard now doesn't copy labels or ports if they are not selected and their owner's
IClipboardHelper
forbids copying the owner. -
The
CanvasControl.ZoomToAnimated
method now works correctly when a Projection is used. -
Fixed a bug in
CanvasControl.FitContent
andGraphControl.FitGraphBounds
which causedFitContentViewMargins
being incorrectly applied in case aProjection
has been set. -
The following issues of the
ZoomToCurrentItemCommand
have been corrected:- The item is now longer placed slightly out of center if scrollbars appear during the operation.
- If the current item is too large to fit the viewport at zoom 1, the command now zooms out.
-
Fixed incorrect margins on an
OverviewGraphControl
with aProjection
set. -
Fixed a bug which caused the
Zoom
command to disrespect theViewportLimiter
if executed with a rectangle as parameter. -
Fixed
ViewportLimiter
sometimes leading to jumping viewports and not allowing the user to zoom out in certain situations. - The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
-
Fixed the
MaxX
andMaxY
properties ofRectD.Infinite
which now returnDouble.PositiveInfinity
instead ofNaN
. In turn,RectD.Infinite
'sTopRight
,BottomRight
, andBottomLeft
corners were fixed, too.
Graph
-
The
DefaultFolderNodeConverter
andFoldingEdgeConverterBase
classes (and thus, also theDefaultFoldingEdgeConverter
andMergingFoldingEdgeConverter
classes) no longer ignore port labels. -
A label with
EdgeSegmentLabelModel
orEdgePathLabelModel
now moves steadily when the segment to which it belongs moves.
Input
-
The
CreateEdgeInputMode
class no longer has an error which prevented the removal of port candidate visualizations after another input mode claimed to be active. -
Labels with
\n
now are displayed correctly when the label is edited.
GraphML
- Labels at ports of collapsed nodes are no longer lost during GraphML serialization.
Analysis
-
The Manhattan distance metric for
HierarchicalClustering
no longer ignores the vertical distance component. -
The
Cycles.FindCycleEdges
algorithm no longer crashes when the given input graph contains self-loops.
Layout
-
The
TabularLayout
class no longer throws an exception about a missingPartitionGrid
when used withinRecursiveGroupLayout
andRecursiveGroupLayoutData
andTabularLayoutData
are used without an explicit cell-id mapping. -
The
LayoutExecutor
class now uses the correct target bounds when a projection is set on theGraphControl
. -
When the
MaximumDuration
of theEdgeRouter
class is exceeded, it now still uses the same port for edges that are grouped. Previously, edge grouping constraints were mostly ignored when the time was up. -
Improved the reaction time of the
EdgeRouter
class when theMaximumDuration
is exceeded or the algorithm should stop due toAbortHandler
for some cases where previously the search for a path kept on running for a long time. -
The
RadialLayout
class is now much faster if the input graph is a very large tree structure. -
The
OrganicLayout
andClassicOrganicLayout
classes no longer produce an internal integer overflow that may lead to an early exit and, thus, poor layout results for very large input graphs. -
The
ClearAreaLayout
class no longer throws an exception for some scenarios where the same algorithm instance was first applied to a graph withPartitionGrid
and later to a graph without grid. -
The
EdgeRouter
andPolylineLayoutStage
classes no longer produce broken routes for edges with polyline segments. Previously, such broken routes may have appeared in rare cases. -
The
HierarchicLayout
class now correctly considers the back-loop routing style (HierarchicLayout.BackLoopRouting
) for graphs with critical edges (seeHierarchicLayoutData.CriticalEdgePriorities
). -
The
ClearAreaLayout
andFillAreaLayout
classes no longer throw an exception for some input graphs with edge labels if propertyConsiderEdgeLabels
is enabled. -
The
GenericLabeling
class no longer throws an exception for edge labels with preferred placement descriptor if propertyPlaceEdgeLabels
is disabled. -
The
TreeLayout
class now correctly handles trees with group nodes. Previously, it sometimes produced overlapping elements and halo violations for such inputs. -
The curved edge routes produced by
HierarchicLayout
,EdgeRouter
orCurveRoutingStage
no longer violate the minimum node-edge distance or intersect the node. Intersections could previously happen especially when the specified node-edge distance was zero. -
The
RecursiveGroupLayout
class now correctly handles setups that use both recursive and non-recursive group nodes. Previously, such use-cases may have led to invisible/ignored edges and, thus, broken edge routes. -
The
PartialLayout
class now transfers the value of itsPartialLayout.MaximumDuration
property to the internally used edge routing algorithm. This means that when the partial layout has a restricted running time, the routing part will be restricted, too. Previously, the duration of the edge routing was unrestricted. Note that if the router instance is user-specified, this instance will not get a maximum duration. -
The
HierarchicLayout
,EdgeRouter
andCurveRoutingStage
classes no longer occasionally throw an exception when the curved routing style is used for graphs that have self-loop edges. -
The
ClearAreaLayout
class now produces correct orthogonal routes for edges if itsClearAreaStrategy
property is set to a local strategy. Previously, some of the edges may have received a non-orthogonal route. -
The
EdgeRouter
class no longer throws an exception if the input contains a bus defined viaBusDescriptor
where all the associated edges are actually fixed.
Hierarchic Layout
-
The
HierarchicLayout
class no longer produces an infinite looping issue in the incremental layout mode for some input graphs with layer constraints that specify that a node should be placed in the topmost/bottommost layer. -
The
HierarchicLayout
class no longer produces unnecessary edge crossings between self-loop edges at the same node in cases where a larger number of self-loops exist at a node. -
The
HierarchicLayout
class no longer ignores edges connected to group nodes when the group node contains a bus structure (seeHierarchicLayoutData.Buses
) and no other elements. Such edges were previously actually removed from the layout graph such that other stages (e.g. theComponentLayout
) could have failed with an exception. -
The
HierarchicLayout
class no longer occasionally throws an exception when enablingHierarchicLayout.CompactGroups
and in conjunction with layering constraints and/or a group node marked as incremental. -
The
HierarchicLayout
class does no longer violate the specified minimum length for edges incident to group nodes. -
The sequencing phase of the
HierarchicLayout
class is now faster for large graphs with sequence constraints and non-incremental layout mode.
Edge Routing
-
The
BusRouter
class now produces more suitable edge routes for rare cases that were caused by an unsuitable bus placement. -
The
EdgeRouter
class now uses the given ports for edges of a bus with fixed edges. -
The
EdgeRouter
class now correctly considers edges incident to a fixed inner port of a group node when the routing algorithm has restricted maximum duration. Previously, this setup sometimes led to strange edge routes with many superfluous bends. -
The
EdgeRouter
class no longer contains edges with self-crossings in some rare cases where it previously failed to eliminate them. -
The
EdgeRouter
andCurveRoutingStage
classes no longer change the path of unaffected (fixed) edges when theCreateControlPoints
property of their associatedEdgeLayoutDescriptor
instance (CurveEdgeLayoutDescriptor
respectively) is enabled. -
The
EdgeRouter
class now correctly supports the use case that a subset of edges is routed with the curved routing style while another subset is routed with another routing style and different settings on the associated individualEdgeLayoutDescriptor
instances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used. -
The
OrthogonalSegmentDistributionStage
class does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that theChannelEdgeRouter
class is affected too, as the stage is by default called from within the router.
New Demos
-
The new Sankey layout demo shows how
HierarchicLayout
can be configured to show a Sankey diagram.
yFiles.NET 5.3.0.1
Bugfixes
-
An animation created with
Animations.CreateGraphAnimation
no longer throws an Exception if the providedIMapper
with new bend locations doesn't provide bend locations for all edges. -
Using the
NinePositionEdgeLabelModel
for edges with theBezierEdgeStyle
no longer throws an exception in theBezierEdgeStyleRenderer.getSegmentCount
method. - Fixed exception which occurs with layout animations for graphs which contain edges with ports.
-
Fixed a bug when executing
ZoomToCurrentItemCommand
which did not center on the current item with theViewportLimiter
enabled and theLimitingPolicy
set toTowardsBounds
. -
Calling the
GraphInputMode.FindItems
andGraphInputMode.HitTester.EnumerateHits
methods with a customIInputModeContext
will now always pass that context to theIHitTestable
implementations of the items being hit-tested. Previously, the main input mode's ownIInputModeContext
was used in certain cases. -
The
GraphModelManager.GetMainCanvasObject
method no longer throws aNullReferenceException
when overriding itsGetCanvasObject
methods for items in an unexpected way. -
The new default
ViewportLimiter
policyTowardsBounds
no longer causes the viewport to scroll to unexpected locations (including far away from the graph) during layout animations. -
The viewport rectangle in the
GraphOverviewControl
is now displayed correctly if the referencedGraphControl
has a projection set. - The viewport rectangle in the overview is now correctly hit-tested when a projection is used.
-
DefaultLabelStyle.Insets
is now correctly applied around the content instead of just enlarging the preferred size. -
CommandManager
no longer causesICommand.CanExecute
calls if the targetGraphControl
is already disposed. -
Mouse2DEvent
s now properly reflect changes of modifier keys in theirChangedModifiers
property. - Fixed hit-test of handles being in a slightly different position from where the handles are displayed.
-
Labels with
\n
now are displayed correctly when the label is edited. -
Fixed
PanelNodeStlye
shadow that was mangled when printing. -
The
NodeDropInputMode
class now correctly considers port labels, both for creating the new node and for the preview.
Right-to-Left
-
The extent of the horizontal scrollbar now correctly accounts for the vertical scrollbar being
displayed on the left side with
RightToLeft
. -
The
AutoDrag
feature inCanvasControl
now works correctly withRightToLeft
while the vertical scroll bar is visible. -
The vertical scrollbar location is now correctly adjusted when switching writing direction with the
RightToLeft
property. -
CanvasControl.EnsureVisible
now works correctly when the vertical scrollbar is on the left side due toRightToLeft
. -
Commands.ScrollPageLeft
,Commands.ScrollPageRight
as well as horizontal mouse-wheel scrolling no longer scroll in the wrong direction whenRightToLeft
is enabled.
Layout
-
The
HierarchicLayout
class now correctly handles inputs that have both bus structures and edges with recursive style. Previously, an exception could be triggered when an edge was marked as recursive and belonged to a bus at the same time. -
The
EdgeRouter
class no longer has a problem that appeared with a bus containing affected as well as non-affected (fixed) edges at the same time. Previously, this could trigger an Exception or lead to the incorrect behavior that an actually affected other edge was not routed. -
The
EdgeRouter
class no longer occasionally throws an exception if the input contains bus edges defined viaBusDescriptor
. -
The
BusRouter
class no longer fails to generate connected buses for cases with fixed and incremental edges on the same bus. Previously it sometimes generated a disjoint bus even though the bus IDs were equal. -
The
BusRouter
class no longer ignores edges that should be routed when a they are on a bus with fixed edges (seeBusDescriptor.Fixed
property) and when they share both source and target port with a fixed edge. -
The element processing order in the
BendConverter
layout stage is now deterministic. The previous non-deterministic order of inserting and removing elements could lead to non-deterministic behavior for consecutive layout calculations. -
The
ParallelEdgeRouter
class no longer throws an exception if the input has both a large number of parallel edges and a leading edge with ports on the node border. -
The
OrthogonalLayout
class now correctly handles input graphs with parallel edges if thePreferParallelRoutes
property is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
FamilyTreeLayout
class now properly handles the case that the family tree contains cycles, e.g., due to a family founded by parent and (step-)child. Previously, it sometimes produced a stack overflow or non-orthogonal routes for such an input.
Improvement
- The .NET Core version of the library (
lib/netcoreapp3.0
) has been tested with .NET 5.0 and compatibility has been confirmed.
Incompatible Changes (Demos)
- The .NET Core versions of demos and tutorial (
samples-netcore
) now target .NET Core 3.1. They can still be used with .NET Core 3.0 by simply changing the target framework. The library is not affected.
yFiles.NET 5.3
This release contains many new major features and lots of other new features, improvements, and bugfixes for all parts of the library. In addition to the new demos that show the new features, there are some notable new demos and demo improvements, too.
If you are updating from an older version of yFiles.NET, have a look at the list of incompatible changes.
Major New Features
- Isometric Drawing and Other Projections
-
CanvasControl
(and thusGraphControl
) now has an additionalProjection
property that can be used to transform the viewport into a different parallel projection, e.g. isometric or cabinet projection. Predefined useful projections are provided as constants on the newProjections
class. Interaction, including graph editing, snapping, orthogonal edge editing, etc. still work as expected, just within the new projection. That is, orthogonal edge editing becomes isometric edge editing with an isometric projection. There is a corresponding chapter in the Developer's Guide that goes into further detail what has changed and which customization options exist.The
IsometricDrawing
demo displays graphs in an isometric fashion to create an impression of a 3-dimensional view. - Fill Area Layout and Clear Area Layout
-
The new
ClearAreaLayout
algorithm clears a user-specified area in an existing layout by moving elements. It is suitable if the rest of the layout should not change much but some free space is required, e.g., because new elements need to be inserted into the drawing or have been resized.The new
FillAreaLayout
algorithm fills a user-specified area in an existing layout by moving elements into or towards it. It can make layouts around the specified area more compact and is suitable if, e.g., elements were removed from the graph or their size has changed substantially.A number of new demos showcase the new layout algorithms:
-
The new
MarqueeClearArea
demo shows how to make space in a diagram by dragging a marquee rectangle. -
The new
OverlapAvoidingEditor
demo shows how to interactively edit graphs without creating overlaps. -
The new
ComponentDragAndDrop
demo shows how to make space for components that you can drag from a palette onto the canvas. -
The new
FillAreaAfterDeletion
demo shows how to fill free space after deleting nodes using theFillAreaLayout
algorithm. -
The new
RelocateSubtree
demo shows how to reuse free space after relocating a subtree to a new parent.
-
The new
- Aggregation and Analysis of (Large) Graphs
-
Many new algorithms for analyzing graphs are now included, for example to detect components and clusters, to aggregate sub-graphs, and to calculate centrality values. In addition, the analysis algorithms now have the option to define a subset of the graph to work on. In detail, the new classes are:
-
The new
NodeAggregation
class provides an algorithm that intelligently aggregates nodes of (large) input graphs. It does not require complex configuration and can be used without knowledge of specific clustering or aggregation techniques. -
The
KCoreComponents
class provides a component detection algorithm that finds k-cores. -
The classes
LouvainModularityClustering
andLabelPropagationClustering
provide two new algorithms for cluster detection. -
The
EigenvectorCentrality
class offers a centrality algorithm that measures the influence of a node in a network based on the Eigenvector score. -
The
PageRank
class provides a centrality algorithm that calculates the so-called page rank for the nodes. -
The classes
ChainSubstructures
,CliqueSubstructures
,CycleSubstructures
,StarSubstructures
, andSubtreeSubstructures
provide new algorithms that detect isolated substructures like chains, cliques, cycles, stars, or subtrees. This can be used as an input to other (layout) algorithms. -
The class
GraphStructureAnalyzer
now offers additional methods to calculate the average degree, the average weighted degree, the diameter, and the density of a given graph.
The
Large Graph Aggregation Demo
shows how to use theNodeAggregation
algorithm to automatically analyze and explore a large graph. Developers don't need to learn the academic details of the available clustering and centrality algorithms, but can simply configure their preferred aggregation sizes to automatically create perfect user-experiences in drill-down scenarios. -
The new
- Support for curved edges
-
The new
BezierEdgeStyle
renders edges with smooth Bezier-curve paths.In addition, the new edge label models
BezierEdgePathLabelModel
andBezierEdgeSegmentLabelModel
place labels optimally on curved edges rendered with this style.The
BezierEdgeStyle
demo demonstrates the use of the newBezierEdgeStyle
and shows additional customizations to support various features in interactive editing. For example, for intuitive interactive editing, the edges are edited with the same control points -or handles- that are known from other vector graphic drawing applications.Support for curved edges has been added to the layout and edge routing algorithms
EdgeRouter
and theCurveRoutingStage
, andHierarchicLayout
. - Interactive Node Resizing
-
Resizing nodes using their handles now supports two new behaviors:
- Center resizing keeps the center fixed and scales the node in all directions. It is active when the
NodeReshapeHandleProvider.CenterReshapeRecognizer
is triggered which defaults to theAlt
key held down. - Aspect ratio resizing maintains the aspect ratio of a node. It is active when the
NodeReshapeHandleProvider.RatioReshapeRecognizer
is triggered which defaults theShift
key held down. - The
NodeReshapeHandleProvider.ReshapePolicy
determines how the mouse location is interpreted when aspect ratio resizing is active.
The
Reshape Handle Configuration Demo
showcases these different resizing behaviors.Related to this, the new
Node Group Resizing Demo
shows how to resize a selection of nodes en bloc. In contrast to the default behavior, this changes both the sizes and the locations of the nodes and not just the sizes. - Center resizing keeps the center fixed and scales the node in all directions. It is active when the
- Graph Builder
-
The old
GraphBuilder
,TreeBuilder
, andAdjacentNodesGraphBuilder
classes have been replaced in the library with more powerful but incompatible builder classes. Loading graphs from external data sources has become even easier with the new graph builder implementations. This release contains completely rewritten utility classes that can help with the creation of diagrams from one or more data sources.The new classes can load nodes, edges, labels, and their properties from one or many different sources dynamically using a declarative-like approach. Binding expressions can be used for setting the visual properties of the graph entities depending on the values in the source data.
For backward compatibility, the old
GraphBuilder
,TreeBuilder
, andAdjacentNodesGraphBuilder
classes are available as demo code.
New Features
Viewer
-
The new
NodeLabelModelStripeLabelModelAdapter
class allows for using node label model parameters for the positioning of the row and column labels of a table. -
Resizing nodes using their handles now supports keeping the node center and/or the aspect ratio of
the node bounds.
- Center resizing is active when the
NodeReshapeHandleProvider.CenterReshapeRecognizer
is triggered. The default is pressing the Alt key. - Aspect ratio resizing is active when the
NodeReshapeHandleProvider.RatioReshapeRecognizer
is triggered. The default is pressing the Shift key. - The
NodeReshapeHandleProvider.ReshapePolicy
property determines how the mouse location is interpreted when aspect ratio resizing is active.
- Center resizing is active when the
-
Besides the
CanvasControl.Projection
property itself a number of new properties and methods have been added to support to transform the viewport into a different parallel projection:-
CanvasControl
has additional methods to convert between the world, the new intermediate, and the view coordinate system. -
MarqueeSelectionInputMode
,NavigationInputMode
, andHandleInputMode
now have a propertyUseViewCoordinates
, which controls whether the input mode draws its decorations and processes input in view coordinates. -
When
MarqueeSelectionInputMode
uses view coordinates, the resulting shape of the marquee in world coordinates may not be a rectangle. ThereforeMarqueeSelectionEventArgs
now has aPath
property of typeGeneralPath
to describe the marquee shape and aUsePath
property that determines whether the Path property or the Rectangle property shall be used. -
EdgeDecorationInstaller
,RectangleIndicatorInstaller
,PointSelectionIndicatorInstaller
, andDefaultPortCandidateDescriptor
now have a propertyUseViewCoordinates
that controls whether the decoration is rendered in view coordinates. -
CreateEdgeInputMode
'sMeasureDistance
method now has to return the distance in view coordinates if and only ifCanvasControl
'sProjection
is used. -
IRenderContext
now has additional members that are useful with the new projections feature: the Projection transform, transforms used to paint in view, intermediate or world coordinate system, and members to convert points from one coordinate system to another. - The
GetTransform
method of theDefaultLabelStyle
,NodeStyleLabelStyleAdapter
,
, andLabelStyleBase<TVisual>
IconLabelStyleRenderer
now have anIRenderContext
added as first argument. -
A new
Projection
property has been added toContextConfigurator
andCanvasPrintDocument
.
-
Analysis
-
A new component detection algorithm which finds k-cores has been made available using class
KCoreComponents
. -
Centrality calculation algorithms which calculate the eigenvector centrality and
page ranks for nodes have been made available using classes
EigenvectorCentrality
andPageRank
, respectively. -
The new analysis algorithm
NodeAggregation
supports an algorithm that tries to intelligently aggregate nodes of (large) input graphs and does not require that the user is familiar with specific clustering/aggregation algorithms. -
New algorithms for detecting isolated substructures like chains, cliques, cycles, stars or
subtrees have been made available via the classes
ChainSubstructures
,CliqueSubstructures
,CycleSubstructures
,StarSubstructures
, andSubtreeSubstructures
. -
GraphStructureAnalyzer
: added methods to calculate the average degree, the average weighted degree, the diameter and the density of a given graph. -
New clustering detection algorithms using the Louvain Modularity and Label Propagation have
been made available via classes
LouvainModularityClustering
andLabelPropagationClustering
. - The analysis algorithms now have the option to define a subset of the graph to work on.
Algorithms
The features listed here are new features of the low level analysis algorithms. Most of them are reflected in new features of the analysis facade classes as listed in the section Analysis.
-
New methods compute several
additional network statistics, namely
GetAverageDegree
,GetAverageWeightedDegree
,GetDiameter
, andGetDensity
of classGraphChecker
andGetModularity
of classGroups
. -
Added class
NodeAggregation
which represents an algorithm that tries to intelligently aggregate nodes of (large) input graphs and does not require that the user is familiar with specific clustering/aggregation algorithms. -
Added new method
Transitivity.TransitiveEdges
which creates the transitive edges that connect the visible nodes in an input graph. -
Added method
Groups.GetClusteringCoefficient
that computes the local clustering coefficient for each node as well as the average clustering coefficient. -
Added the new methods
GraphConnectivity.KCore
andGraphConnectivity.KCore
(Graph, int that compute the so-called k-cores of an undirected input graph. -
Added the new method
Centrality.EigenvectorCentrality
which computes the eigenvector centrality for each node in an undirected graph. -
Added an implementation of the label propagation algorithm which detects communities in the input
graph. See the new method
Groups.LabelPropagation
. -
Added the new method
Groups.LouvainModularity
which detects the communities in the input graph by applying the well-known louvain modularity approach. -
Added the new method
Centrality.PageRank
which provides an implementation of the page rank algorithm that computes a rank for each node. -
The new
Substructures
class offers methods to detect the following graph structures: Chains, Cliques, Cycles, Stars, and Trees.
Layout
-
Added new property
EdgeLayoutDescriptor.RoutingStyle
that allows to specify the routing style individually for each edge routed by theEdgeRouter
class. Furthermore, new propertiesMaximumOctilinearSegmentRatio
andPreferredOctilinearSegmentLength
on the descriptor provide means to configure the octilinear routing style. -
The
EdgeRouter
class now supports a new routing style that generates curved edge paths. It can be specified for each edge individually usingEdgeRoutingStyle.Curved
. -
Added new layout stage
CurveRoutingStage
. It replaces polyline edge paths with curved segments using cubic bezier splines and provides a generic way to produce layouts with curved edges. -
Added the new routing style
EdgeRoutingStyle.Curved
to theHierarchicLayout
class. The resulting edge paths consist of smooth curves that are constructed using cubic bezier splines. -
The
CircularLayout
class now supports exterior edges that are routed around the exterior of the circle as smooth arcs, see the new propertyCircularLayout.EdgeRoutingPolicy
. -
Added new class
EdgeBundlingStage
that offers edge bundling for general undirected graphs. Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes.
Improvements
View
-
A new policy has been added to the
ViewportLimiter
which allows for zooming and panning towards the limits but not away from them. This prevents the viewport from "jumping" from out-of-limit coordinates into the limited bounds. -
FitContent
with an enabledViewportLimiter
now respects theLimitedFitContentZoom
property on theCanvasControl
. -
An
Animation
can now be paused and unpaused by setting thePaused
Property on theAnimator
after the animation has started. -
DefaultFolderNodeConverter
andFoldingEdgeConverterBase
: provide new protected methodsCreatePreferredLabelSize
to allow for overriding the default implementations. -
The property
GraphModelManager.ProvideUserObjectOnMainCanvasObject
was added that can be set so that a model is accessible as its main canvas object's user object. -
The extension method
GetPathPoints
was added for edges. The returnedIListEnumerable
contains the source port location, followed by the bend locations, followed by the target port location of an edge. -
NodeStyleLabelStyleAdapter
now propagates the label's tag to the node that's rendered with the node style. -
NodeStylePortStyleAdapter
now propagates the port's tag to the node that's rendered with the node style. -
NodeStyleStripeStyleAdapter
now propagates the stripe's tag to the node that's rendered with the node style. -
CanvasControl.UpdateContentRect
now throws anInvalidOperationException
if an element on the canvas provided invalid (e.g. infinite) bounds. -
ITable.AddLabel
no longer accepts label model parameters that do not supportIStripe
instances. Previously node label models could be used, but did not work properly at runtime. -
CompositeLabelModel
: added support for label snapping. -
GraphModelManager
: made methods Raise, Lower,ToFront
andToBack
virtual. -
Added the ability to the image export support (
PixelImageExporter
,EmfExporter
,ContextConfigurator
) to define an arbitrary list of points. The export chooses the exported area in a way that all these points are enclosed in the smallest possible rectangular area which is axis-parallel to the output coordinates. -
Added the ability to the printing support (
CanvasPrintDocument
,CanvasControl.Print
) to define an arbitrary list of points. The printed area is defined in a way that all these points are enclosed in the smallest possible rectangular area which is axis-parallel to the output coordinates. -
PixelImageExporter
andEmfImageExporter
now have aBackground
property which sets aBrush
for the background.
Input
-
GridVisualCreator
now supports to only draw horizontal or only vertical lines when itsGridStyle
property is set to one of the new valuesHorizontalLines
orVerticalLines
. -
GraphSnapContext.GridSnapDistance
andGraphSnapContext.GridSnapType
have been pulled up toSnapContext
. -
The zoom-invariant
GridSnapDistance
property has been added toCollectSnapResultsEventArgs
. -
An optional parameter
preferredSnapType
has been added to theSnapLineSnapResult
constructor and theSnapResults.CreateSnapLineSnapResult
factory method. -
SnapResults.CreateResizeSnapResult
now takes aPointD
as delta parameter instead of a double so it is possible to create resize snap results where the orientation of the mouse delta differs from the orientation of the snapped size. -
GraphClipboard
andGraphEditorInputMode
: added new eventElementsDuplicated
that occurs when a duplicate operation finished successfully. -
UndoEngine
: The Undo and Redo methods now throw nowInvalidOperationException
if the current state does not allow performing Undo or Redo. Previously eitherNotSupportedException
orException
have been thrown. -
The
GraphEditorInputMode.RequeryHandles
method has been made public and can now be used to refresh the displayed handles, ifIHandleProvider
implementations return different handles over time. -
It is now easier to customize
GroupingNodePositionHandler
. The boolean propertiesAdjustParentNodeLayout
,MoveChildNodes
andReparentingEnabled
have been added to control whether ancestors' node layout should be adjusted when a node is moved, to not move the contents of a group node when a group node is moved or forbid any interactive reparenting. - The default position handler for edges now creates fewer additional bends when the edge is dragged while orthogonal edge editing is enabled.
-
A
ReshapeHandlerDecorator
property has been added toNodeDecorator
to simplify using a customIReshapeHandler
implementation for nodes. -
The property
ReshapeRectangleContext.Ratio
has been added that describes the width/height ratio that is kept for aspect ratio resizing. -
The new classes
NodeReshapeHandleProvider
andNodeReshapeHandlerHandle
are used as default implementation for node resize handles. -
The factory method
OrthogonalEdgeEditingContext.CreateOrthogonalEdgeDragHandler
has been added and can be used for custom node position handler and reshape handler to keep orthogonal edges attached to a node orthogonal during the drag/reshape gesture. -
A
MaximumBoundingArea
can now be set onReshapeHandleProviderBase
,ReshapeHandlerHandle
,RectangleHandle
andReshapeRectangleContext
to restrict reshaping to stay inside the given bounds. -
ReshapeHandlerHandle
: Getter for theIReshapeHandler
and theHandlePositions
have been added. -
The property
ReshapePolicy
has been added toReshapeRectangleContext
soINodeReshapeSnapResultProvider
implementations can respect the node aspect ratio for according resize gestures. -
The new method
PointD.Interpolate
calculates the linear interpolation between two points. -
Added a new method
NavigationInputMode.FitContent
that is called after collapse, expand, enter and exit operations ifFitContentAfterGroupActions
is enabled. -
The
NavigationInputMode
class doesn't fit the content anymore after expand/collapse operations if anAutoGroupNodeAlignmentPolicy
other thenNone
is used. -
ResizeStripeInputMode
now has anIsDragging
property, indicating whether a drag currently is in progress. -
DropInputMode
now has anIsDragging
property, indicating whether a drag on the canvas currently is in progress. -
HandleInputMode
now has anIsDragging
property, indicating whether a drag currently is in progress. -
The new
ClickHandlerDecorator
property of Bend-, Edge-, Label-, Node- andPortDecorator
simplifies using customIClickHandler
implementations.
Analysis
-
Most of the algorithms in namespace
Analysis
provide propertiesSubgraphNodes
andSubgraphEdges
which facilitate to analyze only a subset of the given graph. -
In a single node graph, the single node's closeness centrality and graph centrality value is
now 1.0 (previously, it was infinity). This also affects derived values such as minimum, maximum, and normalized
centrality. This change relates to
yWorks.Analysis.GraphCentrality
andyWorks.Analysis.ClosenessCentrality
. The backing algorithms inyWorks.Algorithms.Centrality
are unchanged. -
GraphStructureAnalyzer
: added methods to determine multiple edges. -
The
GraphCentrality
andClosenessCentrality
analysis algorithms now calculate the centrality individually per component instead of returning a centrality value of0.0
for nodes in graphs that are not connected. -
EdgeBetweennessClustering
: throws anInvalidOperationException
if edge weights are not positive or finite. -
FeedbackEdgeSet
: throws anInvalidOperationException
if edge weights are negative.
Layout
-
Constructor overloads have been added to
SingleItem
,ItemCollection
,ItemMapping
andContextItemMapping
that initialize one of their properties on construction. - Frequently used types of the layout part have now nullability annotations.
-
LayoutExecutor
now generates more specific port constraints withFixPorts
enabled, resulting in better edge paths. -
HierarchicLayoutData.EdgeDirectedness
: if theMapper
property is directly accessed (not explicitly set) its default for unset values is 1.0 (directed edge). -
OrganicLayoutData.GroupNodeModes
: if theMapper
property is directly accessed (not explicitly set) its default for unset values isGroupNodeMode.Normal
. This doesn't change the result of the layout. -
AspectRatioTreeLayoutData
:RootPlacements
,SubtreeRoutingPolicies
,SubtreeAspectRatio
: the type of the mapped values has been made nullable. Fornull
or unset values now the settings on theAspectRatioTreeLayout
will be taken as the documentation already stated. -
Improved the support for early exits of the
EdgeRouter
class. The routing algorithm now often reacts more sensibly to the case that the specifiedMaximumDuration
is reached. -
The
HideGroupStage
class now offers a new propertyResetEdgePaths
that allows to specify whether or not the stage resets the path of edges incident to group nodes. -
The
ComponentLayout
class now correctly considers node and edge labels when using the packed layout styles, e.g.,ComponentArrangementStyles.PackedRectangle
orComponentArrangementStyles.PackedCircle
. Previously, labels could overlap other elements when using these component arrangement styles. -
Improved the consideration of the minimum edge to edge distance of the
EdgeRouter
class when it runs with highly restricted time (seeEdgeRouter.MaximumDuration
) or when it gets stopped by means ofAbortHandler
. -
The
PartialLayout
class now produces more stable results if it is multiple times applied to the same input graph and propertySubgraphPlacement
is set toSubgraphPlacement.FromSketch
.
New Demos and Demo Improvements
New Demos
-
The new
LargeGraphAggregation
demo that shows how to use the smartNodeAggregation
clustering algorithm together with anAggregateGraphWrapper
for drill down exploration of a large graph. -
The new
BezierEdgeStyle
demo demonstrates the use of the newBezierEdgeStyle
and shows additional customizations to support various features in interactive editing. -
The new
NodeGroupResizing
demo shows how to apply different resize behaviors to a set of nodes. For instance, the nodes will keep their size but their positions are altered according to the resize gesture applied to the entire group. -
The new
ZOrder
demo shows how to persist the z-order during undo, clipboard operations, grouping, and saving and loading. -
The new
MarqueeClearArea
demo shows how to make space in a diagram by dragging a marquee rectangle. -
The new
OverlapAvoidingEditor
demo shows how to interactively edit graphs without creating overlaps. -
The new
ComponentDragAndDrop
demo shows how to make space for components that you can drag from a palette onto the canvas. -
The new
RelocateSubtree
demo shows how to reuse free space after relocating a subtree to a new parent. -
The
IsometricDrawing
demo displays graphs in an isometric fashion to create an impression of a 3-dimensional view.
Noteworthy Demo Improvements
-
The
BPMN
demo has been improved to provide more flexibility. Its code now can easier be used in custom projects. -
Improved support for parsing the
BPMN
Diagramm Interchanged format. -
The
BPMN
node styles now support setting colors. -
The
ReshapeHandleProvider
demo now shows how to implement a customIReshapeHandleProvider
. The newReshapeHandleProviderConfiguration
demo shows how to configure the defaultIReshapeHandleProvider
to modify the resizing behavior. -
The
LayoutStyles
demo has been enhanced to include new layout features:- Exterior edge routing for
CircularLayout
. - Curved edge routing style for
HierarchicLayout
and PolylineEdgeRouter
. - Bus routing for
HierarchicLayout
and PolylineEdgeRouter
. - Integrated Edge Labeling for Polyline
EdgeRouter
.
- Exterior edge routing for
Bugfixes
View
-
Fixed a bug in
FoldingManager
where a predicate change in aFilteredGraphWrapper
which serves asMasterGraph
could trigger an exception if a child of a folder node has been hidden. -
ICanvasObject.Above
andBelow
don't unneccessarily triggerIRenderContext.VisualRemoved
anymore. -
Fixed the explict conversion between
Transform
andMatrix2D
which was incorrect forTransform
s with a rotation component. -
SmartEdgeLabelModel
: fixed a bug that caused a label with an angle other than 0 to jump when starting to move it interactively. -
IFoldingView.Collapse
andExpand
now throw anArgumentException
when called with a node not belonging to the graph (instead of aNullReferenceException
). -
Fixed a bug which caused custom
IEdgePathCropper
implementations which are defined on custom port styles ignored if the graph is grouped. - Edges between deeper nested nodes are now displayed correctly in front of a common ancestor after that ancestor has been added or removed.
-
Fixed a bug which caused the
ZoomToCurrentItem
command to ignore theViewportLimiter
. -
CanvasControl.ZoomTo
no longer triggers twoViewportChanged
events. -
Fixed a bug in
GraphCopier
which caused theLabelCopied
event to be dispatched twice for port labels on folder nodes. - Labels with line breaks now are displayed correctly in the text editor.
- The speed of the auto dragging feature now is independent of the scale.
-
Fixed
PanelNodeStlye
shadow that was mangled when printing.
-
The extent of the horizontal scrollbar now correctly accounts for the vertical scrollbar being
displayed on the left side with
RightToLeft
. -
The
AutoDrag
feature inCanvasControl
now works correctly withRightToLeft
while the vertical scroll bar is visible. -
The vertical scrollbar location is now correctly adjusted when switching writing direction with the
RightToLeft
property. -
CanvasControl.EnsureVisible
now works correctly when the vertical scrollbar is on the left side due toRightToLeft
. -
Commands.ScrollPageLeft
,Commands.ScrollPageRight
as well as horizontal mouse-wheel scrolling no longer scroll in the wrong direction whenRightToLeft
is enabled.
Input
-
TextEditorInputMode
now correctly queries theViewportLimiter
ifTextBoxPlacementPolicy.ScrollCanvas
is used. If the text box is still not visible because it's outside the limited viewport, the text box will be moved as well. - Fixed Undo/Redo of addition and removal of bends on folding edges. The bends now are correctly restored at the location they had at the time of removal.
-
TextboxEditorInputMode
correctly rotates the textbox when Zoom is clamped. -
The
NavigationInputMode.FitContentAfterGroupActions
method is no longer ignored when theNavigationInputMode
class is used as a child input mode of theGraphEditorInputMode
class. -
The
NavigationInputMode
class now also updates theCanvasControl.ContentRect
property when it is not used as a child input mode of theGraphEditorInputMode
class. -
Fixed that
GridVisualCreator
ignored the grid origin when rendering lines or crosses. -
Fixed bugs that interpreted
SnapContext.GridSnapDistance
orSnapContext.SnapDistance
in world coordinates when calculatingSnapResults
. - Orthogonal Edge Editing: fixed a bug that created bends in edges that are marked as not orthogonal.
-
OverviewInputMode
: Fixed jumping of both client canvas and overview when scrollbar visibilty changes. - When zooming to the current item, changes in scrollbar visibility are properly incorporated into the new viewport position.
- Scrolling the viewport with the mouse wheel no longer scrolls in the wrong direction if the mouse wheel is set to scroll one page at a time (instead of several lines).
-
Paste and duplicate operation now honor
GraphEditorInputMode
'sShouldSelect
predicate. - Fixed a bug which could cause an input mode to be left in an undefined state if another input mode has been activated in an event handler of the first input mode. This usually resulted in the wrong cursor being displayed.
- Fixed hit-test of handles being in a slightly different position from where the handles are displayed.
Analysis
- Fixed analysis class Chains for undirected cycles: if these cycles are not connected to other parts of the graph the Nodes collection of a resulting Path could be in an incorrect order.
-
yWorks.Analysis.EdgeBetweennessClustering
no longer throws an exception with its default settings(MaximumClusterCount == -1)
. -
The
HierarchicalClustering
class no longer throws an exception when applied to an empty graph. -
ClosenessCentrality
does no longer returnNaN
asNormalizedNodeCentrality
if the graph consists of one single node. Instead, theNormalizedNodeCentrality
will be positive infinity. -
ClosenessCentrality.Run
no longer throws an exception for unconnected graphs. Instead, allNodeCentrality
andNormalizedNodeCentrality
values will be0
as the documentation states.
Layout
-
Fixed an exception in
EdgeRouter
which could occur in rare cases. -
The
OrganicLayout
class no longer throws an exception when having aPartitionGrid
and at the same time the scope set toSubset
orMainlySubset
where all nodes of the graph are marked as affected (could have used scopeAll
instead). -
Fixed method
NodePlacerBase.PlaceSubtree(IDataProvider, IDataProvider, LayoutGraph, Node, ParentConnectorDirection)
to clear its internal caches, especially the graph cached in fieldNodePlacerBase.graph
. Previously, holding onto a node placer instance could lead to subtle memory leaks. -
The
EdgeRouter
class no longer yields edge labels that overlap with unrelated group nodes when using the integrated label placement feature (EdgeRouter.IntegratedEdgeLabeling
). -
Resolved a bug in the
EdgeRouter
class which caused that grouped edges were sometimes actually not grouped together. This mainly appeared in conjunction with a large value of either the minimum first or last segment length. -
The
EdgeRouter
class no longer produces an exception for some rare cases with fixed grouped edges and octilinear paths. -
The
HierarchicLayout
class no longer throws an exception that was previously triggered in some cases with bus structures (see propertyHierarchicLayoutData.Buses
) and in conjunction with layering constraints. -
The
EdgeRouter
class now correctly observes inputs where the user specifies buses with both fixed and non-fixed edges at the same time. -
The
EdgeRouter
class now properly considers ports provided by aPortCandidateSet
when the set contains multiple candidates with single capacities and where the candidates are on the same node side. Previously, it could happen that only one of several edges connecting to the node correctly considered the ports. -
The
EdgeRouter
class does no longer use the same fixedPortCandidate
out of a specifiedPortCandidateSet
if another non-saturated candidate can be chosen. Thus, overlapping edge segments are avoided. -
The
OrthogonalSegmentDistributionStage
no longer produces degenerated (very large or small) coordinates for edges that contain zero-length segments, that is, duplicate edge path points. -
The
ChannelEdgeRouter
class no longer yields degenerated routing results (very large or small coordinates) when using theOrthogonalPatternEdgeRouter
as path finder strategy and setting its minimum distance to zero. TheOrthogonalPatternEdgeRouter
class now avoids duplicate points when theMinimumDistance
property is set to zero. -
The
AspectRatioTreeLayout
class no longer crashes, causing a stack overflow, when applied to a large chain graph. -
Fixed a bug in the
HierarchicLayout
class that could cause unnecessary (double) edge crossings when the algorithm was executed in incremental layout mode with edge grouping and alternative group bounds. -
The
RecursiveGroupLayout
class now correctly moves child nodes along with their group also in case theRecursiveGroupLayout.CoreLayout
isnull
. Previously, if additionally a group node had a specific layout algorithm associated to it, the content was not correctly moved along. If the core layout was notnull
, the issue did not occur. -
The
EdgeRouter
class now considers the correct shape of non-affected, fixed edges. Previously, it sometimes incorrectly parsed their shape which could lead to undesired effects like incorrect path cost calculation of affected edges. -
The
BalloonLayout
class now longer crashes due to a stack overflow for inputs containing very long chain graphs. -
Fixed a bug in the
HierarchicLayout
class that in some cases caused a violation of the minimum first or last segment length (EdgeLayoutDescriptor.MinimumFirstSegmentLength
andEdgeLayoutDescriptor.MinimumLastSegmentLength
). The bug was only triggered when the minimum length values were relatively large. -
The
TreeMapLayout
class no longer produces results that may have infinite coordinates. -
The
EdgeRouter
class no longer produces unnecessary overlaps for cases where the source or target node is overlapped by (several) label elements. This generally improves the ability of the router to deal with input that contains source/target nodes that are overlapped by other elements and are required to be crossed by an edge route. -
The
HierarchicLayout
class no longer throws an exception that was previously triggered in some cases with bus structures (see propertyHierarchicLayoutData.Buses
) and in conjunction with undirected edges (seeHierarchicLayoutData.EdgeDirectedness
). -
Fixed a bug in the
EdgeRouter
class that sometimes generated bad routing artifacts with edge grouping and when there were non-affected edges grouped at both end points. -
The
EdgeRouter
class no longer throws an Exception that was previously in some cases triggered when the input contained bus edges (defined viaBusDescriptor
).
Incompatible Changes
API
-
The method
CanvasControl.CreateInputModeContext
is protected again, after having been made public accidentally previously. -
The
GraphEditorInputMode.RequeryHandles
method is now public. -
The
HierarchicalClustering.Result.DendrogramRoot
property can now returnnull
if the result has been obtained from an empty graph. -
The optional
IPortLocationModelParameter
andIPortStyle
parameters of theIGraph.AddPort
andGraphExtensions.AddPort
methods can now benull
. -
The properties
PixelImageExporter.Configurator
andEmfImageExporter.Configurator
are no longer virtual. -
The
ModelManager.UnInstall
method has been renamed to the canonical nameUninstall
. -
The
NodeReshapeSnapResultProvider.GetSnapLines
method now takesCollectSnapResultsEventArgs
as additional parameter. -
Several methods related to snapping now take a
PointD
instead of adouble
asdelta
parameter. In detail, these areSnapResults.CreateResizeSnapResult
,NodeReshapeSnapResultProvider.AddSnaplineSnapResult
,NodeReshapeSnapResultProvider.AddGridLineSnapResult
, andNodeReshapeSnapResultProvider.AddSameSizeSnapResult
. -
The
NavigationInputMode.FitContentAfterGroupActions
property now isfalse
by default. -
The
GetTransform
method of theDefaultLabelStyle
,NodeStyleLabelStyleAdapter
,
, andLabelStyleBase<TVisual>
IconLabelStyleRenderer
now have anIRenderContext
added as argument. -
IRenderContext.Transform
has been renamed toWorldToIntermediateTransform
. -
The method
DefaultLabelStyleRenderer.IsTextMirrored
has been removed. -
The property
BackColor
on thePixelImageExporter
class and theFillBackground
property on theEmfImageExporter
class have been replaced with theBackground
property which now takes aBrush
instead of aColor
or a boolean value.
Behavior
- The view coordinate system now includes the projection. For customers who do not use a projection, nothing will change. However, when the (old) view coordinate system has been used to render parts of the visualization in a zoom-invariant manner, the equivalent now is called the intermediate coordinate system. The view coordinate system is still necessary when coordinates relative to the control are needed, e.g. for tooltips or a context menu.
-
When using the new projections feature,
CanvasControl
'sContentRect
property no longer has an effect on scrollbars orGraphControl.FitGraphBounds
. -
CanvasControl
ignores itsViewportLimiter
when projections are used. - Visuals that are rendered in view coordinates relative to the viewport may appear in a different location when exporting an image.
-
The
GraphCentrality
andClosenessCentrality
analysis algorithms now calculate the centrality individually per component instead of returning a centrality value of0.0
for nodes in graphs that are not connected. -
The
NavigationInputMode.AdjustContentRect
method doesn't fit the graph bounds in the viewport anymore. -
The
NavigationInputMode
class doesn't fit the content after expand/collapse operations anymore. This can be re-enabled by setting theAutoGroupNodeAlignmentPolicy
to a value other thanNone
andFitContentAfterGroupActions
totrue
. -
The default value of the
MoveViewportInputMode.PinchZoomThreshold
property has been changed from 100 to 50 to prevent pinch gestures from stopping periodically. -
The
ViewportLimiter
no longer jumps to the limited viewports if the current viewport is outside the limited area. This behavior can be restored by setting theViewportLimiter.LimitingPolicy
property toLimitingPolicy.Strict
. -
HierarchicLayoutData.EdgeDirectedness
: If theMapper
property is directly accessed (not explicitly set), its default for unset values is now 1.0 instead of 0.0. These means that such edges are now treated as directed instead of undirected. -
For the
RootPlacements
,SubtreeRoutingPolicies
, andSubtreeAspectRatio
properties of theAspectRatioTreeLayoutData
class, the type of the mapped values has been made nullable. Fornull
or unset values, the settings on theAspectRatioTreeLayout
will now be taken. This is the documented behavior, though. -
The value of the read-only property
EdgeRouter.Partition
is nownull
after applying the routing algorithm. It is only intended to be used during the execution. Previously, it was cached, even though the documentation stated otherwise. -
PixelImageExporter.Export
: throwsInvalidOperationException
if the size of the image is empty. -
PixelImageExporter.ExportBitmap
: throwsInvalidOperationException
if the size of the image is empty and throwsIOException
if the image needs too much memory. -
EmfImageExporter.Export
: throwsInvalidOperationException
if the width or height of the image is negative. - The view coordinate system now includes the projection. For customers who do not use that feature, nothing will change. However, when the (old) view coordinate system has been used to render parts of the visualization in a zoom-invariant manner, the equivalent now is called the intermediate coordinate system. The view coordinate system is still necessary when coordinates relative to the control are needed, e.g. for tooltips or a context menu.
-
When using the new projections feature,
CanvasControl
'sContentRect
property no longer has an effect on scrollbars orGraphControl.FitGraphBounds
. -
CanvasControl
ignores itsViewportLimiter
when projections are used.
Deprecations
-
The properties
EdgeRouter.PolylineRouting
,EdgeRouter.PreferredPolylineSegmentLength
andEdgeRouter.MaximumPolylineSegmentRatio
are now deprecated. To enable polyline routing, specifyEdgeRoutingStyle.Octilinear
as routing style viaEdgeLayoutDescriptor.RoutingStyle
. The other two properties are also replaced by respective properties on theEdgeLayoutDescriptor
class.
yFiles.NET 5.2.0.2
Bugfixes
-
FilteredGraphWrapper
: Fixed a possibleArgumentException
("Node not in this graph") which could occur when the parent of a node which is not visible in the filtered graph has been changed in the wrapped graph. -
FoldingManager.GetFoldingEdgeState
now throws anArgumentException
with a meaningful message instead of aNullReferenceException
if the state is queried for a master edge (both source and target node are expanded). -
FoldingManager
:HasFoldingEdgeState
now returnsfalse
for a non-dummy edge (both source and target are expanded) instead of throwing aNullReferenceException
.
Layout
-
The
EdgeRouter
class now considers the correct shape of non-affected, fixed edges. Previously, it sometimes incorrectly parsed their shape which could lead to undesired effects like incorrect path cost calculation of affected edges. -
The
BalloonLayout
class now longer crashes due to a stack overflow for inputs containing very long chain graphs. -
The
HierarchicLayout
class no longer throws an exception that was previously triggered in some cases with bus structures (see propertyHierarchicLayoutData.Buses
) and in conjunction with undirected edges (seeHierarchicLayoutData.EdgeDirectedness
). -
Fixed a bug in
TableLayoutConfigurator
which in rare cases could cause exceptions in additional layout stages. -
ILabelCandidateDescriptor
'sProfit
now is considered properly by the labeling algorithms. -
The constants
EdgeLabelLayoutDpKey
andNodeLabelLayoutDpKey
of theLabelLayoutKeys
class now specify correctly that their generic type parameter isLabelLayoutData
[] and not justLabelLayoutData
.
Incompatible Changes
-
FoldingManager.GetFoldingEdgeState
now throws anArgumentException
instead of aNullReferenceException
if the state is queried for a master edge (both source and target node are expanded). -
FoldingManager
:HasFoldingEdgeState
now returnsfalse
for a non-dummy edge (both source and target are expanded) instead of throwing aNullReferenceException
.
yFiles.NET 5.2.0.1
Major Improvements
- The .NET Core-based library has been built and tested with the GA release of .NET Core 3.0. No library changes have been necessary and yFiles.NET 5.2 works just as well on the GA release of .NET Core 3.0.
New Demos
-
The new
LayoutStyles
demo showcases the features and settings of the yFiles automatic layout algorithms.
Improvements
- A lot of small improvements and bugfixes have been applied to the demo applications.
Bugfixes
Viewer
-
Fixed an issue where
NavigationInputMode
'sAutoGroupNodeAlignmentPolicy
would sometimes not work when the expanded and collapsed group node sizes differ. -
The
GeneralPath.Prepend
method no longer loses a part of the combined path in certain circumstances.
Layout
-
The
HierarchicLayout
class now produces better results for input graphs with grouped edges and aPartitionGrid
. Previously, such inputs may have produced edge routes with superfluous bends. -
The
HierarchicLayout
class now correctly considers the propertiesMaximumNodesAfterBus
andMaximumNodesBeforeBus
of theBusDescriptor
for single line (layer) buses. In addition, for multiple layer buses, the specified minimum node to edge distance is now considered for the distance between nodes and the vertical bus segment. -
The
OrganicLayout
class now correctly removes node overlaps if itsScope
is set toScope.MainlySubset
and itsNodeOverlapsAllowed
property is disabled. Previously, the layout sometimes produced superfluous overlaps for such cases. -
The
TreeMapLayout
class no longer produces results that may have infinite coordinates.
yFiles.NET 5.2
This release contains many new major features and lots of other new features, improvements, and bugfixes for all parts of the library. In addition to the new demos that show the new features, there are some notable new demos and demo improvements, too.
Major New Features
- Support for .NET Core
-
yFiles.NET now provides assemblies for both .NET Framework and .NET Core. All demos and tutorials are also provided for both frameworks.
- Improved documentation including more than 1000 new example code snippets
-
The documentation has been improved. Particularly, more than 1000 new code examples have been added to the API documentation.
- Bus-like placement in hierarchic layouts
-
The
HierarchicLayout
class is now able to arrange children of a specified root node in a bus-like way. This results in a very compact and uniform arrangement if a node has many successors. The bus sub-structures are defined by theHierarchicLayoutData.Buses
property, and the newBusDescriptor
class provides more individual settings for the buses. - Label placement, bus routing, and port grouping for EdgeRouter
-
The
EdgeRouter
class now features integrated edge label placement. Labels are automatically placed when the new propertyIntegratedEdgeLabeling
is enabled. The placement considers the optionalPreferredPlacementDescriptor
of a label.Also, it now supports port grouping of edges at their source and target and orthogonal bus routing. To specify the port group IDs or the bus affiliation, use the associated properties in the
PolylineEdgeRouterData
class. - Analysis wrapper
-
The powerful analysis algorithms got a new API that is based on the
IGraph
interface and streamlines working with the results. In particular, it makes working with a special analysis graph class obsolete. The algorithms that are available with the new API include centrality measures, clustering, flow calculation, rank assignment, spanning tree, shortest path, and more.This is accompanied by the new
GraphStructureAnalyzer
class that provides methods to check structural properties of a given graph.The new
GraphAnalysis
demo allows you to interactively explore all the algorithms. - NuGet Support
-
The yFiles.NET assemblies can easily be bundled into NuGet packages. The packages support multiple targets.
- New and improved demos
-
Added import feature for
BPMN
2.0 abstract syntax format (Diagram Interchange).
New Features
View
-
The
DefaultLabelStyle
class got some new features:- Support for insets that specify a distance between the label border and the label content.
- New properties for minimum and maximum size to restrict the size of the label.
- The ability to quantify the preferred size to avoid unnecessary floating point precision when saving.
- New static properties to enlarge the preferred size which can be useful when converting graphs between different platforms.
-
The
CreateEdgeInputMode
class can now create edges in reversed direction, i.e., starting from the target port.- The new
EdgeDirectionPolicy
supports starting creation at the source, at the target, in the last direction, or depending on the port candidate. - A configurable
ToggleDirectionRecognizer
allows changing the edge direction during creation.
- The new
-
The new property
MoveLabelInputMode.AllowUnselected
enables moving labels without having to select them first. -
The method
CreateEdgeInputMode.DoStartEdgeCreation
that is used to programmatically start an interactive edge creation gesture now returns aTask
with the newly created edge as result (ornull
if the gesture was canceled). -
The method
MoveInputMode.DoStartDrag
that is used to programmatically start an interactive drag gesture now returns aTask
with the affected items as result (ornull
if the gesture was canceled). -
The
GraphModelManager
class has the new methodsRaise
,Lower
,ToFront
andToBack
that allow for changing the z-order ofIModelItems
. All these z-order-related methods can also be triggered by the new commandsRaise
,Lower
,ToFront
andToBack
.In addition, the
GraphEditorInputMode
class provides the new methodsRaiseSelection
,LowerSelection
,SelectionToFront
andSelectionToBack
that change the z-order of all selectedIModelItems
. -
The new
PortStyleDecorationInstaller
class allows the use of anIPortStyle
to render the selection, highlight, or focus indicator of ports.
Layout
-
The
HierarchicLayout
class is now able to uniformly distribute ports at group nodes - with a few restrictions. The new propertyHierarchicLayoutData.UniformPortAssignmentGroups
. defines the groups for which the feature should be enabled. -
The
HierarchicLayout
class is now able to consider individual crossing costs for edges and for crossing a group node border. These can be defined with theHierarchicLayoutData.EdgeCrossingCosts
and theHierarchicLayoutData.GroupBorderCrossingCosts
properties.In addition, the new callback method
DefaultLayerSequencer.GetCrossingCost
allows to define an individual crossing cost value for a specific pair of edges when using this sequencer for theHierarchicLayout
. In order to easily retrieve the original edge instance when customizing the hierarchic layout, theHierarchicLayout.GetOriginalEdge
method was added. -
The
LeftRightNodePlacer
class now supports layouts with multiple branches. With this feature, subtrees can not only be placed left/right of a single vertical bus, but left/right of multiple vertical buses (the branches). The new propertyBranchCount
allows to configure the number of branches. -
The tree node placer
GridNodePlacer
offers the following new features:- The placement of the bus for routes to its children can now be configured using the new enumeration
BusPlacement
. Available placements areLeading
,Trailing
andCenter
. - Child sub-trees can be assigned to rows automatically using the new property
GridNodePlacer.AutomaticRowAssignment
. - The new alignment policy
GridNodePlacer.BusAligned
aligns the root node with the bus.
- The placement of the bus for routes to its children can now be configured using the new enumeration
-
The
OrganicLayout
class is now able to consider user-specified inertia and stress values for nodes. -
The
OrthogonalLayout
class is now able to consider custom crossing and bend costs for edges. They can be specified using the new propertiesOrthogonalLayoutData.EdgeCrossingCosts
andOrthogonalLayoutData.EdgeBendCosts
respectively. -
The new
InteractiveOrganicLayout.CompactnessFactor
property specifies the compactness of the result. If the graph contains several components, this feature can prevent that the components drift apart. -
The new
GivenCoordinatesStage
class changes node locations and edge paths to user-specified values before invoking the core layout algorithm. To specify locations and paths, use the newGivenCoordinatesStageData
class. -
The new
GenericPartitionGridSupportStage
class offers generic support for partition grid structures. -
The
OrganicLayout
class is now able to produce 3D layout results. -
The new
ChannelRoutingTool
class brings back the features of theChannelRouter
class that was removed in version 3.0.
Improvements
Graph and View
-
GraphOverviewControl
no longer draws nodes and edges that are hidden viaVoidNodeStyle
andVoidEdgeStyle
. -
NodeStylePortStyleAdapter
andPortControlPortStyle
now have anOffset
property that allows to shift the port visualization so that it no longer is centered over the port. -
The
GraphModelManager
class has new factory methods for creating theItemModelManager
of each item group. -
DefaultEdgePathCropper
's methodsCropEdgePath
andCropEdgePathAtArrow
have been made virtual. -
The performance of
EdgePathLabelModel.GetGeometry
andEdgeSegmentLabelModel.GetGeometry
has been strongly increased. -
The
GraphModelManager.GetModelItem
method now always returns theIModelItem
for anICanvasObject
retrieved for it viaGetMainCanvasObject
. Previously this only worked in all cases for theICanvasObject
retrieved viaGetCanvasObject
. -
Added the
GraphClipboard.GetId
method to facilitate retrieving the original item from which an item to be pasted has been copied from. -
The new property
GraphClipboard.ClipboardContext
provides access to the currentIGraphClipboardContext
during a clipboard operation. -
The properties
RectangleIndicatorInstaller.Template
andOrientedRectangleIndicatorInstaller.Template
now return always the value that has been set by client code and are not modified by internal code anymore. -
GraphBuilder
'sEdgeLabelProvider
now is a function with return typeobject
instead ofstring
. The label text will be thestring
returned by the provided item'sToString
method.
Input
-
The new property
CreateEdgeInputMode.ShowTargetHighlight
specifies whether to enable or disable highlighting of potential targets for edge creation. Also, the methodUpdateTargetHighlight
has been added to allow for further customization of the highlight. -
The new properties
PortRelocationHandler.ShowTargetHighlight
andPortRelocationHandlerProvider.ShowTargetHighlight
specify whether to enable or disable highlighting of potential targets for edge creation. Also, the methodUpdateHighlight
has been added to thePortRelocationHandler
class to allow for further customization of the highlight. -
The new properties
PortRelocationHandler.ShowPortCandidates
andPortRelocationHandlerProvider.ShowPortCandidates
specify whether to enable or disable showing port candidates during edge relocation. -
The
GraphEditorInputMode.DeletedItem
event provides now context information about the state before the item has been deleted. For example, if a label has been deleted you now can get its old owner. -
The method
GraphEditorInputMode.OnDeletedItem
is now virtual. - Snaplines are now infinitely long by default.
-
HandleInputMode
now clears theAffectedItems
after theCanceled
event has been raised instead of before. -
GraphEditorInputMode
provides new protected methodsCreateLabelCore
andEditLabelCore
to allow for overriding the default implementations. - Fixed some rare cases where a new label was erroneously created by interactive editing instead of editing an existing one.
-
The methods
AddLabel
,CreateLabel
andEditLabel
ofGraphEditorInputMode
andTableEditorInputMode
that are used to start the respective interactive label editing gesture programmatically now return aTask
with the edited or newly created label as result. Therefore, these methods can be awaited. -
GraphEditorInputMode
provides aTextEditorInputModeConfigurator
property to allow for configuring theTextEditorInputMode
before each label editing. -
NavigationInputMode
: Added a propertyScrollToSelection
that controls whether a node that is focused or selected with a keyboard gesture is automatically scrolled into the viewport if necessary.
GraphML Serialization
-
The
GraphMLIOHandler
class now supports reading and writing arbitrary objects at graph level. - GraphML: Name mappings for both closed and unbound generic types are now supported.
-
GraphML: Generic type arguments are now available as a property of the
QueryTypeEventArgs
. -
SizeDValueSerializer
andSizeDConverter
can now read the strings "Zero" and "Infinite". -
RectDValueSerializer
andRectDConverter
can now read the string "Infinite". -
PointDValueSerializer
andPointDConverter
can now read the string "Origin".
Graph-Layout-Bridge
-
Combining multiple
LayoutData
classes is now easier:- The base class
LayoutData
offers a new methodCombineWith
that combines the current instance with anotherLayoutData
instance. - The class
CompositeLayoutData
has an additional constructor that takes a variable number ofLayoutData
instances.
- The base class
-
The new
PortAdjustmentPolicy
property ofLayoutExecutor
andLayoutGraphAdapter
replaces the previousImprovePortAssignment
boolean property. The new property is of typePortAdjustmentPolicy
and offers more options for adjusting the port locations after a layout calculation. -
The viewport animation of the
LayoutExecutor
class considers now the value of theLimitFitContentZoom
property of the correspondingGraphControl
.
Hierarchic Layout
-
The
HierarchicLayout
class now also considers critical edge priorities for grouped edges. -
The
HierarchicLayout
class now also considers sequence constraints for grouped edges. -
The
HierarchicLayout
class now uses the specified layer alignment to align sub-components (seeHierarchicLayoutData.SubComponents
). -
With
HierarchicLayout
, the number of edges crossing through group nodes without starting or ending in them when using the default algorithm settings was reduced. Furthermore, the behavior can be customized using the new group node border crossing costs (see propertyHierarchicLayoutData.GroupBorderCrossingCosts
). -
The
HierarchicLayout
class no longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges. -
The layering of
HierarchicLayout
was improved with respect to the resulting edge lengths if the recursive group layering feature is enabled. -
The
HierarchicLayout
class now produces less overlapping elements for graphs with fixed coordinate hints. -
The
HierarchicLayout
class now correctly calculates the group node bounds. Previously, the groups' insets were slightly too large (up to one pixel). -
The
HierarchicLayout
class now always places a port label in the middle of a node side, if it is the only port on that side. Previously it was only centered if the label was additionally placed on the edge. -
The
HierarchicLayout
class now requires less memory for graphs with sequence constraints.
Edge Routing
-
The
EdgeRouter
now supports edge grouping on both endpoints. Previously, an edge could only be part of either a source or a target group. -
The
EdgeRouter
class now generates less edge-edge overlaps and a better distribution of edge segments when theEdgeRouter.MaximumDuration
is strongly restricted or set to zero, or when the algorithm is stopped via theAbortHandler.Stop
method. -
The
EdgeRouter
class now avoids superfluous bends that were in some cases caused by group nodes with (small) inset values. -
The path search performance of the
EdgeRouter
class has been improved for cases where an edge has a strong, externalPortConstraint
or a fixed, externalPortCandidate
. -
The
EdgeRouter
class now generates a proper routing from a group node border to a port location inside this group node defined by a strongPortConstraint
or a fixedPortCandidate
. Previously, the route was only calculated to the border and then the last segment was extended without consideration of obstacles and other elements. -
The new properties
AbortHandler
,SourcePortConstraints
,TargetPortConstraints
,SourcePortCandidates
, andTargetPortCandidates
ofChannelEdgeRouterData
facilitate using these features withChannelEdgeRouter
.
Labeling
-
The performance of the
GenericLabeling
algorithm and the quality of the label placements were improved. -
The quality of edge label placement of the
GenericLabeling
class was improved in case that there are multiple labels with a source or target preference near the same node. They may now be placed further away but avoid undesired overlaps.
Other Layouts
-
The new
OrthogonalLayout.PreferParallelRoutes
property allows for controlling how parallel edges (multi-edges) are routed. -
New options of the
PlaceNodeAtBarycenterStage
class allow for specifying the size of affected nodes, considering the grouping structure when calculating the barycenter of nodes as well as removing the bends of edges incident to affected nodes. -
The
TreeReductionStage
now marks non-tree edges if anIDataAcceptor
is registered with the input graph with keyTreeReductionStage.NonTreeEdgeSelectionKey
. This way a user is able to query which edges the algorithm determined to be the non-tree edges. -
The
RecursiveGroupLayout
class now allows to define a localPartitionGrid
structure for each recursively handled group node. See the new propertyRecursiveGroupLayoutData.GroupNodePartitionGrids
for details. -
If the master edge is clipped on the bounds of its source or target, the
ParallelEdgeRouter
class now always clips the associated parallel edges on that bounds, too. -
The
RemoveCollinearBendsStage.Scale
property now also allows zero and negative numbers as its value. This makes it possible to internally round coordinates to full integer values for the comparison of bend points and, thus, the stage can be made more fuzzy. -
The properties
Rows
andColumns
of classPartitionGrid
are now of typeIEnumerable<RowDescriptor>
andIEnumerable<ColumnDescriptor>
instead of an un-typedYList
. -
The
PartitionGridData
class has new propertiesOptimizeRowOrder
andOptimizeColumnOrder
to indicate whether or not the order of the rows respectively columns should be chosen automatically to minimize edge lengths.In addition, the
RowIndices
andColumnIndices
properties of thePartitionGridData
class can now also be used in combination with theGrid
property. -
The
PortCalculator
class now considers edge label positions such they are not affected by whether this stage is applied or not (see propertyLayoutExecutor.PortAdjustmentPolicy
). Previously, label positions could be changed if the label position was stored relative to the first or last segment or the port.
Demos
- The demos now have shorter project and folder names.
Bugfixes
Graph and View
- Fixed a bug in the graph implementation that sometimes lead to a runtime that was quadratic in the number of nodes when creating large graphs.
-
Fixed a bug in the
UndoEngine
class that resulted in memory leaks if the tokens returned byGetToken
were not disposed when theUndoEngine
got cleared. -
The
null
check for theGridVisualCreator.Pen
property works correctly now. -
Fixed a bug in
EdgePathLabelModel
which could return an invalid geometry for parameters with a ratio < 0 and zero length edge segments. -
GeneralPath.Flatten()
: Fixed unexpected behavior if a curve follows after a close operation. -
Fixed a bug in
DictionaryMapper
andWeakDictionaryMapper
where entries with keynull
were not included in the mapper'sEntries
enumeration. -
Fixed an exception which could occur in
CanvasControl
's methodCompareRenderOrder
and when usingGraphModelManager
'sComparer
property. -
Fixed some false positive errors emitted by
PEVerify
due to unused methods. -
Fixed a bug in
FilteredGraphWrapper
which prevented port labels from being correctly added or removed together with their port owner after the predicate changed. -
Setting
null
orVoidNodeStyle
/VoidEdgeStyle
as theNodeStyle
,GroupNodeStyle
orEdgeStyle
inOverviewGraphVisualCreator
no longer results in aNullReferenceException
. -
TextVisual.GetBounds
now returns correct results for Format alignments other then Near.
Input
- Reparenting an expanded group node into a collapsed group node no longer throws an error.
-
With
SmartEdgeLabelModel
, it was impossible to move a label from the left side of an edge to the right side. Instead, the label stopped at the edge. -
The
CreateEdgeInputMode
class now considers the value of theCanvasControl.HitTestRadius
property when itsStartOverCandidateOnly
property is enabled. -
GraphClipboard
's methodsOnElementCut
andOnElementCopied
are no longer called for graph items which are not copied themselves but are owners of copied items.As a consequence, the methods
Cut
andCopy
of theIClipboardHelper
implementations of these elements are no longer called, either. -
When an edge is duplicated using
GraphClipboard
and a port is newly created during this operation, the new port now gets the old port's style and tag. -
The visualization of source port candidates by the
CreateEdgeInputMode
class does not flicker, anymore. -
Fixed a bug in
GraphEditorInputMode
where changing the value ofShowHandleItems
while handles were already displayed resulted in duplicate handles. -
Fixed a bug in
PortRelocationHandleProvider
where the settingsShowPortCandidates
andShowTargetHighlight
were ignored. -
Fixed a bug in
CreateEdgeInputMode.GetPortOwner
which could return edges even ifAllowEdgeToEdgeCreation
was set to false. This could result in the edge'sIPortCandidateProvider
being queried for candidates erroneously. - Zooming the viewport during interaction no longer synthesizes mouse-move events in the wrong locations.
GraphML Serialization
- Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an error.
-
Labels at folder nodes and their adjacent edges are no longer lost during GraphML deserialization
if the
DefaultFolderNodeConverter.CopyFirstLabel
property is enabled. - Fixed GraphML exception when parsing generic types.
Hierarchic Layout
-
The
HierarchicLayout
class now correctly considers the group insets for input graphs with nested group nodes. Previously, it sometimes produced too large insets for inner groups. -
The
HierarchicLayout
class no longer throws an error if it is wrapped by an instance ofRecursiveGroupLayout
and the input graph contains layering constraints between elements of different groups. -
The
HierarchicLayout
class no longer throws anArgumentException
for some rare cases in incremental layout mode. -
The
HierarchicLayout
class now produces shorter, more direct edge routes for edges connecting at a group node and leaving on the the left/right group side. This only affects cases where the relevant group node also contains direct-content edges (seeEdgeLayoutDescriptor.DirectGroupContentEdgeRouting
). -
Self-loop segments generated by the
HierarchicLayout
class are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments. -
The
HierarchicLayout
class now produces less superfluous crossings if there are same-layer edges withPortConstraints
orPortCandidates
. -
The
HierarchicLayout
class now correctly handles port labels with zero height or width. Previously, such labels may have caused very large distances between some nodes. -
The
HierarchicLayout
class sometimes threw anArgumentError
for input graphs that contained incremental elements in combination with groups. -
The
HierarchicLayout
class now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other. -
The
HierarchicLayout
class no longer causes non-orthogonal segments when the input contained port labels in conjunction with edge grouping. -
The
HierarchicLayout
class sometimes threw anArgumentError
for input graphs that contained fixed elements in combination with both swimlanes and groups. -
The
HierarchicLayout
class now correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues. -
The
HierarchicLayout
class no longer produces intersections between edges and elements of a sub-component (seeHierarchicLayoutData.subComponents
). Note that this fix may sometimes cause less compact results within a layer. -
The
HierarchicLayout
class no longer throws an exception if the component arrangement policy is set toComponentArrangementPolicy.Compact
and bus routing is enabled (see propertyHierarchicLayoutData.Buses
).
Tree Layout
-
The
CompactNodePlacer
class no longer throws an exception for input graphs with specified memento strategies (seeTreeLayoutData.CompactNodePlacerStrategyMementos
orCompactNodePlacer.StrategyMementoDpKey
). -
The
CompactNodePlacer
class now correctly considers the specified values of theVerticalDistance
andHorizontalDistance
properties. -
The
CompactNodePlacer
class no longer throws an exception for some inputs with specified strategy memento information. -
The
SimpleNodePlacer
class no longer produces unnecessarily long horizontal edge segments.
Edge Routing
-
The
EdgeRouter
class now correctly routes direct content edges with strong port constraints at the group nodes. Previously, the algorithm sometimes produced weird routes for such edges. -
Fixed a bug in the
EdgeRouter
class that sometimes caused a non-deterministic behavior. -
The
EdgeRouter
class now correctly handles edges with external ports. Previously, such inputs may have caused an exception. -
The
EdgeRouter
class now correctly groups edges associated with equal group IDs that have a different object ID. -
A rare error that was triggered by the
EdgeRouter
class during routing when aGrid
is defined on which edges need to be routed is now fixed. -
The
EdgeRouter
class now avoids unnecessary bends in cases that containPortCandidates
with fixed offsets (or strongPortConstraints
) where the fixed port locations have a very similar x- or y-coordinate such that the path must consist of three segments with a single, very short middle segment. Previously, five segments in total were generated. -
The
PolylineLayoutStage
class no longer generates overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes). -
Fixed a rare error that was triggered by the
EdgeRouter
class during routing in cases where the input contained grouped edges. -
The
EdgeRouter
class no longer throws an exception if theEdgeRouter.PolylineRouting
property is enabled and the input contains fixed, grouped edges. -
The
EdgeRouter
class now considers the correctNodeHalo
associated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments. -
The
EdgeRouter
class now correctly considers intersections between edges and labels of fixed edges if propertyConsiderEdgeLabels
is enabled. -
The
EdgeRouter
class no longer throws an error during routing in cases where the source or target node is covered by obstacles (i.e. by other nodes or labels). -
The
EdgeRouter
class now correctly considers intermediate routing points when using the polyline routing style. Previously, it could happen that intermediate points were not part of the final polyline edge path. -
The
EdgeRouter
class no longer considers allPortCandidates
with multiple directions as fixedPortCandidates
. -
Fixed two issues that induced the violation of a
PortCandidate
with fixed offsets (or a strongPortConstraint
) by theEdgeRouter
class. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node). -
Improved the path search performance of the
EdgeRouter
class for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios. -
The
EdgeRouter
class now correctly handles cases where the maximum duration is exceeded and where previously an exception was triggered. -
Fixed a
StackOverflowException
inEdgeRouter
. -
The
EdgeRouter
class no longer produces bad, non-orthogonal edge segments in cases where a selected edge is grouped together with an un-selected edge and where both edges have strongPortConstraints
at their common source/target node. -
The
EdgeRouter
class no longer throws an exception if all fixed edges of a bus are non orthogonal/octilinear. -
The
EdgeRouter
class now correctly considers strong port constraints of edges that belong to a bus structure.
Labeling
-
The
GenericLabeling
class now produces better results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor.DistanceToEdge
) and at the same time multipleSideOfEdge
preferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it. -
The
GenericLabeling
class now correctly places labels of direct content edges (edges that directly connect a group node with a descendant, without leaving the group) with a free edge label model. -
The
GenericLabeling
class no longer calculates wrong label profit values for some edge labels. Previously, edges that had aPreferredPlacementDescriptor
were sometimes affected. -
The
GenericLabeling
class now always prefersLabelCandidates
with higher profit values over others with lower profit. Previously, this sometimes happened even though both candidates did not intersect with other elements. -
The
GenericLabeling
class no longer assumes that allLabelCandidates
associated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given. -
We fixed a rare bug in the
GenericLabeling
that may have caused anArgumentException
for some input graphs that contain edges with zero length segments and labels associated with a free edge label model. -
The
GenericLabeling
class no longer throws anArgumentException
for some input graphs containing labeled edges with zero length.
Other Layout Styles
-
The
OrthogonalLayout
class no longer throws an exception when propertyOrthogonalLayout.UniformPortAssignment
is enabled and the input contains parallel edges. -
The
OrthogonalLayout
class no longer causes an exception for some input graphs when propertyFaceMaximization
is enabled. -
The
OrthogonalLayout
class no longer runs into an infinite loop for some input graphs that are tree structures with mixed edge directedness. Note that the problem only occurred if propertyOrthogonalLayout.TreeStyle
is not set toTreeLayoutStyle.None
. -
The
OrganicLayout
class no longer throws an exception when usingCycleSubstructureStyle.Circular
and arranging a cycle structure where at least one cycle node is also connected to a group node outside the cycle. -
The
OrganicLayout
class now produces deterministic results for group nodes if its propertyDeterministic
is enabled. -
The
OrganicLayout
class now correctly considers input graphs where substructure handling is enabled and all nodes are located at coordinate(0,0)
. Previously, such inputs may have triggered anArgumentException
. -
When using
RecursiveGroupLayout
, the values of the propertiesComputedWidth
,ComputedHeight
andComputedPosition
of the classesColumnDescriptor
andRowDescriptor
are now correctly set after the layout ifEdgeRouter
is the correspondingInterEdgeRouter
. -
The
ComponentLayout
class now correctly handles input graphs with user-specified components that contain nodes withnull
as their component ID (see propertyComponentLayoutData.ComponentIds
). Previously, such inputs may have caused an exception. -
The
SeriesParallelLayout
class now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception. -
The
PartialLayout
class now correctly considers the specifiedPortCandidates
during orthogonal or octilinear routing of edges. -
The
PartialLayout
class does no longer reduce the size of fixed group nodes if the optionPartialLayout.ResizeFixedGroups
is disabled. -
The
OrganicRemoveOverlapsStage
no longer produces infinite loops in some rare cases. -
The
PortPlacementStage
class no longer destroys the grouping information for the core layout algorithm. -
Fixed a bug in
YGraphAdapter
that could trigger aNullReferenceException
when boolean, integer or double values were requested from registeredIMapper
but no value had been set beforehand. -
The
GraphStructureAnalyzer.HasMultipleEdges
method now returns the correct result for input graphs with self-loops. -
The
Paths.FindAllChains
method now correctly calculates the chains for input graphs with cycles. -
The
Bfs.GetLayers
method now correctly stores the layer indices in the specifiedINodeMap
. Previously, the maximum layer index stored in the map exceeded the number of returned layers. - Fixed a bug which caused licenses for public tokens not to work for the algorithms assembly.
Incompatible Changes
Incompatible API Changes
-
The
ImprovePortAssignment
boolean property ofLayoutExecutor
andLayoutGraphAdapter
has been replaced by thePortAdjustmentPolicy
property. -
SingleItemCollection
'sItem
property has been pulled up toItemCollection
. ClassSingleItemCollection
has been removed, its usages have been replaced byItemCollection
. -
ItemCollection
's type parameter has been constrained to reference types. -
The following properties of specific layout data types now have a name with the correct plural or singular
usage.
-
HierarchicLayoutData.AlternativeEdgePath
has been renamed toAlternativeEdgePaths
. -
TreeLayoutData.LeftRightPlacersLeftNodes
has been renamed toLeftRightNodePlacerLeftNodes
. -
TreeLayoutData.DelegatingNodePlacersPrimaryNodes
has been renamed toDelegatingNodePlacerPrimaryNodes
. -
FixNodeLayoutData.FixedNode
has been renamed toFixedNodes
.
-
-
The type of the properties
BalloonLayoutData.TreeRoot
andTreeLayoutData.TreeRoot
has been changed toSingleItem<INode>
. -
The property
HierarchicLayoutData.AlternativeEdgePaths
now expectsIEnumerable<IPoint>
instead ofYPointPath
as mapped values. -
The property
HierarchicLayoutData.AlternativeGroupBounds
now expectsIRectangle
instead ofYRectangle
as mapped values. -
The properties
Rows
andColumns
of classPartitionGrid
are now of typeIEnumerable<RowDescriptor>
andIEnumerable<ColumnDescriptor>
instead of an un-typedYList
. -
The properties
SourceGroups
andTargetGroups
ofRadialLayoutData
have been removed since edge grouping is not supported by theRadialLayout
class. -
The
PenaltySettings.InvalidEdgeGroupingPenalty
property has been removed. If edge groups are defined, theEdgeRouter
class now always considers them. Therefore, this setting no longer applies. -
IXamlNameMapper.GetType
now has a third argument for optional type parameters. -
Class
TextVisual
now is sealed. -
GraphBuilder
'sEdgeLabelProvider
now is a function with return typeobject
instead ofstring
. The label text will be thestring
returned by the provided item'sToString
method.
Changes of Default Behavior
-
The
SimplexNodePlacer.BarycenterMode
property is now enabled by default. Thus, theHierarchicLayout
class with default settings now produces different (usually more symmetric) layouts. -
GraphClipboard
's methodsOnElementCut
andOnElementCopied
are no longer called for graph items which are not copied themselves but are owners of copied items.As a consequence, the methods
Cut
andCopy
of theIClipboardHelper
implementations of these elements are no longer called, either. -
The default tooltip of the
ToolTipQueryEventArgs
class is now set tonull
. Thus, the tooltip is not displayed when the event is handled without setting the tooltip content. -
The properties
RectangleIndicatorInstaller.Template
andOrientedRectangleIndicatorInstaller.Template
now return always the value that has been set by client code and are not modified by internal code anymore. -
The
GroupingSupport
class no longer throws anArgumentException
if there is a node without associated ID. Instead the class uses the node itself as ID. -
The
HierarchicLayout
class now uses a higher crossing cost for group node borders. To specify custom values, use the propertyHierarchicLayoutData.GroupBorderCrossingCosts
. -
If the master edge is clipped on the bounds of its source or target, the
ParallelEdgeRouter
class now always clips the associated parallel edges on that bounds, too. -
The default value of the property
GridNodePlacer.RootAlignment
was changed toGridNodePlacer.BusAligned
fromRotatableNodePlacerBase.RootAlignment.Trailing
.
Minor Incompatible Changes
-
The method
LayoutData.Apply
is now protected instead of public. -
The
YList.SubList
method was removed since it was not implemented at all and is not used by the library. - The
clone
methods of the geometric typesPoint
,Rect
,Size
, andInsets
was removed since these types are immutable and the methods just returnedthis
. -
The classes
GeneralPath
andGeneralPathCursor
are now sealed. -
The following changes regarding the expert API related to the
EdgeRouter
class were made:- The first parameter of the constructors in class
SegmentInfoBase
is now of typeObject
instead ofEdge
. The provided type should be eitherPathRequest
for affected edges orEdge
for non-affected, fixed ones. Furthermore, the propertySegmentInfoBase.Edge
has been removed as the info is not necessarily associated with an edge anymore. - Similarly, the first parameter of the constructor in class
EdgeCellInfo
is now of typeObject
instead ofEdge
. The provided type should be eitherPathRequest
for affected edges orEdge
for non-affected, fixed ones. - The constructor of class
EdgeInfo
now additionally takes a parameter of typeEdge
. - The parameter of type
Edge
from the constructor ofPath
as well as the respective property were removed. A path is now not necessarily associated with an edge but only with the newly introducedPathRequest
. - The method
PathSearchResult.GetEdgeInfo(Path)
has been removed.
- The first parameter of the constructors in class
yFiles.NET 5.1.0.2
Improvements
OrganicLayoutData
: The new propertiesSourceGroupIds
andTargetGroupIds
can be used to group edges when some preconditions are met.- The performance of the
GenericLabeling
algorithm and the quality of the label placements were improved. - Added the
FixPortLocationStageData
class that allows to conveniently define the port constraints that are considered bytheFixPortLocationStage
class.
Bugfixes
- User interactions in a folded graph which contains labels at ports no longer throw an exception.
- An edge in a folded view no longer loses its bends and labels after it is reversed multiple times.
- Scrolling with
CanvasControl.AnimateScrollCommands
enabled no longer changes the zoom level. - The labels of dragged ports are now displayed correctly by the
PortDropInputMode
class. - The
EdgeStyleDecorationInstaller
class now properly displays decorations for edges between group nodes and their descendants when displayed in view coordinates. - The
EdgeStyleDecorationInstaller
class no longer causes an exception when used on edges that attach to other edges. - Reparenting an expanded group node into a collapsed group node no longer throws an exception.
- Fixed a bug in the graph implementation that sometimes lead to a runtime that was quadratic in the number of nodes when creating large graphs.
GridVisualCreator
now renders grids withGridStyle
Crosses
and different horizontal and vertical spacings correctly.- The
null
check for theGridVisualCreator.Pen
property works correctly now. PixelImageReporter
'sExport
method doesn't get stuck anymore when rendering a grid.ContextConfigurator
'sSetup
method doesn't createIRenderContext
instances with unboundClip
anymore.- With
SmartEdgeLabelModel
it now is possible to move a label from the left side of an edge to the right side. Fixed a bug which stopped the label at the edge. - Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
- Fixed GraphML exception when parsing generic types.
- Fixed a bug that rendered labels or ports neither in a separate layer nor at their owner
when exactly one of
LabelLayerPolicy.AtOwner
orPortLayerPolicy.AtOwner
was used. - The
AutoGroupNodeAlignmentPolicy
valuesCenterLeft
,CenterRight
,TopCenter
,BottomCenter
, andBottomLeft
now work correctly. - The visualization of source port candidates by the
CreateEdgeInputMode
class does not flicker, anymore. - Fixed an exception which could occur in
CanvasControl
's methodCompareRenderOrder
and when usingGraphModelManager
'sComparer
property. - Fixed a bug which might occur in very rare cases in the undo/redo processing of several consecutive reparent actions.
- Fixed a bug in the
UndoEngine
class that resulted in memory leaks if the tokens returned byGetToken
were not disposed when theUndoEngine
got cleared. CollapsibleNodeStyleDecorator
:IsHit
respects buttons outside the node bounds.
Algorithms
- The
Paths.FindAllChains
method now correctly calculates the chains of input graphs with cycles.
Layout
- The
HierarchicLayout
class now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes. - The
HierarchicLayout
class sometimes threw anArgumentException
for input graphs that contained incremental elements in combination with groups. - The
HierarchicLayout
class now prevents intersections between labels and the horizontal grid lines of aPartitionGrid
. - The
HierarchicLayout
class now properly handles input graphs with source/target port labels and where a subset of nodes hasNodeHalos
. Previously, such inputs could cause an exception. - The
HierarchicLayout
class does not longer violate fixedPortCandidates
in cases where also critical edges (HierarchicLayoutData.CriticalEdgePriorities
) and edges connecting to group nodes are given. - The
HierarchicLayout
class now produces less superfluous crossings if there are same-layer edges withPortConstraints
orPortCandidates
. - The
HierarchicLayout
class no longer causes non-orthogonal segments when the input contained port labels in conjunction with edge grouping. - The
HierarchicLayout
class now correctly calculates the required length of straight-line same-layer edges. Previously, the calculated length could have exceeded the required length by the value of theHierarchicLayout.NodeToEdgeDistance
property. - The
HierarchicLayout
class now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other. - The
EdgeRouter
class no longer throws an exception for some inputs containing edges with intermediate routing points. - The
EdgeRouter
class now correctly handles cases where the maximum duration is exceeded and where previously an exception was triggered. - Improved the path search performance of the
EdgeRouter
class for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios. - Fixed a
StackOverflowError
inEdgeRouter
. - When using
RecursiveGroupLayout
, the values of the propertiesComputedWidth
,ComputedHeight
andComputedPosition
of the classesColumnDescriptor
andRowDescriptor
are now correctly set after the layout ifEdgeRouter
is the correspondingInterEdgeRouter
. - The
ComponentLayout
class now correctly handles input graphs with user-specified components that contain nodes withnull
as their component ID (see propertyComponentLayoutData.ComponentIds
). Previously, such inputs may have caused an exception. - The
CompactNodePlacer
class now correctly handles inputs where the tree root is marked as assistant node, seeTreeLayoutData.AssistantNodes
. - The
CompactNodePlacer
class now correctly considers the specified values of theVerticalDistance
andHorizontalDistance
properties. - The
CompactNodePlacer
class now produces more compact results for some cases where it previously generated larger, less compact results. - The
CompactNodePlacer
class no longer throws an exception for some inputs with specified strategy memento information (either via propertyTreeLayoutData.CompactNodePlacerStrategyMementos
or with a mapper registered with keyCompactNodePlacer.StrategyMementoDpKey
). - The
OrthogonalLayout
does no longer throw an exception if a graph is almost a tree and itsTreeStyle
property is set toTreeLayoutStyle.Integrated
and a fixedTreeOrientation
is set. - The
OrganicLayout
class now produces deterministic results for group nodes if its propertyDeterministic
is enabled. - The
OrganicRemoveOverlapsStage
no longer produces infinite loops in some rare cases. - Fixed a potential exception in
LayoutExecutor
which could occur when a layout is applied to a graph which contains table nodes which are not group nodes. - Fixed a bug in class
EdgeRouter
that sometimes caused a non-deterministic behavior. - The
PolylineLayoutStage
does no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes). - Fixed a rare exception that was triggered by the
EdgeRouter
class during routing in cases where the input contained grouped edges. - The
GenericLabeling
class now produces better results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor.DistanceToEdge
) and at the same time multipleSideOfEdge
preferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it. - Fixed two issues that induced the violation of a
PortCandidate
with fixed offsets (or a strongPortConstraint
) by theEdgeRouter
class. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node). - The
EdgeRouter
class no longer throws an exception if theEdgeRouter.PolylineRouting
property is enabled and the input contains fixed, grouped edges. - The
EdgeRouter
class now considers the correctNodeHalo
associated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments. - The
EdgeRouter
class now correctly considers intersections between edges and labels of fixed edges if propertyConsiderEdgeLabels
is enabled. - The
EdgeRouter
class no longer throws an exception during routing in cases where the source or target node is covered by obstacles (i.e. by other nodes or labels). - The
EdgeRouter
class now correctly considers intermediate routing points when using the polyline routing style (EdgeRouter.PolylineRouting
). Previously, it could happen that intermediate points were not part of the final polyline edge path. - The
PartialLayout
class now correctly considers the specifiedPortCandidates
during orthogonal or octilinear routing of edges. - The
EdgeRouter
class no longer considers allPortCandidates
with multiple directions as fixedPortCandidates
. - The
OrthogonalLayout
class no longer throws an exception when propertyOrthogonalLayout.UniformPortAssignment
is enabled and the input contains parallel edges. - Self-loop segments generated by the
HierarchicLayout
class are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments. - The
CompactNodePlacer
class now correctly handles input graphs that contain assistant nodes and given placement strategies (see theCompactNodePlacerStrategyMementos
property of theTreeLayoutData
class). - The
SeriesParallelLayout
class now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception.
yFiles.NET 5.1.0.1
Bugfixes
PortRelocationHandle.GhostVisualizationPenKey
now is excluded from obfuscation.- Fixed the Save command always opening a file dialog even if a file has been specified in a previous file operation.
- The cursor is now correctly reset after editing an orthogonal edge.
- The
CreateEdgeInputMode
class doesn't show port candidates anymore if bend creation is enforced (by pressingCTRL
key during edge creation). - Bridges sometimes didn't appear on edges when they were scrolled into the viewport.
- Fixed a possible infinite loop in the
OrthogonalEdgeHelper
class. - Fixed a possible
NullReferenceError
which could occur in customizedLabelDropInputMode
andPortDropInputMode
classes. - The
Clone
method now is overridable in all style implementations. - The
INodeInsetsProvider
implementations which can be retrieved fromInteriorLabelModel
andInteriorStretchLabelModel
now correctly sum up the space required by overlapping labels. - The scrollbars now respect viewport limits set by a
ViewportLimiter
even if the limited bounds are smaller than theGraphControl
'sContentRect
. - Fixed a possible
NullReferenceException
inTableNodeStyleRenderer
when aTableNodeStyle
is rendered withTable
set to null. - The indicators for bend grid snapping were not always drawn at the correct position for bends which were implicitly moved with a selected edge.
- Fixed
ContextMenuInputMode
not showing the context menu upon the first right click after application startup. - Added missing support for context menus opened with the keyboard. The
PopulateItemContextMenu
event will then be raised for selected items instead of the item under the mouse pointer. KeyboardInputMode
no longer forgets custom key bindings when reinstalled.
Demo Improvements
- The
RenderPolicies
demo has been updated with a better design and description. - Fixed some issues in
BPMN
demo which occured when the style of an edge was changed.
yFiles.NET 5.1
Major New Features
- Labels at Ports
- Labels can now be added to ports and the new label models
FreePortLabelModel
andInsideOutsideLabelModel
can be used to place such labels. On the technical side,IPort
now extends theILabelOwner
interface and the enum constantGraphItemTypes.PortLabel
was added. - Customizable Rendering Order
-
Labels and ports can now optionally be rendered directly in front of their owner. Such a
rendering order can make the ownership of labels and ports clearer if nodes overlap. Previously, all labels and
ports were rendered in front of all nodes. The new rendering order can be enabled by setting the new properties
LabelLayerPolicy
andPortLayerPolicy
ofGraphModelManager
toLabelLayerPolicy.AtOwner
andPortLayerPolicy.AtOwner
, respectively.The nesting options of
GraphModelManager
for the visualizations of nodes and edges have been improved and clarified. The propertiesUseHierarchicNodeNesting
andUseHierarchicEdgeNesting
have been combined into the newHierarchicNestingPolicy
property. It takes values of the newHierarchicNestingPolicy
enum. Its new optionHierarchicNestingPolicy.GroupNodes
configuresGraphModelManager
to visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth. - Drag and Drop
- The new
LabelDropInputMode
andPortDropInputMode
classes implement drag and drop for labels and ports, respectively. The API of these classes is similar toNodeDropInputMode
for nodes. - Lasso Selection
- The new
LassoSelectionInputMode
selects all model items inside a hand-drawn lasso region. This mode allows combinations of free-hand and straight-line sections during path creation. - Improved Orthogonal Layout
-
Many parts of the orthogonal layout algorithm have been significantly
improved. In many cases, the drawings created by this algorithm are now much more compact and have smaller edge
lengths, and they contain less crossings and perceived bends.
In addition, this layout now supports special layout styles of various substructures that are automatically detected in the input graph. Supported substructures are trees, chains and cycles. In addition to the style, the new feature offers more settings, like, for example, the desired tree layout orientation.
Parallel edges (multi-edges that share the same source and target node) are now routed as parallel as possible; if there are edge labels, the routes must differ somewhat. Previously, parallel edges were not handled explicitly and their routes were often very different, making the recognition of parallel structures difficult.
- Sub-components in Hierarchic Layouts
-
In a hierarchic layout, you can now define sub-components of the input graph such
that each sub-component is arranged by a user-specified layout algorithm. This allows hierarchical layouts where
parts of the graph are arranged in a different fashion, e.g., to emphasize special sub-structures. The new
HierarchicLayoutData.SubComponents
property can be used to configure the new sub-components feature of the hierarchic layout. - Tree Map Layout
-
Added the new layout algorithm
TreeMapLayout
that generates tree maps. Tree maps present hierarchical data using nested rectangles (nodes) where each rectangle (node) gets its size depending on a specific dimension of data associated to it. The newTreeMapLayoutData
class provides additional configuration options for this algorithm. - Tabular Layout Style
-
The new layout algorithm
TabularLayout
generates simple tabular arrangements of nodes. It allows to place nodes in rows and columns, such that each table cell contains at most one node. Among its features is, for example, a from-sketch mode, the possibility to exactly map nodes to specific cells or different vertical and horizontal alignments. The newTabularLayoutData
class provides additional configuration options for this algorithm.
New Features
View
-
The following types and methods were added to support the new
LassoSelectionInputMode
.- Added the
GraphInputMode.LassoSelectionInputMode
property and a corresponding factory method.LassoSelectionInputMode
is disabled per default. - The new
GraphInputMode.LassoSelect
method programmatically selects all items in the providedGeneralPath
. - The new
ILassoTestable
interface specifies whether the item is considered to be inside the lasso path. This is analog to theIMarqueeTestable
interface for marquee selection. - Any model item can be decorated with an instance of
ILassoTestable
or provide one in its lookup. For this, theNode
/Edge
/Port
/Label
/BendDecorator
classes got the newLassoTestableDecorator
property for decorating an item with a customILassoTestable
. - The new
IsInPath
method ofNode
/Edge
/Port
/LabelStyleBase
can be overridden to customize the lasso testing behavior.
- Added the
- With
TableEditorInputMode
, double clicking a stripe or stripe label now edits the label in the same way as for other graph items. RectD
andSizeD
: Added methods toreduce
the size of anRectD
andSizeD
instance, respectively.- The new static method
PositionHandlers.Combine
combines multiple position handler instances into a single instance. - Added the events
ElementsCopied
,ElementsCut
, andElementsPasted
toGraphEditorInputMode
, and the eventElementsCopied
toGraphViewerInputMode
. - The new
Animations.CreateSequentialAnimation
method creates an animation that animates multiple animations in sequence. - The rectangle of the marquee selection can now be customized with the new protected method
MarqueeSelectionInputModes.CalculateMarqueeRectangle
. - Added new decorator implementations for table items. You can access these new decorators via
the new method
ITable.GetDecorator
with theRowDecorator
,ColumnDecorator
andStripeLabelDecorator
properties. - If the new
CanvasControl.QuantizeInputCoordinates
property is enabled, world coordinates of mouse events are rounded to nicer values to avoid unnecessary precision. For example, you'll get the value 326.375 instead of 326.3758109495. The rounding is chosen based on the zoom level to ensure that there is almost no visual deviation. Lower zoom levels will result in coarser rounding, higher zoom levels will use exactly as much precision as necessary. By default, this option is enabled.
Layout
- Added the
TreeMapLayoutData
configuration class for the newTreeMapLayout
algorithm. - Added the
TabularLayoutData
configuration class for the newTabularLayout
algorithm. - Added the
TemporaryGroupNodeInsertionData
configuration class for the newTemporaryGroupNodeInsertionStage
layout stage. - The new
HierarchicLayoutData.SubComponents
property can be used to configure the new sub-components feature of the hierarchic layout. - The new
TreeLayoutData.CompactNodePlacerStrategyMementos
property can be used to maintain similar layout styles over subsequent runs of compact tree layout. -
ShortestPaths
: Added a-star (A*) algorithm for finding the shortest path between two nodes in a directed or undirected, arbitrary graph. -
The new property
OrthogonalLayout.MaximumDuration
controls the preferred time limit of this layout algorithm. -
The new
OrthogonalLayout.UniformPortAssignment
property allows you to obtain results with a more uniform port assignment. -
TreeLayout
: Added node placerCompactNodePlacer
that produces more compact tree layouts. It uses a dynamic optimization approach that chooses a placement strategy of the children such that the overall result is compact with respect to a specified aspect ratio, see propertyCompactNodePlacer.PreferredAspectRatio
. -
EdgeRouter
now supports routing through user-specified intermediate points. All specified points will lie on the edge route in the given order. See new propertyEdgeLayoutDescriptor.IntermediateRoutingPoints
. -
EdgeRouter
: Edges that connect group nodes with their descendants can now directly connect from the inside to the group node border. Previously, an edge needed to always leave the group node before connecting to it. The feature can be enabled/disabled individually for each edge using the new propertyEdgeLayoutDescriptor.DirectGroupContentEdgeRouting
. -
Added convenience layout stage
TemporaryGroupNodesInsertionStage
that automatically generates a (non-nested) grouping structure from a given mapping of nodes to a component ID. This temporary grouping is meant for use during the run of the core layout algorithm of the stage. It allows, for example, easy use ofRecursiveGroupLayout
without the need for a real grouping structure when the requirement is that different sub-graphs need to be arranged with different layout algorithms.The new
TemporaryGroupNodeInsertionData
class provides additional configuration options for this algorithm. -
The new
PlaceNodesAtBarycenterStage
places a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these nodes are hidden.
Improvements
General
- The
PointD.ToMutablePoint
andRectD.ToMutableRectangle
methods now return aMutablePoint
instead ofIMutablePoint
and aMutableRectangle
instead of aIMutableRectangle
, respectively. - The new method
determines whether the path intersects with anotherGeneralPath.Intersects(GeneralPath)
GeneralPath
. - When reading GraphML with the deserialization property
IgnoreXamlDeserializationErrors
enabled, invalid property content is now skipped instead of discarding the whole object with such content.
Graph
- Many label model
CreateParameter
methods now have default values for parameters that are not needed every time. InteriorStretchLabelModel
: Added new parametersCenterHorizontal
andCenterVertical
for horizontal or vertical centered one-line labels.- The
ElementCopiedCallback
parameter of the methodsGraphCopier.Copy
andGraphClipboard.Duplicate
is now optional (and can be null). - Added a
Remove
method toNodeDecorator
,LabelDecorator
,EdgeDecorator
,PortDecorator
, andBendDecorator
for easy removal of decorations. GraphBuilder
now supports edges to and from group nodes.GraphBuilder
now supports parent-child relationships between nodes defined inNodesSource
when noGroupsSource
is set. The parent node of such a relation is converted to a group node.- The default value of
DefaultPortCandidate.LocationParameter
is nowFreeNodePortLocationModel.NodeCenterAnchored
for nodes andBendAnchoredPortLocationModel.FirstBend
for edges instead of a parameter of an internal model. DefaultGraph
has new factory methods to customize undo unit creation.
View
- Added the new
CanvasControl.LimitFitContentZoom
property which controls whether the maximum zoom level for theCanvasControl.FitContent
method as well as theFitContent
command is restricted to1
or the value of theMaximumZoom
property. - The new method
GraphModelManager.GetMainCanvasObject
returns the canvas object that should be used when changing the visibility or z-order of a model item. - The
ComponentCommands.ScrollPage
commands now accept anyIConvertible
command parameter instead of only doubles and strings. - Akin to the two
CanvasControl.ZoomTo
methods, there are now twoCanvasControl.ZoomToAnimated
methods that animate the viewport change. - Assigning a new graph instance to
GraphOverViewControl
now keeps configuration changes made to the overview'sVisualCreator
instance. - Selfloop edges are now properly displayed in the
GraphOverviewControl
. - Animations after a layout don't break anymore if the graph is modified concurrently.
ICanvasObjectGroup.AddChild(Object,ICanvasObjectDescriptor)
: The second parameter is now a default parameter with default value null and therefore changed its attribute toCanBeNull
. If no descriptor is passed,CanvasObjectDescriptors.AlwaysDirtyInstance
is used by the default implementation.GraphModelManager
now avoids unnecessary re-installation of items if they keep theirICanvasObjectGroup
. By these re-installations the z-order of the item in its group was lost and a new visual was created.PolylineEdgeStyle
renders better looking paths for self loop edges whose ports are near the node border.
Input
- The
CanvasControl.CreateInputModeContext
method is now public instead of protected. GraphEditorInputMode
andTableEditorInputMode
: MethodEditLabel
now also returns a Future, similar toAddLabel
andCreateLabel
.- The
INode
parameter of theNavigationInputMode.EnterGroup
method is now optional. If it is omitted ornull
the whole graph will be revealed. - Moving a node with the
MoveInputMode
for unselected nodes now moves the bends of adjacent self-loops, too. - The new methods
FindNextItem
andFindNearestItem
ofNavigationInputMode
can be used to configure the determination of the "next" item. - The type parameter
T
of classItemDropInputMode
<T> is no longer restricted toIModelItem
. - The following input modes now release the mutex before dispatching their final event:
CreateEdgeInputMode
now releases the mutex before dispatching theEdgeCreated
event.MoveInputMode
now releases the mutex before dispatching theDragFinished
event.ResizeStripeInputMode
now releases the mutex before dispatching theDragFinished
event.
CreateEdgeInputMode
now removes coinciding bends if orthogonal edge creation is enabled.- The new
CreateEdgeInputMode.GetSourcePortCandidates
protected method makes source port candidate determination more flexible. - The new optional parameter
initialTargetLocation
of theCreateEdgeInputMode.DoStartEdgeCreation
method can be used to define the initial location that shall be used to find a target node. - During interactive edge creation, the tip of a newly created edge now only snaps to valid target port candidates to create orthogonal end segments.
CreateEdgeInputMode
now always creates dummy ports during a gesture, instead of temporarily reusing real ports if available. This makes it possible to change, e.g. the dummy edge's source port's style during the gesture.- The new
CreateEdgeInputMode.StartOverCandidateOnly
property can be used to restrict the start of an edge creation gesture to directly hovered port candidates. - The new
TextEditorInputMode.TextBoxPlacementPolicy
property provides finer control of what happens when theTextBox
is (partially) outside of the viewport. - The new
TextEditorInputMode.TextBoxPadding
property controls the padding between theTextBox
and the border of the canvas. - The
CanvasControl.Mouse2DClicked
event now reports the position of the mouse down event as its location. Previously, this was the location of the up events which can be slightly different. - The properties
MaximumSnapDistance
,ShowHitPortOwnerCandidatesOnly
andVisualization
have been added toPortRelocationHandleProvider
and are applied to eachPortRelocationHandle
created by this provider. - Added overridable methods to
PortRelocationHandle
to allow customization of the port candidates. - The new
PortRelocationHandle.Visualization
property controls how the preview during edge reconnection is handled. A new option is to change the edge during the gesture, which improves fidelity of the preview in certain cases. - The new optional
content
parameter of theMouseHoverInputMode.Show
method defines the content of the tool tip to show. Now, theGetToolTipContent
method only gets called if no content was specified. - The static constants
SelectedMovablesPositionHandler
andSelectedMovablesHitTestable
have been added toGraphEditorInputMode
. These are used as defaultPositionHandler
andHitTestable
properties ofGraphEditorInputMode.MoveInputMode
and can be reused for other input modes. - Introduced new property
HandleMissingMouseEvents
onCanvasControl
which allows for configurable handling of mouse gestures which are only received partially. - Canceled input modes now don't run unnecessary hit tests.
- The
CanvasControl
now reports losing the mouse capture with aMouse2DEvent
with the typeLostCapture
. Several input modes listen to this event and cancel themselves upon it.
Table
- The last parameter of the following extension methods of
ITable
is now optional:FindRow
,FindColumn
,FindStripe
, andFindStripes
. TableEditorInputMode
now handles clicks similar toGraphEditorInputMode
:- New
ItemClicked
,ItemLeftClicked
,ItemRightClicked
,ItemDoubleClicked
,ItemLeftDoubleClicked
,ItemRightDoubleClicked
events are raised. - If an event is handled, its default behavior is prevented.
- The new properties
ClickableItems
andClickableRegions
determine for which items and regions a click event will be raised.
- New
Layout
- The new
LayoutExecutor.CreateLayoutGraphAdapter
callback method makes it possible to configure theLayoutGraphAdapter
that is used for the layout calculation. - The new
TreeLayoutData.CriticalEdgePriorities
property can be used to specify critical edges. SmartEdgeLabelModel
now is properly handled by labeling algorithms, resulting in better label placements.- The new
ImprovePortAssignment
property ofLayoutExecutor
andLayoutGraphAdapter
enablesPortCalculator
to improve the port assignment. - The combination of
PartitionGridData
andTableLayoutConfigurator
has been improved:PartitionGridData
now reuses thePartitionGrid
created by theTableLayoutConfigurator
.- Several methods have been added to
TableLayoutConfigurator
which provide access to thePartitionCellId
assignment of the configurator as well as the mappings betweenIRow
/IColumn
andRowDescriptor
/ColumnDescriptor
.
-
Major performance improvement for
EdgeRouter
in routing scenarios where it is unavoidable to cross obstacles (e.g. other nodes or labels) in order to reach the target. This includes cases where a crossing is necessary to guarantee that port candidates/constraints at the target side are satisfied.In addition, several minor performance improvements reduce the runtime of the path search phase as well as the segment location assignment phase.
-
EdgeRouter
: Improved quality in maze routing scenarios. Previously, it could happen that edge-node overlaps occurred even though there exists a more complicated path that yields no overlaps. -
BusRouter
: Now automatically ignores non-orthogonal edges with fixed bus descriptor (seeBusDescriptor.Fixed
) or transforms them into orthogonal edges if they are octilinear. In previous versions, the layout algorithm simply throws an error in such cases. -
MultiPageLayout
: Improved runtime as well as layout quality if the input is a tree structure and the specifiedCoreLayout
is either an instance of classTreeLayout
orClassicTreeLayout
. Furthermore, propertyMultiPageLayout.AdditionalParentCount
allows to specify the number of additional proxies that the algorithm tries to add to a subtree. The original nodes associated with these proxies lie on the path of the tree's root to the subtree placed on a page. -
MultiPageLayout
: Added propertyCreateProxyReferenceNodes
that allows to disable the creation of proxy reference nodes as well as propertyMultipleComponentsOnSinglePage
that allows to prevent that elements of different connected components are placed on the same page. -
PortPlacementStage
now additionally considers port grouping constraints. If two edges are port-grouped at a certain node, the stage assigns the same port location to the edges. Port groups are marked usingDataProvider
s registered withPortConstraintKeys.SourcePortGroupIdDpKey
andPortConstraintKeys.TargetPortGroupIdDpKey
. -
TreeComponentLayout
: Added propertyConsiderUndirectedTrees
that allows to specify whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered. -
DefaultNodePlacer
andSimpleNodePlacer
now both support to specify a minimum distance between the edge segments that are routed orthogonally in the channel between the root node and the child nodes, see methodDefaultNodePlacer.MinimumChannelSegmentDistance
andSimpleNodePlacer.MinimumChannelSegmentDistance
respectively. -
ClassicTreeLayout
now allows you to specify a minimum vertical distance for the horizontal edge segments of the bus, seeClassicTreeLayout.MinimumBusSegmentDistance
. -
The new properties
LayerConstraints
andSequenceConstraints
ofHierarchicLayoutData
can be used to configure layer and sequence constraints for theHierarchicLayout
. These supersede the previousLayerConstraintFactory
andSequenceConstraintFactory
properties. -
OrthogonalLayout
: Reduced the number of bends of directed edges. -
The
EdgeRouter
class now calculates a better routing for edges between group nodes and their descendants in the case that the routing is aborted viaAbortHandler
or when the maximum duration time limit is up. Previously, such edges might not have been handled in this case, whereas now they always get a simple but valid orthogonal route. -
The
HierarchicLayout
class now respects the sequence and layering constraints between subcomponents. Previously, such constraints were ignored. - Added
PlaceNodesAtBarycenterStageData
which allows to conveniently define the affected nodes that should be affected byPlaceNodesAtBarycenterStage
. - The
HierarchicLayout
now requires less memory for graphs with sequence constraints. - The
HierarchicLayout
no longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges.
Bugfixes
Graph and View
- Reduced memory consumption of
DefaultEdgePathCropper
. - Fixed a bug that sometimes detects a mouse move instead of a mouse drag.
- The
Mouse2DEventTypes.Entered
event now provides the correct coordinates. - Fixed a bug that sometimes prevented dispatching the mouse up event.
- Fixed an exception when an edge or label is pasted without selected target while its original owner is not in the current view.
PolylineEdgeStyle
now takes arrow heads into account for visibility checks.- Removing an item that is currently highlighted with a custom
HighlightIndicatorManager
,FocusIndicatorManager
, orSelectionIndicatorManager
no longer results in aNullReferenceException
. - The extension method
OrientedRectangleExtensions.GetCenter
didn't return the correct center if the width or height of the rectangle was equal to 0. - The
HitTestRadius
property of the following implementations ofICanvasContext
now correctly contain the value in world coordinates instead of view coordinates:- The context created by
Contexts.CreateCanvasContext
when passing aCanvasControl
but no hit test radius. - The context passed to
IPositionHandlers
byMoveInputMode
. - The context passed to adjacent handles when moving a bend handle.
- The context created by
- The
InteriorStretchLabelModel.GetMinimumNodeSize
method now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width. - Sometimes, the
GroupNodeDefaults.Labels.AutoAdjustPreferredSize
property and theGroupNodeDefaults.Ports.AutoCleanup
property were not considered for labels and ports of groups. - The
ApplicationCommands.Copy
command is no longer executed twice. - The methods
GraphClipboard.Copy
andGraphClipboard.Cut
don't copy items anymore which depend on items that are selected but not included inGraphClipboard.CopyItems
. - Snap lines which indicate the same size are no longer shown for implicitly re-sized parent group nodes.
- The validation schema for GraphML has been fixed to work with more validators.
FreeEdgeLabelModel
: Static propertyInstance
is now excluded from obfuscation.- The graph of an
IFoldingView
now raises theNodeCreated
,EdgeCreated
,PortAdded
,LabelAdded
, andBendAdded
events after the created element is registered. This fixes a bug where the master item of the created item was not available in handlers for these events. - Fixed wrong types of exceptions:
GraphMLIOHandler
: The methodsOnQueryName
andOnQueryType
now throw anArgumentNullException
instead of aNullReferenceException
when one of the arguments is null.Table
: The methodsSetLabelText
,Remove
,SetLabelPreferredSize
andSetLabelLayoutParameter
now throw anArgumentException
instead of anInvalidOperationException
.
- Undo units created by the execution of a layout algorithm are now correctly merged with undo units of the previously executed interactive gesture.
- The default implementation of
IPortSnapResultProvider
never returned any snap results. - Corrected weird scrolling behavior of the scroll bar when the viewport was outside the content rectangle.
DefaultGraph
now calls theOnRemovingEdge
andOnRemovingPort
methods before their incident items are removed.- The commands
Copy
,Cut
, andDuplicate
are no longer enabled if there are no elements to cut, copy, or duplicate. - The
GroupingSupport.HasGroupNodes
method now returns only true if there are actually group nodes in the graph. Previously, it returned also true if there once were group nodes which had been removed in the meantime. BevelNodeStyleRenderer
,PanelNodeStyleRenderer
,ShadowNodeStyleDecorator
andShinyPlateNodeStyleRenderer
now consider the shadow in theirIsVisible
andGetBounds
methods.- Bridges: For edges which cross each other with the same absolute slope now a bridge is added on exactly one of these edges, depending on the crossing policy (was: either on both edges or none of them).
GraphModelManager
: FixedNullReferenceException
that occured when any of the Descriptor properties were set while theGraphModelManager
instance was not yet associated to anIGraph
.GenericLabelModel
serialization: Fixed cyclic reference in GraphML which could happen while serializing aGenericLabelModel
with a parameter with associated descriptor.- The methods
GetBounds
andIsVisible
describing theRectangleIndicatorInstaller
returned wrong values. This could impact the performance as e.g. some node selection highlights were updated although they were not in the view port and result in unnecessary large content rectangles. - Fixed
IHitTestable
implementation ofDefaultPortCandidateDescriptor
which used incorrect coordinates. - Fixed the Save command always opening a file dialog even if a file has been specified in a previous file operation.
PortRelocationHandleProvider
now can handle null as "graph" constructor parameter.- The
PreferredPlacementDescriptor.Equals
method incorrectly reported instances with different angles and distances as equal. SmartEdgeLabelModel
centered all labels on an edge that overlapped with a segment of the edge or were placed directly next to it.- Fixed a possible
NullReferenceException
in class Animator, that might be caused when usingMoveViewportInputMode
with inertia. - Fixed viewport "jumping" during mouse wheel zoom in rare cases.
- GraphBuilder: Two group nodes can now reverse their parent/child relationship between two calls to UpdateGraph without an exception.
CanvasControl
: Fixed possible changes toZoom
when moving the viewport while aViewportLimiter
is active.
Input
- Fixed possible
NullReferenceException
whenTextEditorInputMode
was uninstalled directly after starting an edit. ClickInputMode
provided wrong click locations in theClicked
event if aMouse2DEventTypes.Clicked
event without precedingMouse2DEventTypes.Pressed
event was processed.CreateEdgeInputMode
andCreateBendInputMode
now cancel onLostCaptureDuringDrag
event.CreateEdgeInputMode
did not show port candidates after re-installation of the input mode.- Moving an edge label with
SmartEdgeLabelModel
that is owned by an edge without visible path no longer throws an exception. ItemHoverInputMode
now resets the hovered item when moving the mouse out of the control.GraphEditorInputMode
andGraphViewerInputMode
no longer ignore changes to their sub-input modes after having been installed once.- Disabling
MarqueeSelectionInputMode
during the gesture via code left the marquee visible on the screen. - While relocating edges, dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
- The
Clicked
andDoubleClicked
events ofClickInputMode
were sometimes missing when clicking on a node or edge. Now, they are always triggered unless the event was handled before. TextEditorInputMode
: Inserting a line break now replaces selected text.- Node-to-edge snapping is now disabled by default which is the documented and intended value.
For this, the initial value of the
GraphSnapContext.NodeToEdgeDistance
property is set to-1.0
. - The
LabelEditingEventArgs.Context.ParentInputMode
property provided in the eventsGraphEditorInputMode.LabelAdding
,GraphEditorInputMode.LabelEditing
,TableEditorInputMode.LabelAdding
andTableEditorInputMode.LabelEditing
now contains the correspondingGraphEditorInputMode
orTableEditorInputMode
instance. CreateEdgeInputMode
: TheValidBeginCursor
is now correctly hidden during edge creation when bend creation isn't allowed.CreateEdgeInputMode
didn't always update the highlight of possible source port candidates when itsShowPortCandidates
property was configured to show the source port candidates.- Switching the input mode in an event handler of the current input mode no longer throws an exception.
ItemHoverInputMode
updates the hovered item upon mouse drag events, too. This is the documented behavior. Previously, the hovered item was only updated on mouse move events.ItemHoverInputMode
removes the hovered item uponCancel
.- The
ParentInputMode
property of theInputModeEventArgs
now is the input mode which has raised the event. Previously, some input modes erroneously set theParentInputMode
to the containingGraphEditorInputMode
orGraphViewerInputMode
. GraphClipboard
: The contents of a folder node was not copied if the folder was copied from within a group view, i.e. if the user entered a group node. In the worst case, this might have frozen the complete application.MouseHoverInputMode.QueryToolTip
was raised twice for every mouse hover event.
Table
- When a stripe is removed,
ITable.LabelRemoved
events for the implicitly removed associated labels are now raised, too. - When a selected stripe label is edited its
TextBox
now is correctly placed. - Selected stripe labels no longer remain selected after their owning stripe is deleted.
- Selected stripe labels no longer cause exceptions when hovering over them.
- The selection indicator for selected stripe labels is now shown correctly.
Layout
OrthogonalLayout
now considers edge grouping also if there are no directed edges specified.-
In
EdgeRouter
, an error occurred when there were intermediate routing points and the path search got aborted (e.g. because of maximum duration time limit). -
In
ShortestPaths
, an error occurred when the a-star algorithm was applied to a graph with non-monotonic heuristic costs. -
In
HierarchicLayout
, an error was triggered when ayWorks.Algorithms.Util.DataProviderAdapter
that does not override theDataProvider.get
method was registered with keyGivenLayersLayerer.LayerIdDpKey
. This issue only appeared in conjunction with subcomponents. - The
HierarchicLayout
now produces less bends if the edges should be routed on a grid and the grid reference point is not(0,0)
, seeNodeLayoutDescriptor.GridReference
. HierarchicLayout
did sometimes not correctly consider the edge thickness for grouped edge segments. Even though there would have been space for a thick edge it was placed too close to other elements.HierarchicLayout
now produces more symmetric results for grouped edges if propertySimplexNodePlacer.BarycenterMode
is enabled.- Fixed a rare bug in
OrthogonalLayout
that may have caused infinite looping for grouped input graphs. - For some input graphs the
OrganicLayout
produced an error if theCycleSubstructureStyle
property was set toCycleSubstructureStyle.Circular
. CircularLayout
does now correctly consider theEdgeBundleDescriptor.Bundled
property for edges between different partitions. Previously, when at least one of these edges had theBundled
property enabled, all of them were bundled, ignoring the property value of the other edges.- Fixed a bug in
TreeMapLayout
that may have causedNaN
-coordinates or infinite looping for input graphs that are non-directed trees. - For grouped segments the
GraphLayoutLineWrapper
now produces more compact results. - In rare cases the
GraphLayoutLineWrapper
produced drawings with large empty space between lines. -
HierarchicLayout
: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers. -
The
MultiPageLayout
now correctly considers the maximum page size for tree layouts. -
TabularLayout
no longer crashes when applying an instance of it to a single-node graph after that same instance was previously applied to a larger graph. -
HierarchicLayout
now correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues. -
GenericLabeling
now always prefersLabelCandidates
with higher profit values over others with lower profit (seeLabelingBase.GetProfit
). Previously, this sometimes happened even though both candidates did not intersect with other elements. -
GenericLabeling
does no longer assume that allLabelCandidates
associated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given. -
The
EdgeRouter
now always considers thePortCandidates
for edges grouped with fixed edges. -
The
EdgeRouter
now keeps collinear bends of fixed edges. -
The
FamilyTreeLayout
now correctly considers the preferred family member order. OrthogonalLayout
does no longer throw an exception for some input graphs when propertySubtreeStyle
is set toCompact
andChainStyle
is set to a wrapped style.OrthogonalLayout
no longer throws exceptions if propertyCycleStyle
is set to a specific style and the input graph only consists of a single cycle.BusRouter
does no longer produce non-deterministic results, i.e. different results for consecutive runs on the same input. Previously, this was possible in rare cases.EdgeRouter
does no longer crash when defining exactly two equal intermediate routing points for an edge.- An invalid license no longer leads to a
NullReferenceException
when callingIGraph.ApplyLayout
.
Incompatible Changes
Incompatible API Changes
ReparentStripePositionHandler
: All callback methods dealing with ghost objects have been renamed consistently:UpdateXyzVisualisation
toUpdateXyzGhost
.UpdateTargetVisualizationBounds
toUpdateTargetGhostBounds
.
- The protected factory method
MoveLabelInputMode.CreateLabelHitTestable
has been removed. Developers who want to set a custom instance need to set it directly to theHitTestable
property. -
The
CanvasControl.AnimateScrollTo
method has been removed and is superseded by the newZoomToAnimated
methods. - The
AnchoredPortLocationModelExtension
class has been moved to the GraphML compatibility demo where it was really needed. - The
GraphInputMode.CanvasClicked
event now provides theGraphEditorInputMode
or theGraphViewerInputMode
as parent input mode in theContext
property of itsClickEventArgs
. - The
ITable.RelativeLocation
property has been removed. UseITable.Insets
with correspondingLeft
andTop
values instead. - Renamed all occurrences of
Cleanup
toCleanUp
in API names. ItemClickedEventArgs
now extendsClickEventArgs
.CreateEdgeInputMode
'sEdgeCreator
might receive null astargetPortCandidate
parameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null.- The
StripeSubregion.TargetTableNode
property is now read-only. - Renamed the enumeration value
ShowFocusPolicy.WhenFocused
toOnlyWhenFocused
. - Removed unnecessary
Enabled
parts from the following property names.EdgeSegmentLabelModel.AutoRotationEnabled
is nowAutoRotation
.EdgePathLabelModel.AutoRotationEnabled
is nowAutoRotation
.LabelLayoutTranslator.AutoFlippingEnabled
is nowAutoFlipping
.SingleCycleLayout.FromSketchModeEnabled
is nowFromSketchMode
.SliderEdgeLabelLayoutModel.AutoRotationEnabled
is nowAutoRotation
.DiscreteEdgeLabelLayoutModel.AutoRotationEnabled
is nowAutoRotation
.
- Renamed the
Animator.Destroy
method toStop
. - The
GraphEditorInputMode.CreateMoveUnselectedInputMode
method has been removed. Use the propertyMoveUnselectedInputMode
instead. - The
CreateEdgeInputMode.ShowPortCandidates
property has now the enum typeShowPortCandidates
instead ofboolean
. - Removed the (undocumented) classes
SelectionControl
,HighlightControl
, andFocusControl
. - Removed
SnapLine.SnapLineColorKey
, which never worked correctly. UseSnapLine.SnapLinePenKey
instead. - Removed properties for touch devices from
MoveViewportInputMode
.
Changes of Default Behavior
- The
OverviewInputMode.AutoMouseWheelZoom
property is superseded by the newMouseWheelBehavior
property. RectD.IsFinite
andSizeD.IsFinite
now also consider empty instances as not finite.- By default, stripe labels that are programmatically selected or highlighted don't show a selection or highlight indicator anymore.
- Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time. Previously, the duration depended on the initial inertia velocity.
- The
IGraph.SetNodeLayout
method and the various methods to create a node now throw anArgumentException
if the layout rectangle contains one or moreNaN
values. Similarly, theIGraph.SetBendLocation
and the various methods to add a bend to an edge now throw anArgumentException
if the location point contains one or twoNaN
values. - GraphML: Duplicate properties on XAML input are now considered an error in accordance with the XAML specification.
- The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. This can result in a slightly different rendering of the arrows.
- The
CreateEdgeInputMode.DummyEdge
property is now always reset after the edge creation was finished or canceled. MoveLabelInputMode
: The moved label now is visualized as a preview instead of a symbolic rectangle. Set theVisualization
property toVisualization.Ghost
to restore the old mode.- The
LayoutExecutor.UpdateContentRect
property is now enabled by default. CreateEdgeInputMode
, determination whether the mouse hovers over a valid end: ifForceSnapToCandidate
is disabled, theEndHitTestable
now is queried first and a target port candidate is only searched if the hit testable returns true. Previously, the hit testable was only queried if no target port candidate was found at the current location.- Previously, even if the
GraphModelManager.UseHierarchicEdgeNesting
property was set to true, canvas objects for edges were added to theGraphModelManager.EdgeGroup
as long as no group nodes were part of the graph. The corresponding newHierarchicNestingPolicy
NodesAndEdges
has no such behavior and thus,EdgeGroup
is empty by default. Use one of the other polices if canvas objects for edges should be part ofEdgeGroup
. PolylineEdgeStyle
defaults to an improved smoothing algorithm when using theSmoothingLength
property. This is especially apparent when using large values forSmoothingLength
.- The mouse button which is reported in
Mouse2DEventArgs
now is more synchronized with the real mouse button state. The old behavior can be restored using the new propertyHandleMissingMouseEvents
onCanvasControl
. TextEditorInputMode.Editing
is now false whenUninstallTextBox
is called.TextEditorInputMode.InstallTextBox()
is now called afterAdjustPosition
andAdjustSize
, so theTextBox
is not yet available as a child control of the Canvas in those methods.
Minor Incompatible Changes
- The method
CollapsibleNodeStyleDecorator.CreateSelectionInstaller
has been removed.
Types and Members Marked as Obsolete
- The properties
LayerConstraintFactory
andSequenceConstraintFactory
ofHierarchicLayoutData
have been marked as obsolete. The new propertiesLayerConstraints
andSequenceConstraints
should be used instead. Similarly, the extension methodsHierarchicLayout.CreateLayerConstraintFactory(IGraph)
andHierarchicLayout.CreateSequenceConstraintFactory(IGraph)
have been marked as Obsolete.
Most Notable Demo Improvements
- The new
RotatableNode
demo shows how support for rotated node visualizations can be implemented on top of the yFiles library. -
The new
RenderPolicies
demo shows the effect of different render policies on the z-order of nodes, edges, labels and ports. This demo replaces theIntegrated Node Style
demo. - Demonstrated highlighting elements as hover effects in the Viewer demo.
GraphMLCompatibility
demo: Added missing implementation ofAnchoredParameter
.BpmnDemo
: Fixed clone implementations of some styles.yEd.NET
: Fixed a bug that prevents using triangle arrows for edges.
yFiles.NET 5.0.0.2
Bugfixes
- Fixed an exception in
DropInputMode
which occurred if a drag enter was recognized while another drag action was still running. - Removing an item that is currently highlighted with a custom
HighlightIndicatorManager
,FocusIndicatorManager
, orSelectionIndicatorManager
no longer results in aNullReferenceException
. - Moving an edge label with
SmartEdgeLabelModel
that is owned by an edge without visible path no longer throws an exception. GraphEditorInputMode
andGraphViewerInputMode
no longer ignore changes to their sub-input modes after having been installed once.CreateEdgeInputMode
no longer fires gesture cancel events if it has not been started before.- Fixed a bug in
CreateEdgeInputMode
which caused port candidates not to be shown after re-installation of the input mode. - The extension method
OrientedRectangleExtensions.GetCenter
didn't return the correct center if the width or height of the rectangle was equal to 0. StripeDropInputMode
no longer callsItemCreator
twice.- The
StripeDropInputMode.ItemCreated
event now is properly raised. - The
InteriorStretchLabelModel.GetMinimumNodeSize
method now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width. MoveViewportInputMode
: TheDragging
,Dragged
,DragCanceling
,DragCanceled
,DragFinishing
andDragFinished
events did not fire reliably for touch input and when mouse inertia was active.TextEditorInputMode
: inserting a line break now replaces selected text.- The
HitTestRadius
property of the following implementations ofICanvasContext
now correctly contain the value in world coordinates instead of view coordinates:- The context created by
Contexts.CreateCanvasContext
when passing aCanvasControl
but no hit test radius. - The context passed to
DisposeVisualCallback
. - The context passed to
IPositionHandlers
byMoveInputMode
. - The context passed to adjacent handles when moving a bend handle.
- The context created by
- Fixed an issue where bridges would erroneously appear when using
EdgeStyleDecorationInstaller
to use an edge style for highlight or selection. RectangleVisual
no longer truncates the rectangle coordinates to integers when drawing a rectangle with an outline.- Fixed validation for signing licenses which could fail with certain public keys.
- Fixed an error message that could appear erroneously at build time when using a signing license.
- Fixed a
NullReferenceException
when callingIGraph.ApplyLayout
when the license is invalid. - Sometimes, the
GroupNodeDefaults.Labels.AutoAdjustPreferredSize
property and theGroupNodeDefaults.Ports.AutoCleanup
property were not considered for labels and ports of groups. - Relocation of edges: dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
- The
ApplicationCommands.Copy
command is no longer executed twice. - The validation schema for GraphML has been fixed to work with more validators.
FreeEdgeLabelModel
: static propertyInstance
is now excluded from obfuscation.AdjacentNodesGraphBuilder
andTreeBuilder
no longer remove unchanged nodes unnecessarily when those have been created lazily.
Layout
- Corrected an error in the
Rectangle2D.Contains(Rectangle2D)
method. As a consequence of this error, the results of various algorithms and automatic layouts could have been wrong. - Fixed some
InvalidCastExceptions
that might occur when using port candidates. -
HierarchicLayout
: FixedArgumentException
that could be triggered when the user specified both edge directedness (seeHierarchicLayout.EdgeDirectednessDpKey
) and layering constraints. -
HierarchicLayout
with partition grid: Fixed bug that in some cases caused anArgumentException
when the layout algorithm was configured to stop after the layering or sequencing phase (seeHierarchicLayout.StopAfterLayering
andHierarchicLayout.StopAfterSequencing
). -
HierarchicLayout
: Fixed bug that caused unnecessarily large layer distances in case that there exist empty partition grid rows with a minimum row height. -
HierarchicLayout
andSimplexNodePlacer
: Fixed rareArgumentException
that could be triggered when the input graph had a partition grid andPortCandidate
s orPortConstraint
s. -
TreeLayout
: Fixed bug in the integrated edge labeling feature that caused that multiple edge labels were not always ordered correctly along the edge with respect to their preferred placement setting (i.e., place at source, center or target preference). For example, a source label should always come before a target label in the direction of the actual edge flow. -
OrthogonalLayout
: Fixed rare bug that caused node-edge overlaps. -
SeriesParallelLayout
: Fixed bug that caused misplaced edge labels for graphs containing only a single edge. -
PortPlacementStage
: Fixed bug that causedNullReferenceException
when the ports of edges in the input graph were outside the node bounds. -
LayeredNodePlacer
: Fixed bug that caused node-edge overlaps for some configurations. -
MultiPageLayout
: Fixed bug that proxy edges were never routed as such. -
Polyline.EdgeRouter
: FixedException
that could be triggered when the graph contained fixed edges (seeEdgeRouter.SphereOfAction
) with very short segments. -
BusRouter
: Fixed rareNullReferenceException
that could be triggered if there are buses with both fixed and movable edges at the same time.
Improvements
GraphBuilder
no longer requires an edge source, allowing graphs to be built consisting only of nodes.- If the
GroupsSource
property is not set (is null),GraphBuilder
no longer removes existing groups duringBuildGraph
andUpdateGraph
. The same applies to the related classesTreeBuilder
andAdjacentNodesGraphBuilder
.
Layout
-
HierarchicLayout
: Improved adherence to the specified maximum duration by applying a suitable runtime restriction to classPortCandidateOptimizer
. Previously, this class didn't have any runtime restrictions.
yFiles.NET 5.0.0.1
Bugfixes
- Fixed several problems with relative resource URIs for
UriImageNodeStyle
andUriIconNodeStyle
when reading and writing GraphML.
yFiles.NET 5.0
Major Features Added
General
- The complete yFiles.NET API has been overhauled, simplified, and made more consistent. Many strange and dark corners of the API have been cleaned up. Types have more logical and intuitive names. The namespace structure is more logical and intuitive as well.
- The Developer's Guide has been completely revised. It now consists of two major parts: The first part covers the basics of yFiles.NET, while the second part describes in detail how the behavior of the library can be adapted to the customer's requirements.
- API documentation and Developer's Guide are now integrated into our Documentation Viewer that provides useful search and filtering facilities.
Viewer
- Support for building graphs based on user data offered by new classes
GraphBuilder
,TreeBuilder
, andAdjacentNodesGraphBuilder
. - High DPI support: A new
Scale
property allows for adapting zoom independent sizes in rendering (e.g. drawings for resize handles) as well as in user interaction (hit test radius or double click size) to higher screen resolutions and thus smaller pixels. An extension method automatically chooses an appropriate scaling in high DPI aware applications. Furthermore, the default font now is resolution independent. - Running animations and performing layouts now offers .NET's Task-based mechanism for asynchronous processes. This leads to easier composition of asynchronous processes using C#'s
await
keyword where code is written close to how synchronous code would look like instead of chaining callbacks. This also simplifies exception handling which works as usual viatry
-catch
instead of callbacks.
Layout
- Performance for many layout algorithms has been improved.
- There now is a new way to configure yFiles automatic layout algorithms. The
LayoutData
class and its sub-classes can be used to pass configuration data to a layout algorithm by setting properties instead of registeringDataProvider
s on the graph which have to be filled with this data. This reduces the code needed to configure a layout and is more flexible as well as reusable. As most subclasses ofLayoutData
are specialized for one layout algorithm, their properties provide a good overview which data can be passed to the algorithm. - Added new layout algorithm
SeriesParallelLayout
for graphs that are constructed only by series (combining two series parallel graphs by merging the source of one graph with the sink of the other) and parallel (combining two series parallel graphs by merging the sources and the sinks) operations. -
Added edge bundling feature. Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes. The following layout algorithms support edge bundling:
CircularLayout
: Edge bundling is applied to edges of the same partition.TreeReductionStage
: Edge bundling is applied to non-tree edges.RadialLayout
: Edge bundling is applied to non-tree edges.
- Added support for Sankey diagrams which visualize flow quantity between entities like e.g., cost or energy flow.
OrganicLayout
now supports the detection of regular substructures in the graph (seeOrganicLayout.ChainSubstructureStyle
,OrganicLayout.StarSubstructureStyle
,OrganicLayout.CycleSubstructureStyle
, andOrganicLayout.ParallelSubstructureStyle
) and applies a specific layout style to them such that they can be better recognized.
Deployment
-
The Software License Agreement now provides an alternative to the requirement of obfuscating the redistributable DLLs: delivering the redistributables as part of
software applications is now allowed if the redistributable DLLs are obfuscated or if the assemblies of the application which reference yFiles
are signed with a strong name whose public key token is bound to the license. See distribution.html for details.
Minor Features Added
Layout
- Added multi-parent support to
TreeLayout
. A tree node can have multiple parents that are connected to all of its siblings and share the same parents. This might come to use in organizational charts where a team answers to multiple superiors. - Added grid placement support for nodes and edges to
HierarchicLayout
. RecursiveGroupLayout
: Added theInterEdgeRouter
property to specify an edge router to layout edges that cross group node bounds. Thus, it is not necessary to subclass the layout algorithm to change inter-edge routing anymore.HierarchicLayout
supports recursively routed edges. Edges that pass the border of group nodes will always leave at the bottom side and enter at the top side of the group node. This routing style is specified usingEdgeLayoutDescriptor.RecursiveEdgeStyle
.HierarchicLayout
: Improved from-sketch behavior for groups with changed bounds (e.g. after folding or expanding a group node).HierarchicLayout
: Added support for port grouping, seePortConstraintKeys.SourcePortGroupIdDpKey
andPortConstraintKeys.TargetPortGroupIdDpKey
. Edges are bundled at their ports, but routed independently.HierarchicLayout
now allows to specify the directedness of edges, seeHierarchicLayout.EdgeDirectednessDpKey
. This new feature enables to, for example, support mixed graphs that contain both directed and undirected edges: While for directed edges the layering step tries to find a solution where the source of an edge is placed above the target (with respect to the main layout direction), for undirected edges the direction doesn't matter and the edge may also be inserted as same-layer edge. This feature also enables to force some edges to specifically point against the main layout direction.HierarchicLayout
: Added support for edges with a specific thickness. Minimum distances in the layout will consider these thicknesses, seeHierarchicLayout.EdgeThicknessDpKey
.
Incompatible Changes
General
- The rendering mechanism has been overhauled: Most rendering code that previously used the
IPaintable
interface now uses the newIVisualCreator
interface instead for improved rendering performance. Please see the migration guide for details on the resulting incompatibilities. - The minimum required framework version for the viewer part and the layout adapter is now .NET Framework 4.0. The minimum required framework version for the algorithms part still is .NET Framework 3.5
- The return type of several methods has been changed from
IEnumerator<T>
toIEnumerable<T>
. - Many usages of
ref
orout
parameters have been replaced with a suitable structure as return type. The most prominent example of this change are the variousGetTangent
methods inIPathGeometry
andGeneralPath
that now return aTangent
. - All methods that take a parameter of type
ICanvasContext
,IRenderContext
,IInputModeContext
,IParseContext
,IWriteContext
,SnapContext
,GraphSnapContext
, orLabelSnapContext
now have that parameter as their first parameter. - With the new web-based Documentation Viewer, the integrated help for the Visual Studio Help Viewer has been discontinued.
Namespace Structure
- Classes of the viewer part have been reorganized into a simpler namespace structure.
yWorks.Graph
contains types related to the graph structure, including label models and port location models.yWorks.Controls
contains types related to theGraphControl
andCanvasControl
, and to the visualization in general.yWorks.Graph.Styles
contains the style implementations.yWorks.Controls.Input
contains the types related to input modes.
- Geometry types remain in
yWorks.Geometry
. - Layout and analysis types are in
yWorks.Layout
,yWorks.Algorithms
, and the namespaces that correspond to a specific layout style.
Factory Methods Instead of Default Implementations
Contexts
: Factory methods replace the removed classesCanvasContext
andSimpleInputModeContext
.Lookups
: Factory methods replace the removed propertiesHidingLookupChainLink
,FactoryLookupChainLink
andAddingLookupChainLink
.Animations
: Factory methods replace the removed classesEasedAnimation
,ParallelAnimation
,GeneralPathAnimation
,LayoutMorpher
,LayoutMorpherWrapper
,EdgeAnimation
,LabelAnimation
,NodeAnimation
, andPortAnimation
.PortCandidateProviders
: Factory methods replace all existing non-abstract
implementations.PortCandidateProviderBase
remains for an easier start for own implementations.EdgeReconnectionPortCandidateProviders
: Factory methods replace all existing implementations.Commands
: Factory methodCreateCommand
replaces all existing implementations ofICommand
.
Model
IGraph
- Support for grouped graphs has been simplified to a large extent:
IGraph
now supports grouping by default. TheGroupingSupported
property has been removed fromDefaultGraph
. Grouping is now always enabled for graphs.- The new property
AllowGroupingOperations
onGraphEditorInputMode
allows for switching interactive grouping operations on or off. Grouping operations are disabled by default and have to be enabled explicitly if the input mode should support them. - The grouping support interfaces
IGroupedGraph
andIHierarchy<T>
have been removed and folded withIGraph
. IHierarchy<T>
'sRoot
property is no longer available. The root of a grouping hierarchy is now represented bynull
.
- Overhaul of
IGraph
'sCreateNode
,CreateEdge
,AddLabel
,AddPort
: Ambiguous overloads have been removed, missing overloads have been added and parametershave been ordered to be consistent throughout all overloads. IGraph
'sNodes
,Edges
,Labels
, andPorts
properties have been changed fromICollectionModel
toIListEnumerable
. To be notified of created or removed items, the correspondingIGraph
events should be used instead.- The properties
NodeLabels
andEdgeLabels
onIGraph
have been replaced by the extension methodsGetNodeLabels
andGetEdgeLabels
. - The properties
CollectionModel
andBends
have been removed.Bends
has been replaced by theGetBends
extension method. - The classes
BendList
andListLabelCollection
have been removed. UseListEnumerable
instead. IGraph
now provides events for property changes on model items, e.g.NodeStyleChanged
,NodeLayoutChanged
, etc. Those events replace the dedicated change reporters available previously (e.g.INodeBoundsChangeReporter
,ILabelTextChangeReporter
, etc.), which have been removed.- The signatures of event handlers throughout the
IGraph
API have been made consistent using properly typedEventArgs
subtypes. Exceptions are a few events that are raised very often which retain an argument list to improve performance. - The methods
IsLeaf
/SetLeaf
and related properties and events have been replaced byIsGroupNode
/SetIsGroupNode
which have the exact opposite meaning from the old ones. - The signature of
IGraph.AddBend
has changed. The index parameter has been moved to the end and made optional. - The
IGraphStructure
interface and itsSimpleGraphStructure
implementation have been removed, as well asDefaultGraph
's constructor that accepted anIGraphStructure
. IGraph
now extends theITagOwner
interface. Thus graphs now have aTag
property.
DefaultGraph
DefaultGraph
now raises removal events for labels, ports, and bends which are implicitly removed when their owner is removed.- Various protected factory methods on
DefaultGraph
have been removed:CreateNodeDefaults
,CreateEdgeDefaults
andCreateMapperRegistry
, amongst others. - The method
GetBounds
has been removed fromDefaultGraph
. - The property
UsePortCandidateProviders
has been removed from bothDefaultGraph
andGraphSettings
. Creating an edge using port candidate providers has to be done by manually querying the provider and callingCreateEdge(IPort, IPort)
.
Folding
- The method
IsInitiallyExpanded
has been removed fromIFoldedGraph
. The methodsIsInitiallyExpanded
,SetInitiallyExpanded
, and the propertyDefaultExpandedPredicate
have been removed fromFoldingManager
. - The
Expand
,Collapse
, andIsExpanded
methods onIFoldingView
(previouslyIFoldedGraph
) now also work with nodes that belong to the master graph instead of the view graph. Thus the collapsed/expanded state can be set or queried for items that are currently not in the view graph. This replaces part of the removed functionality mentioned above. - The interfaces
IChangeDummyNodeAppearanceCallback
,IChangeDummyEdgeAppearanceCallback
, andIChangeLabeledItemAppearanceCallback
as well as theFoldingManager.GetChangeDummyAppearanceCallback
methods have been removed. The view state properties can now directly be changed on the view state implementations returned byFoldingManager.GetFolderNodeState
andFoldingManager.GetFoldingEdgeState
, respectively. -
IFoldingView.IsInFoldingState
(previouslyIFoldedGraph.IsDummy
) now throws anArgumentException
for labels and ports that are not part of this view. Previously, this method returnedtrue
for such items. Since this exception is already thrown for nodes, edges, and bends that are not part of this view, the behavior is now the same for all types of graph items.
Labels
- The order of the parameters of
ILabelModel.GetGeometry
has been changed toILabelModel.GetGeometry(ILabel, ILabelModelParameter)
. FreeNodeLabelModel.CreateNodeCenterAnchored
andFreeNodeLabelModel.CreateNodeLayoutAnchored
have been removed.FreeNodeLabelModel.CreateDefaultParameter
now uses the label's center as its anchor point.- The new edge label models
EdgeSegmentLabelModel
andEdgePathLabelModel
have been added.EdgeSegmentLabelModel
allows to create parameters for a segment index and segment ratio whileEdgePathLabelModel
creates parameters using a ratio of the edge path.- The new label models replace the following removed label models:
RotatingEdgeLabelModel
,SliderEdgeLabelModel
,SideSliderEdgeLabelModel
,RotatedSliderEdgeLabelModel
, andRotatedSideSliderEdgeLabelModel
. - The label layout parameter of the edge label defaults now uses the
EdgeSegmentLabelModel
.
- The new label models replace the following removed label models:
Ports
- The property
IPort.Location
(to obtain a snapshot of the port's location) has been replaced by the extension methodGetLocation
. To retrieve a live view of the location of a port, use the new extension methodIPort.DynamicLocation
. NodeScaledPortLocationModel
has been replaced byFreeNodePortLocationModel
that allows to specify the port location by a ratio of the node layout's size and an additional offset. The placement options and API are very similar toFreeNodeLabelModel
.AnchoredPortLocationModel
has been removed.
Table
ITable
interface:- The signature of
CreateRow
andCreateColumn
has changed. The index parameter has been moved to the end and made optional. - The events
StripeChanged
andStripeRemoved
useStripeEventArgs
now. The corresponding event raiser methods have been changed accordingly. - The event
LabelRemoved
usesLabelEventArgs
now. - New extension methods have been added:
FindColumn
,FindRow
,GetCellBounds
.
- The signature of
Table
class:- The table's lookup decorator can now decorate stripe labels, too.
- The following methods have been removed:
CreateDefaultColumnStyle
,CreateDefaultColumnInsets
,CreateDefaultColumnLabelStyle
,CreatedDefaultColumnLabelModelParameter
,CreateColumnLabelDefaults
,CreateDefaultRowStyle
,CreateDefaultRowInsets
,CreateDefaultRowLabelStyle
,CreatedDefaultRowLabelModelParameter
,CreateRowLabelDefaults
,RemoveUndoSupport
, some overloads ofCreateRow
/CreateColumn
, some overloads ofAddLabel
- The properties
DefaultStripeLookup
,DefaultColumnLookup
andDefaultRowLookup
have been added, which replace the removed classes with the same same.
TableExtensions
: TheGetElementsToMove
method has been removed- The
IStripeSelection.SelectedStripes
property has been removed. Use the individual properties forSelectedRows
andSelectedColumns
instead StripeSelection
: The superfluous overloads ofIsSelected
andSetSelected
taking anIRow
orIColumn
have been removed.- The static helper method
PlaceNodeInCell
has been added toITable
to easily move a node into a specific table cell.
Undo Support
- Extension methods to enable/disable Undo have been added to
IGraph
. - Setting the
Tag
property on model items and the graph now works with Undo. - Undo operations for the removal of graph elements now keep the proper item order. This improves the consistency especially for layouts between undo operations.
- Overloads of the
IGraph.BeginEdit
extension method that work withIMementoSupport
(either viaILookup
or anIMementoSupportProvider
) have been added. - The overload of the
IGraph.BeginEdit
extension method that accepted anIEnumerable
ofIModelItems
has been removed. IUndoSupport
,MementoUndoUnit
,MementoUndoableEdit
, andMementoStateStruct
have been removed.IUndoUnit
: The methodsCanUndo
andCanRedo
have been removed.- The methods
UndoImpl
andRedoImpl
onUndoUnitBase
have been removed. Implementations should useUndo
andRedo
from theIUndoUnit
interface instead. - The properties
UndoText
andRedoText
onUndoEngine
have been removed. - The interface
IGraphUndoUnitSupport
has been removed. Its methodsCreate...UndoUnit
have been moved toDefaultGraph
. Developers who have created a custom implementation have to derive fromDefaultGraph
and override the corresponding method(s).
Geometry
TheyWorks.Geometry
namespace has been simplified and cleaned up.
- The basic geometry types
PointD
,SizeD
,RectD
andInsetsD
have been made immutable. - The classes
ImmutablePoint
,ImmutableSize
,ImmutableRectangle
andImmutableOrientedRectangle
have been removed. The immutable typesPointD
,SizeD
andRectD
as well as the immutable instance provided by the new static methodOrientedRectangle.CreateImmutable
can be used instead. - The interfaces
IPointSetter
andISizeSetter
have been removed. Instead the interfacesIMutablePoint
andIMutableSize
are used. - The
IReshapeable
interface has been removed. The various overloads of theReshape
method have been implemented as extension methods onIMutableRectangle
instead. IMovable
has been removed as well. Instead anIPositionHandler
can be used.PointD.FromPoint
,SizeD.FromSize
andRectD.FromRectangle
have been removed and replaced by the extension methodsIPoint.ToPoint
,ISize.ToSize
, andIRectangle.ToRect
.- Various other geometry-related infrequently-used or duplicate classes and interfaces have been removed.
- The static fields
SizeD.Unbound
,SizeD.Empty
andSizeD.Zero
have been added.
Controls
- The
ContentRect
will now also be updated when creating edges, adding, editing or moving labels or deleting graph items. - The
Cut
,Copy
andPaste
commands are no longer handled byGraphControl
and the respective methods have been removed as well. Command bindings forCopy
are still supplied byGraphViewerInputMode
andGraphEditorInputMode
. Command bindings forCut
andPaste
are still supplied byGraphEditorInputMode
. - The
Undo
andRedo
commands are no longer handled byGraphControl
and the respective methods have been removed as well. Command bindings forUndo
andRedo
are still supplied byGraphEditorInputMode
. Furthermore, the respective methods can still be called on the UndoEngine directly. - The
UndoabilityEnabled
property has been removed.Undo
andRedo
command bindings can be enabled onGraphEditorInputMode
. - The
ClipboardEnabled
property has been removed. Clipboard command bindings can be enabled onGraphViewerInputMode
andGraphEditorInputMode
. - The
GetUndoEngine
method has been removed. The currentUndoEngine
can be retrieved from the graph instead. - The
SelectionChanged
event has been removed. - The new property
LastEventLocation
always contains the location of the last mouse or touch event. - The
MouseWheelBehavior
property replaces the previous propertyAutoMouseWheelZoomEnabled
and not only allows disabling mouse wheel zoom, but also enabling scrolling with the mouse wheel. - The methods
Add
,AddCreator
,AddGroup
andAddGroupToGroup
have been removed as the new methodsAddChild
andAddGroup
ofICanvasObjectGroup
provide a more intuitive way to add child elements to e.g. theGraphControl.GetBackgroundGroup
. - The
InputModes
property has been removed. Developers who want to install multiple input modes on aCanvasControl
have to set aMultiplexingInputMode
asCanvasControl.InputMode
and add their input modes to that mode. - The
CollectCanvasObjects
method has been removed.
Visualization
Styles
- Renamed
SimpleAbstractNode
/Edge
/Port
/LabelStyle
toNode
/Edge
/Port
/LabelStyleBase
. - Removed
SimplePortStyle
. Instead, useNodeStylePortStyleAdapter
withShapeNodeStyle
. - Renamed
SimpleLabelStyle
toDefaultLabelStyle
. - Added the interface
IStripeStyle
for styles ofIColumns
andIRows
. WithNodeStyleStripeStyleAdapter
, you can still use node styles as styles for columns and rows. - The style and style renderer hierarchies have been flattened:
- Removed all sub-interfaces of
INodeStyle
,IEdgeStyle
,ILabelStyle
, andIPortStyle
. - Removed classes
AbstractEdgeStyle
,AbstractStyleRenderer
,AbstractNodeStyleRenderer
,AbstractEdgeStyleRenderer
,AbstractLabelStyleRenderer
,AbstractShapedNodeStyleRenderer
,AbstractShapedLabelStyleRenderer
,VoidVisualStyle
, andVoidStyleRenderer
. - Merged types
AbstractTableNodeStyle
andDynamicTableNodeStyle
intoTableNodeStyle
.
- Removed all sub-interfaces of
- Removed superfluous interfaces
IUserTagProvider
andITableProvider
, and all implementations. - Removed superfluous constructors from all style implementations.
- All
IStyleRenderer
implementations: The accessibility of theStyle
,Layout
, andItem
properties has been reduced to protected. In addition, the latter has been renamed toNode
,Label
,Edge
, orPort
respectively. - Various changes to
IModelItemInstaller
and related interfaces and classes. Styles no longer implementIModelItemInstaller
, simplifying certain custom style implementations.
Animations
Animator.AnimateAndWait
has been removed.- The original overloads of
Animator.Animate
that accept a callback for finishing the animation have been removed. Instead the new Task-based overloads can be used.
Various Visualization Changes
- Replaced
IPaintable
withIVisualCreator
for improved rendering performance.IPaintable
'sPaint
method now has to be implemented on theIVisual
returned byIVisualCreator
'sCreateVisual
andUpdateVisual
methods. - The protected factory methods that supplied the initial value for
GraphModelManager
's Installer properties (EdgeStyleInstaller
,NodeStyleInstaller
, etc.) have been removed. GraphModelManager.Invalidate
has been removed.- The
IRenderContext.Canvas
method has been pulled up toICanvasContext
and renamed toCanvasControl
. IRenderContext
: TheTransform
property has been removed.- The
RenderContext
class has been removed. UseCanvasControl.CreateRenderContext
instead to retrieve an instance ofIRenderContext
. DefaultEdgePathCropper
now uses the new methodHandleEmptyPath
if cropping the edge would result in an empty path. By default this method crops at the ports instead which results in edges between a group node and one of its children being no longer hidden.DefaultEdgeIntersectionCalculator
: A callback methodGetNodeGeometry
has been added.- The
CanvasObjectGroupProviderCallback
property onModelManager
has been replaced with theGetCanvasObjectGroup
method. TheCanvasObjectGroupProviderCallback
property onItemModelManager
has been replaced with theCanvasObjectGroup
property and theGetCanvasObjectGroup
method; the default implementation just defers to the property, just likeGetDescriptor
. IGroupAction
as well asICanvasObjectGroup.GetGroupAction
have been removed as they had hardly any use.- The interface
ICanvasGroupProvider
and the delegateCanvasObjectGroupProviderCallback
have been removed. Accessing the individual CanvasObjectGroups can be done via the properties ofCanvasControl
instead. ICanvasObjectTreeEventSource
and the corresponding classesCanvasObjectAddEventArgs
,CanvasObjectRemoveEventArgs
,CanvasObjectMoveEventArgs
, andCanvasObjectInvalidateEventArgs
have been removed.
Input
General Input Mode Refactorings
- The type hierarchy for input modes has been simplified considerably:
- All input modes except
OverviewInputMode
,GraphViewerInputMode
, andGraphEditorInputMode
now directly implementIInputMode
without any abstract base classes in between. IConcurrentInputMode
has been removed and merged withIInputMode
.- The
Enabled
property on theIInputMode
interface has been removed. It is still present on all concrete implementations. - The
ConcurrencyController
property has been removed. Instead, a parameter of typeConcurrencyController
has been added to theIInputMode.Install
method.
- The
- All abstract input mode base classes except
AbstractInputMode
(which has been renamed toInputModeBase
) have been removed.AbstractConcurrentInputMode
has been merged intoInputModeBase
.
- All input modes except
- Input mutex handling has been refactored considerably:
IInputMode
'sConcurrencyController
property has been removed. Input modes now get aConcurrencyController
as parameter of theirInstall
method.- The
ConcurrencyController
has been refactored and is now only responsible for a single input mode. ItsActive
property indicates if the input mode currently has or may request the mutex. - The
InputMutex
class has been removed. - The
PreferredCursor
property has been moved fromIInputMode
toConcurrencyController
. - The input mutex should be requested and released using the according methods on
ConcurrencyController
. Most input modes don't provide the methodsHasMutex
,CanRequestMutex
,RequestMutex
andReleaseMutex
anymore. - The
Enabled
property ofIInputModes
is not set tofalse
anymore if another input mode acquires the mutex. Instead theirConcurrencyController
is deactivated. This provides a clear separation between suppressing input modes (while another mode holds the mutex) and explicitly disabling a mode from user code (via theEnabled
property). - As a consequence most input modes don't provide the
EnabledChanged
event and theOnEnabled
andOnDisabled
methods anymore, butOnConcurrencyControllerActivated
andOnConcurrencyControllerDeactivated
instead.
IInputMode
has a new propertyPriority
which defines the installation priority of the input mode. Previously those have been available as properties onGraphViewerInputMode
,GraphEditorInputMode
, andTableEditorInputMode
. Those have been removed.IInputMode
'sStop
method has been renamed toTryStop
to make it more obvious that an implementation might returnfalse
to indicate that it did not actually stop.- All input modes no longer raise
Stopped
andCanceled
events. Developers who want to get notified when an input mode gets stopped or canceled have to override theOnStopped
orOnCanceled
methods. Also, the eventsInitializing
andInitialized
no longer exist. Input modes that need to perform one-time initialization on firstInstall
can keep track of that themselves. MultiplexingInputMode
: TheAddConcurrent
methods as well as theAdd
method which takes an additional priority parameter have been removed. There is only oneAdd
method left, which takes an input mode as its only parameter. Priority is determined by the input mode'sPriority
property. Whether an input mode runs exclusive or always active alongside other input modes is determined by the input mode'sConcurrencyController
which has anExclusive
property controlling that. This property is also available for all defaultIInputMode
implementations.MultiplexingInputMode
is now aware of changes to the priority of already installed input modes and will update the installation order accordingly when an input mode's priority is changed.IInputMode
s in general:- The setter for
Graph
andGraphSelection
properties, if present, and its associatedSet*
methods have been removed. Both are now always retrieved from the input mode context dynamically. - The read-only property
InputModeContext
has been introduced to expose theIInputModeContext
the mode is installed in. - Many input modes now no longer have protected methods for state machine transitions. Instead those methods are mostly parameterless now.
- The setter for
GraphEditorInputMode and GraphViewerInputMode
GraphViewerInputMode
andGraphEditorInputMode
have been made more similar regarding customization in the capabilities they both provide:GraphViewerInputMode
now supports the same click and selection behavior asGraphEditorInputMode
. This includes detail selection (Shift+Click) and cyclic selection (Alt+Click) as well as finer control over behavior like theClickSelectableItems
property and theShouldClickSelect
method.- The methods
Click
andDoubleClick
now take anIModelItem
andClickEventArgs
as arguments and have no return value. Instead of returning a boolean, theHandled
property on theClickEventArgs
should be set. - Their
ClickInputMode
instances is now configured to raise events for both left and right clicks. - The default click actions that change the selection and create new nodes are only triggered on left mouse clicks now.
- An explicit hit-test order for double clicks is provided that can be changed through the
DoubleClickHitTestOrder
property. By default, this hit-test order prefers labels over other graph elements. GraphViewerInputMode
now also has theAvailableCommands
property, already known fromGraphEditorInputMode
orNavigationInputMode
.- Several child input mode priorities in
GraphViewerInputMode
have been changed and most of them now have the same priorities as inGraphEditorInputMode
. - The new
CanvasClicked
event reports clicks on an empty canvas location. - The new
SelectablePredicate
property allows finer control over what particular items should be selectable without the need to create a custom subclass. - The new
CreateSelectionEventArgs
method createsSelectionEventArgs
using theGraphSelection
. - The events
MultiSelectionStarted
andMultiSelectionFinished
now useSelectionEventArgs<IModelItem>
. GraphViewerInputMode
now has improved support for marquee selection. Marquee selection is no longer turned on or off viaMarqueeSelectableItems
but instead directly on theMarqueeSelectionInputMode
. The recognizer for marquee selection is Shift+Drag and the child input mode priorities have been adjusted accordingly so that marquee selection and viewport movement can co-exist. The child input mode still defaults to being disabled, though.GraphViewerInputMode
now also has aKeyboardInputMode
.GraphViewerInputMode
now allows copying items (including the convenience method) and handles the command appropriately.
- Improved functionality of
GraphEditorInputMode
- Changing the
ShowHandleItems
property will now immediately update the currently visible handles. - The new
DeletablePredicate
property allows finer control over what particular items should be deletable without the need to create a custom subclass. - The new
LabelAdding
andLabelEditing
events have been added. Those allow fine-grained control over adding or editing labels and tie into the existing functionality provided byIEditLabelHelper
. -
TextEditorInputMode
now ensures that the TextBox is visible in the viewport when starting editing. This behavior can be adjusted by creating a custom subclass and overriding theEnsureVisible
method.
- Changing the
- Cleanup of the old
GraphEditorInputMode
API- The type of the
OrthogonalBendRemoval
property has been changed frombool
toOrthogonalEdgeEditingPolicy
. - The
DeletingSelection
andDeletedSelection
events now useSelectionEventArgs<IModelItem>
. - The constructor that take additional
IGraph
andIGraphSelection
arguments have been removed, as well as the protected methodsSetGraph
,SetGraphControl
,OnGraphChanged
and the protected setter for theGraphSelection
property. Instead, theIGraph
instance is now always taken from theInputModeContext
and cannot be changed after the mode is installed. - The
CreateDefaultLabelConfiguration
method has been removed. - The
MarqueeSelect<T>(RectD,IEnumerable<T>)
method has been removed. - The
SelectionModel
property has been removed. Instead theGraphSelection
property is used. - The
CollectionModel
property has been removed. Instead the model items of theGraph
property are used. - The
GraphInputModeController
property has been removed. - The protected event handlers for
ClickInputMode
'sClicked
andDoubleClicked
events have been removed. FindItem
has been removed. An additional overload ofFindItems
without the context parameter has been added. To replicate the previous behavior ofFindItem
,FindItems
can be called and the first element taken from the resulting enumeration.ShouldBeMovableForMoveInputMode
has been removed.
- The type of the
- Improved
GraphViewerInputMode
API:- Added support for the
Copy
command. - Added support for multi-selection via Ctrl+Click and marquee selection. The latter is disabled by default.
- The click hit-test order can now be configured by property
ClickHitTestOrder
. - By default, clipboard commands are now disabled. This can be controlled with the new property
AllowClipboardOperations
. - The
ItemSelected
event has been removed. ClipboardCommandsEnabled
has been removed.
- Added support for the
CreateEdgeInputMode
CreateEdgeInputMode
has been refactored and streamlined:
- Orthogonal edge creation is automatically enabled if orthogonal edge editing is enabled on the containing
GraphEditorInputMode
. - The
ConnectToCandidatesOnly
property has been removed. Edge creation now always uses port candidates. - The creation callbacks
NodeBasedEdgeCreationCallback
andPortBasedEdgeCreationCallback
have been replaced by the newEdgeCreator
which is always port-based. - The methods
GetSourcePortOwner
,GetTargetPortOwner
,GetSourceNode
andGetTargetNode
have been replaced byGetSource
andGetTarget
. - The properties
SourcePortCandidate
andTargetPortCandidate
are no longer read-only. - The methods
DetermineEdgeStyle
,AssignSourcePortPosition
,AssignEdgeStyle
as well as theEdgeStyle
property have been removed. Instead the newEdgeDefaults
property can be used to customize the new edge. - The
UseHitNodeTargetCandidatesOnly
property has been replaced by the newUseHitItemsCandidatesOnly
property. - The type of the
OrthogonalEdgeCreation
property has been changed frombool
toOrthogonalEdgeEditingPolicy
. - The new
DummyEdgeGraph
property is used to create the dummy edge that visualizes the edge during creation. - The preview edge which is displayed during edge creation now shows the edge as it will be created, i.e. the preview edge has the same style, port visualization, and labels as the created edge will have.
- The
SnapToTargetCandidateOwner
property has been removed. The preview edge now is always being cropped at the candidate owner's borders. - A new
CancelGestureOnInvalidTarget
property has been added that makes it possible to cancel the gesture immediately if ended on an invalid target. - The
EdgeCreator
callback now has atemplateEdge
parameter where all data for edge creation can be retrieved from. The source and targetIPort
parameters have been changed toIPortCandidates
. - The
AssignBends
method has been removed and its functionality folded into the defaultEdgeCreator
implementation. This also means that customizedEdgeCreator
s now have to add bends to the created edge as well. - The following methods have been removed:
IsPortCandidateResolutionEnabled
,IsValidEnd
,IsValidBegin
,IsCancelGesture
,IsBendCreationEnforced
,IsValidBend
,IsSourceNodeDraggingFinished
,IsRemoveBendEvent
. Instead, use the corresponding...EventRecognizer
properties to customize the behavior. - The following methods and properties have been removed:
CreateBend(PointD)
,StartCreateEdge
,OnTargetLocationChanged
,GetNodes
,NodeComparer
andPortOwnerComparer
.
Other Input Modes
ContextMenuInputMode
: Support for different context menu trigger events has been added. Currently only mouse (right-click) and keyboard (application / context menu key) are distinguished, more may be added in the future.ClickInputMode
: TheValidClickHitCursor
property has been added. This cursor is used when hovering over a valid hit region.ClickInputMode
: ThePreventNextDoubleClick
method has been added that can be used in event handlers for single clicks to prevent that this click can become part of a double click event.CreateBendInputMode
: TheCancelEventRecognizer
property has been removed.HandleInputMode
: TheActive
property has been removed. The mode can be manually deactivated using theEnabled
property instead.HandleInputMode
: TheArm
method now has a handle parameter for the handle that is under the mouse cursor.NodeDropInputMode
: TheNodeCreator
callback,NodeCreated
event, andGetDraggedNode
method have been removed. TheItemCreator
callback,ItemCreated
event andDraggedItem
property from its base classItemDropInputMode
is used instead.OverviewInputMode
now extendsMultiplexingInputMode
and can be customized more easily. Minor modes can be replaced and adjusted, as well as the list of available default command bindings can be modified.OverviewInputMode
: The newMargins
property specifies margins for the visible area of the boundGraphOverviewControl
. The new protected methodUpdateVisibleArea
provides further means for customizing the visible area.MarqueeSelectionInputMode
: The eventsDragStarting
,DragStarted
,Dragging
,Dragged
,DragFinishing
,DragFinished
,DragCanceling
andDragCanceled
now useMarqueeSelectionEventArgs
that provide the current selection rectangle.MarqueeSelectionInputMode
: TheMarqueeSelected
event has been removed. TheDragFinished
event can be used instead.MarqueeSelectionInputMode
: TheLastModifierState
property has been removed.MoveInputMode
now provides aQueryPositionHandler
event that queries anIPositionHandler
each time a drag is started.MoveViewportInputMode
: Mouse cursor handling is now also done by protected methodsArm
andDisarm
, similar to other input modes.MultiplexingInputMode
: TheChildController
property andCreateChildConcurrencyController
method have been removed.TableEditorInputMode
: The new eventsLabelAdding
andLabelEditing
allow fine-grained control over adding or editing labels and tie into the existing functionality provided byIEditLabelHelper
.TableEditorInputMode
: The eventsDeletingSelection
andDeletedSelection
now useSelectionEventArgs<IStripe>
.TableEditorInputMode
: Now contains theAllowMixedSelection
property which has been moved from the removed classCompositeStripeSelection
.WaitInputMode.GetMultiplexingInputMode
has been removed.TextEditorInputMode
: The eventsEditingStarted
,EditingCanceled
andTextEdited
now useTextEventArgs
.TextEditorInputMode
: The propertiesStopRecognizer
,CancelRecognizer
andLineBreakRecognizer
have been added which allow for easy customization of the key gestures used to add new line breaks and to cancel or stop the text editing.
Label Editing
IEditLabelHelper
has been refactored:AddLabel
andEditLabel
have been replaced by the methodsOnLabelAdding
andOnLabelEditing
which take the newLabelEditingEventArgs
as their only argument.- The
IEditLabelHelper.ConfigureTextEditorInputMode
method has been removed. It has been replaced by theLabelEditingEventArgs.TextEditorInputModeConfigurator
property. - The customizations possible from
IEditLabelHelper
are the same as those from theLabelAdding
andLabelEditing
events onGraphEditorInputMode
andTableEditorInputMode
.IEditLabelHelper
is conceptually used as another event handler for those events. - The
Owner
property ofEditLabelHelper
has been removed, along with the respective constructor. The label owner can usually be queried from theLabelEditingEventArgs
. Custom subclasses can of course still opt to store the item they were created for and use that field.
- If an
IEditLabelHelper
implementation is present in anILabeledItem
's lookup, itsAddLabel
method is called to determine whether a label may be added and provide a suitable label instance. Additionally, the predicate methodGraphEditorInputMode.ShouldLabelBeAdded
always has to returntrue
, whether edit helpers are present or not. If the new label should be edited interactively after it's creation (the default behavior), it also must be editable, following the rules above. Therefore anIEditLabelHelper
implementation usually should allow editing of label instances that it has created itself inOnLabelAdding
. - The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is enabled by default and can be controlled through the
GraphEditorInputMode.HideLabelDuringEditing
property.
Snapping
SnapContext
:- A boolean parameter
snappingDisabled
has been added to the methodsHandleMove
andDragFinished
. This parameter has to be set totrue
to handle moves or finish a drag when snapping is temporarily disabled. This replaces the call toSnapContext.DisableSnapping
. - The events
Initializing
,Initialized
andCleanedUp
as well as their associated methods now useInputModeEventArgs
. - The
VoidInstance
field has been removed.
- A boolean parameter
GraphSnapContext
:- The return type of
GetMovementInfos
has been changed toIListEnumerable<MovementInfo>
and the classesNodeMovementInfo
,PortMovementInfo
,BendMovementInfo
andEdgeEndMovementInfo
have been removed. - The info parameter's type of
AddEdgeEndToBeMoved
has been changed to the more generalMovementInfo
. A boolean parameterAtSource
has been added. - The methods
AddSameWidthEntries
andAddSameHeightEntries
now return anIListEnumerable<RectD>
containing the rectangles whose widths respectively heights are closest to the given size. The parametersresultingSize
andrects
have been removed.
- The return type of
IEdgeSnapResultProvider
:- The methods
InitializeSnapping
andCleanupSnapping
have been removed. - The info parameter's type of
CollectSnapResults
has been changed toIListEnumerable<MovementInfo>
.
- The methods
SnapResult
now has more factory methods. The classSnapLineSnapResult
has been replaced with a factory method as well.- The classes
SnapLineContainer
,SingleLineSnapLineContainer
,EdgeSegmentSnapLineContainer
,FixedDistanceSnapLineContainer
,InBetweenSnapLineContainer
have been removed.
Clipboard
- The
GraphClipboard.ClipboardContext
property has been removed. - The
Copy
methods inGraphCopier
now have a newPointD
offset
parameter that shifts nodes and bends by a given amount upon copying them. - The signature of
IClipboardIdProvider.GetId
has changed. The context parameter has been moved to the front.
KeyboardInputMode
KeyboardInputMode
has been simplified along with all helper types and infrastructure around commands:
KeyboardInputMode
now allows creating a mapping between a key gesture and a command as well as providing custom execution logic for a given command.- There is also a single new method
RemoveCommand
onKeyboardInputMode
which removes all currently existing bindings for a given command.
Various Input-related Changes
- Events
- The properties
LastMouse2DEventArgs
andLastEventLocation
have been removed from all input modes. Instead, the propertiesLastMouseEvent
andLastEventLocation
onCanvasControl
can be used. EdgeEventArgs
now also contains the owner of the source and target port.ItemClickedEventArgs
now also contains the location of the click.StripeEventArgs
now also contains theTable
for this event.OrthogonalEdgeEditingContext
: The eventsInitializing
,Initialized
andCleanedUp
as well as associated methods now useInputModeEventArgs
.GraphCommands.AdjustGroupNodeSize
now always processes the nodes in bottom to top order instead of using the order in which the nodes were selected.
- The properties
- The command framework has been simplified.
Classes
ApplicationCommands
,NavigationCommands
, andGraphCommands
have been removed. All commands are now available on new classCommands
. The ending "Command" has been removed from the command's names. There is no public implementation for a command, now. Instead, the factory methodCreateCommand
on classCommands
has to be used. - All hit-testing methods as well as the methods in
IPortSelectionTester
andIBendSelectionTester
now take anIInputModeContext
instead ofICanvasContext
as their context parameter. IPositionHandler
andIHandle
implementations no longer implementIPoint
.IPositionHandler.SetPosition
has been removed. The interface is now used as a flagging interface only.- The classes
DefaultPositionHandler
andPointHandle
have been removed. GraphEditorInputMode.NodeCreator
now has an additional parent parameter which can be used as the parent node for creating a new node.GraphEditorInputMode
tries to find a group node at the click location to pass as parent to theNodeCreator
.- Opening a context menu from the keyboard no longer uses the last known mouse pointer location for opening the context menu. Instead, the location of the current selection or the current item are used.
IPortCandidateProvider
: The two method overloadsGetSourcePortCandidatesForEdge
andGetTargetPortCandidatesForEdge
that had anIEdge
parameter have been removed - the two remaining pairs have been merged into a single method with an optional argument for the opposite candidate.- The property
AbstractPortCandidateProvider.PortOwner
has been removed, along with the methods that made use of it. AbstractPortCandidateProvider
: Overloads ofCreateCandidate
taking anIPort
an optionally anIPortLocationModel
have been removed.DefaultPortCandidate
: A constructor overload taking the optionalPortCandidateValidity
additionally has been added.OrthogonalEdgeEditingContext.AddMovedEdgeEnd
: ThemovementInfo
parameter's type has been changed to the more generalMovementInfo
. A boolean parameteratSource
has been added.PortRelocationHandle
: The methodConfigureDummyEdge
has been folded intoCreateDummyEdge
.- The methods
IDragHandler.HandleMove
andIReshapeHandler.HandleReshape
no longer has a return value. - The classes
InputModeController
andGraphInputModeController
have been removed. - The abstract class
EdgeEndMoveHandle
has been removed. - The
StateMachine
class as well as the associated types and infrastructure have been removed from the API.
GraphML
The XML namespaces have been updated and the mapping from yFiles.NET types to their corresponding XML namespace has been changed.
- All platform-independent graph model types are now mapped to
http://www.yworks.com/xml/yfiles-common/3.0
. This includes the following types:- all graph item types
- all default label models
- all port location models
- all "void" styles
- serialization for geometric primitives
- All platform-independent GraphML support types are now mapped to
http://www.yworks.com/xml/yfiles-common/markup/3.0
. - All platform-independent framework classes are now mapped to
http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0
. This includes the following types:- Built-in value types (
int
,double
,bool
, etc., and enumeration types) string
- Built-in value types (
- All library types specific to yFiles.NET are now mapped to
http://www.yworks.com/xml/yfiles.net/5.0/forms
. These are mainly the types in the following namespaces:yWorks.Graph.Styles
yWorks.Markup.Platform
- The following events have been added to signal the end of the write or parse process, respectively:
GraphMLIOHandler.Parsed
,GraphMLParser.Parsed
,GraphMLIOHandler.Written
,GraphMLWriter.Written
, together with the corresponding event raiser methods. SerializationProperties
:- The new serialization property
ParseLabelSize
optionally disables parsing of the preferred size of a label. This can be used to prevent unexpected clipping when parsing GraphML written on different machines, or with fonts that are not available. WriteGraphSettings
andDisableGraphSettings
have been merged to a singleDisableGraphSettings
property which is interpreted according to the context where it is set.IndentOutput
has been added that allows to define whether the XML output should be properly indented.
- The new serialization property
- A few abstract base classes have been merged:
AbstractXmlWriter
andDirectXmlWriter
have been merged intoXmlWriter
AbstractMapperInputHandler
andComplexMapperInputHandler
have been merged intoMapperInputHandler
AbstractMapperOutputHandler
andComplexMapperOutputHandler
have been merged intoMapperOutputHandler
- The legacy interface
IDeserializer
has been removed. For custom deserialization an event handler forGraphMLIOHandler.HandleDeserialization
can be used. - The classes
ArrayValueSerializer
andNullXmlWriter
have been removed. IXamlNameMapper
has been refactored to andAddXamlNamespaceMapping
has been added toGraphMLIOHandler
.QueryOutputHandlersEventArgs
: The overload ofAddOutputHandler
taking an object id has been removed.XmlWriter
: A propertyindent
has been added that allow to define whether the XML output should be properly indented.XmlWriter
: The constructor overload taking anInternalXmlWriter
as well as the corresponding propertyDelegateWriter
have been removed.
Utility Types
A lot of the utility types have been either replaced or removed.
- The
yWorks.Model
namespace has been removed and its types have been moved to more intuitive namespaces. - The
yWorks.Support
namespace has been removed along with most of the types contained within, since they were not really needed. The remaining types have been moved to more meaningful namespaces, mainlyyWorks.Controls
. - The classes
EmptyCollection<T>
,EmptyList<T>
,CompositeEnumerable
,CompositeEnumerator
,CompositeListEnumerable
,CompositeCollectionModel
,SingleListEnumerable
,SingletonCollection
,SingletonList
,DoubleCollection
, andCollectionChangedEventArgs
have been removed. - The classes
CompositeHandle<T>
andCompositePositionHandler
have been removed. - The
IMapper.RemoveValue
method has been removed. It depends on the specific implementation of the mapper whether a mapping can be removed. If an implementation provides a way to remove a mapping, that should be preferred over setting anull
value. - The classes
GenericYList
,GenericListCell
, andHashSet
have been removed. - The classes
DefaultNodeLookup
,DefaultEdgeLookup
,DefaultPortLookup
,DefaultLabelLookup
,DefaultBendLookup
andDefaultItemLookup
have been removed. Properties with the same names have been added toDefaultGraph
instead. - The
ItemDecorator<TModelItem>
class has been removed. Its members have been pushed down to its former sub-classesNodeDecorator
,EdgeDecorator
,LabelDecorator
,PortDecorator
, andBendDecorator
. - The events
ItemSelected
andItemDeselected
onISelectionModel
have been merged into theItemSelectionChanged
event. - The
GeomSupport.CreateSmoothedPath
method has been moved toGeneralPath
.
Layout
Layout Execution
LayoutExecutor
:- The method
Stop
now stops a running layout calculation as soon as possible and then immediately shows the result so far, skipping any animation. In addition, the new methodCancel
immediately cancels a running calculation and doesn't change theGraphControl
'sGraph
unless the animation was already running. - The property
AbortHandler
has been made read-only. There is a protected factory methodCreateAbortHandler
which can be overridden to create a customAbortHandler
implementation. - Labels are now taken into account for the final content rectangle and viewport animation.
- The new property
ConsiderViewportLimiter
can be enabled to let the target viewport after a layout respect theViewportLimiter
of theGraphControl
. TheViewportAnimation
has a new propertyConsiderViewportLimiter
for the same purpose. - The classes
LayoutExecutor
andLayoutGraphAdapter
now have a propertyAutomaticEdgeGrouping
that automatically configures edge groups for ports with multiple incoming or outgoing edges. This feature is enabled by default. - The classes
LayoutExecutor
andLayoutGraphAdapter
now have a propertyFixPorts
that automatically configures strong source and target port constraints for all edges in the graph. This feature is disabled by default. LayoutExecutor
no longer throws an exception wrapping a layout exception if no event handler ofLayoutFinished
handled the event arguments. This means that exceptions in a layout algorithm can go by unnoticed if the layout runs asynchronously, and the task returned fromLayoutExecutor.Start
is not awaited.
- The method
LayoutGraphAdapter
now adds data providers that map each node, edge, and label of aLayoutGraph
to their correspondingIModelItem
in the originalIGraph
. Especially, these data providers are available if a layout is run with aLayoutExecutor
or the convenience methodsMorphLayout
orApplyLayout
.
Layout API
- The legacy hierarchic layout algorithms
HierarchicLayouter
,HierarchicGroupLayouter
, and the associated legacy interfacesILayerer
,IDrawer
,IMementoSupport
,ILayerSequencer
, together with their implementations, have been removed. Instead,IncrementalHierarchicLayouter
has been renamed toHierarchicLayout
and is now the only implementation of the hierarchic layout style. All associated interfaces and implementations from the namespaceyWorks.yFiles.Layout.Hierarchic.Incremental
have been moved up toyWorks.Layout.Hierarchic
. - The legacy classes
OrthogonalGroupLayouter
andDirectedOrthogonalLayouter
have been removed and their features have been incorporated intoOrthogonalLayout
. - The legacy class
OrthogonalEdgeRouter
and all associated classes have been removed. - The
HVTreeLayouter
class has been removed and its features have been incorporated intoTreeLayout
. - The
DefaultGraphLayout
class has been removed. - The
ParentEdgeAugmentationStage
class has been removed. - The
Graph.MoveSubgraph
method has been removed. CopiedLayoutIGraph
has been removed. An instance of the base typeCopiedLayoutGraph
with the same functionality can be obtained fromLayoutGraphAdapter
'sCreateCopiedLayoutGraph
factory method.- The
CanLayout
method has been removed from all layout algorithms. Previously it pretty much always returnedtrue
.
Renamed Layout Types
yFiles.NET 4.4 | yFiles.NET 5.0 |
---|---|
Main Interface | |
ILayouter |
ILayoutAlgorithm |
ILayouter.DoLayout |
ILayoutAlgorithm.ApplyLayout |
ILayouter.CanLayout |
removed |
Major Layout Algorithms | |
HierarchicLayouter |
removed |
HierarchicGroupLayouter |
removed |
IncrementalHierarchicLayouter |
HierarchicLayout |
DirectedOrthogonalLayouter |
removed; functionality incorporated into OrthogonalLayout |
OrthogonalGroupLayouter |
removed; functionality incorporated into OrthogonalLayout |
OrthogonalLayouter |
OrthogonalLayout |
OrthogonalEdgeRouter |
removed; functionality incorporated into EdgeRouter |
OrganicLayouter |
ClassicOrganicLayout |
SmartOrganicLayouter |
OrganicLayout |
TreeLayouter |
ClassicTreeLayout |
GenericTreeLayouter |
TreeLayout |
HVTreeLayouter |
removed; functionality incorporated into TreeLayout |
SALabeling |
GenericLabeling |
GreedyMISLabeling |
removed; functionality incorporated into GenericLabeling |
MultiPageLayouter |
MultiPageLayout |
MultiPageLayout |
MultiPageLayoutResult |
Changes in alphabetical order | |
AbstractLabelingAlgorithm |
LabelingBase |
ARTreeLayouter |
AspectRatioTreeLayout |
BalloonLayouter |
BalloonLayout |
BufferedLayouter |
BufferedLayout |
CanonicMultiStageLayouter |
MultiStageLayout |
CanonicMultiStageLayouter.LabelLayouter |
MultiStageLayout.Labeling |
CanonicMultiStageLayouter.LabelLayouterEnabled |
MultiStageLayout.LabelingEnabled |
CircularLayouter |
CircularLayout |
CompactOrthogonalLayouter |
CompactOrthogonalLayout |
ComponentLayouter |
ComponentLayout |
FamilyTreeLayouter |
FamilyTreeLayout |
GenericTreeLayouter |
TreeLayout |
GroupedShuffleLayouter |
RecursiveShuffleLayout |
GroupNodeHider |
HideGroupsStage |
IncrementalHierarchicLayouter |
HierarchicLayout |
yWorks.yFiles.Layout.Hierarchic.Incremental.HierarchicLayouter |
yWorks.Layout.Hierarchic.HierarchicLayoutCore |
IncrementalHierarchicLayouter.CreateHierarchicLayouter |
HierarchicLayout.CreateHierarchicLayoutCore |
IncrementalHierarchicLayouter.HierarchicLayouter |
HierarchicLayout.HierarchicLayoutCore |
InteractiveOrganicLayouter.DisableStages |
InteractiveOrganicLayout.DisableAllStages |
InteractiveOrganicLayouter |
InteractiveOrganicLayout |
IsolatedGroupComponentLayouter |
IsolatedGroupComponentLayout |
LayouterKeys |
LayoutKeys |
LayoutTool |
LayoutGraphUtilities |
MinNodeSizeStage |
MinimumNodeSizeStage |
MISLabelingAlgorithm |
MISLabelingBase |
NormalizingGraphElementOrderStage |
NormalizeGraphElementOrderStage |
OrganicLayouter |
ClassicOrganicLayout |
OrientationLayouter |
OrientationLayout |
PartialLayouter |
PartialLayout |
RadialLayouter |
RadialLayout |
RecursiveGroupLayouter |
RecursiveGroupLayout |
ReducedScopeStage |
(removed) |
RemoveOverlapsLayoutStage |
RemoveOverlapsStage |
SALabeling |
GenericLabeling |
SequentialLayouter |
SequentialLayout |
SeriesParallelLayouter |
SeriesParallelLayout |
ShuffleLayouter |
ShuffleLayout |
SingleCycleLayouter |
SingleCycleLayout |
SmartOrganicLayouter |
OrganicLayout |
SplitEdgeLayoutStage |
SplitEdgeStage |
SubgraphLayouter |
SubgraphLayout |
TreeComponentLayouter |
TreeComponentLayout |
TreeLayouter |
ClassicTreeLayout |