Version 5.1 is the current major release of yFiles.NET. (See also the entire yFiles.NET change log.)
InsideOutsideLabelModelcan be used to place such labels. On the technical side,
IPortnow extends the
ILabelOwnerinterface and the enum constant
The nesting options of
GraphModelManager for the visualizations of nodes and edges have been improved and clarified. The properties
UseHierarchicEdgeNesting have been combined into the new
HierarchicNestingPolicy property. It takes values of the new
HierarchicNestingPolicy enum. Its new option
GraphModelManager to visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth.
PortDropInputModeclasses implement drag and drop for labels and ports, respectively. The API of these classes is similar to
LassoSelectionInputModeselects all model items inside a hand-drawn lasso region. This mode allows combinations of free-hand and straight-line sections during path creation.
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.
HierarchicLayoutData.SubComponentsproperty can be used to configure the new sub-components feature of the hierarchic layout.
TreeMapLayoutthat 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 new
TreeMapLayoutDataclass provides additional configuration options for this algorithm.
TabularLayoutgenerates 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 new
TabularLayoutDataclass provides additional configuration options for this algorithm.
GraphInputMode.LassoSelectionInputModeproperty and a corresponding factory method.
LassoSelectionInputModeis disabled per default.
GraphInputMode.LassoSelectmethod programmatically selects all items in the provided
ILassoTestableinterface specifies whether the item is considered to be inside the lasso path. This is analog to the
IMarqueeTestableinterface for marquee selection.
ILassoTestableor provide one in its lookup. For this, the
BendDecoratorclasses got the new
LassoTestableDecoratorproperty for decorating an item with a custom
LabelStyleBasecan be overridden to customize the lasso testing behavior.
TableEditorInputMode, double clicking a stripe or stripe label now edits the label in the same way as for other graph items.
SizeD: Added methods to
reducethe size of an
PositionHandlers.Combinecombines multiple position handler instances into a single instance.
GraphEditorInputMode, and the event
Animations.CreateSequentialAnimationmethod creates an animation that animates multiple animations in sequence.
CanvasControl.QuantizeInputCoordinatesproperty 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.
TreeMapLayoutDataconfiguration class for the new
TabularLayoutDataconfiguration class for the new
TemporaryGroupNodeInsertionDataconfiguration class for the new
HierarchicLayoutData.SubComponentsproperty can be used to configure the new sub-components feature of the hierarchic layout.
TreeLayoutData.CompactNodePlacerStrategyMementosproperty 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.
OrthogonalLayout.MaximumDurationcontrols the preferred time limit of this layout algorithm.
OrthogonalLayout.UniformPortAssignmentproperty allows you to obtain results with a more uniform port assignment.
TreeLayout: Added node placer
CompactNodePlacerthat 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 property
EdgeRouternow supports routing through user-specified intermediate points. All specified points will lie on the edge route in the given order. See new property
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 property
TemporaryGroupNodesInsertionStagethat 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 of
RecursiveGroupLayoutwithout the need for a real grouping structure when the requirement is that different sub-graphs need to be arranged with different layout algorithms.
TemporaryGroupNodeInsertionData class provides additional configuration options for this algorithm.
PlaceNodesAtBarycenterStageplaces a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these nodes are hidden.
RectD.ToMutableRectanglemethods now return a
MutableRectangleinstead of a
determines whether the path intersects with another
IgnoreXamlDeserializationErrorsenabled, invalid property content is now skipped instead of discarding the whole object with such content.
CreateParametermethods now have default values for parameters that are not needed every time.
InteriorStretchLabelModel: Added new parameters
CenterVerticalfor horizontal or vertical centered one-line labels.
ElementCopiedCallbackparameter of the methods
GraphClipboard.Duplicateis now optional (and can be null).
BendDecoratorfor easy removal of decorations.
GraphBuildernow supports edges to and from group nodes.
GraphBuildernow supports parent-child relationships between nodes defined in
GroupsSourceis set. The parent node of such a relation is converted to a group node.
FreeNodePortLocationModel.NodeCenterAnchoredfor nodes and
BendAnchoredPortLocationModel.FirstBendfor edges instead of a parameter of an internal model.
DefaultGraphhas new factory methods to customize undo unit creation.
CanvasControl.LimitFitContentZoomproperty which controls whether the maximum zoom level for the
CanvasControl.FitContentmethod as well as the
FitContentcommand is restricted to
1or the value of the
GraphModelManager.GetMainCanvasObjectreturns the canvas object that should be used when changing the visibility or z-order of a model item.
ComponentCommands.ScrollPagecommands now accept any
IConvertiblecommand parameter instead of only doubles and strings.
CanvasControl.ZoomTomethods, there are now two
CanvasControl.ZoomToAnimatedmethods that animate the viewport change.
GraphOverViewControlnow keeps configuration changes made to the overview's
ICanvasObjectGroup.AddChild(Object,ICanvasObjectDescriptor): The second parameter is now a default parameter with default value null and therefore changed its attribute to
CanBeNull. If no descriptor is passed,
CanvasObjectDescriptors.AlwaysDirtyInstanceis used by the default implementation.
GraphModelManagernow avoids unnecessary re-installation of items if they keep their
ICanvasObjectGroup. By these re-installations the z-order of the item in its group was lost and a new visual was created.
PolylineEdgeStylerenders better looking paths for self loop edges whose ports are near the node border.
CanvasControl.CreateInputModeContextmethod is now public instead of protected.
EditLabelnow also returns a Future, similar to
INodeparameter of the
NavigationInputMode.EnterGroupmethod is now optional. If it is omitted or
nullthe whole graph will be revealed.
MoveInputModefor unselected nodes now moves the bends of adjacent self-loops, too.
NavigationInputModecan be used to configure the determination of the "next" item.
ItemDropInputMode<T> is no longer restricted to
CreateEdgeInputModenow releases the mutex before dispatching the
MoveInputModenow releases the mutex before dispatching the
ResizeStripeInputModenow releases the mutex before dispatching the
CreateEdgeInputModenow removes coinciding bends if orthogonal edge creation is enabled.
CreateEdgeInputMode.GetSourcePortCandidatesprotected method makes source port candidate determination more flexible.
CreateEdgeInputMode.DoStartEdgeCreationmethod can be used to define the initial location that shall be used to find a target node.
CreateEdgeInputModenow 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.
CreateEdgeInputMode.StartOverCandidateOnlyproperty can be used to restrict the start of an edge creation gesture to directly hovered port candidates.
TextEditorInputMode.TextBoxPlacementPolicyproperty provides finer control of what happens when the
TextBoxis (partially) outside of the viewport.
TextEditorInputMode.TextBoxPaddingproperty controls the padding between the
TextBoxand the border of the canvas.
CanvasControl.Mouse2DClickedevent 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.
Visualizationhave been added to
PortRelocationHandleProviderand are applied to each
PortRelocationHandlecreated by this provider.
PortRelocationHandleto allow customization of the port candidates.
PortRelocationHandle.Visualizationproperty 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.
contentparameter of the
MouseHoverInputMode.Showmethod defines the content of the tool tip to show. Now, the
GetToolTipContentmethod only gets called if no content was specified.
SelectedMovablesHitTestablehave been added to
GraphEditorInputMode. These are used as default
GraphEditorInputMode.MoveInputModeand can be reused for other input modes.
CanvasControlwhich allows for configurable handling of mouse gestures which are only received partially.
CanvasControlnow reports losing the mouse capture with a
Mouse2DEventwith the type
LostCapture. Several input modes listen to this event and cancel themselves upon it.
ITableis now optional:
TableEditorInputModenow handles clicks similar to
ItemRightDoubleClickedevents are raised.
ClickableRegionsdetermine for which items and regions a click event will be raised.
LayoutExecutor.CreateLayoutGraphAdaptercallback method makes it possible to configure the
LayoutGraphAdapterthat is used for the layout calculation.
TreeLayoutData.CriticalEdgePrioritiesproperty can be used to specify critical edges.
SmartEdgeLabelModelnow is properly handled by labeling algorithms, resulting in better label placements.
PortCalculatorto improve the port assignment.
TableLayoutConfiguratorhas been improved:
PartitionGridDatanow reuses the
PartitionGridcreated by the
TableLayoutConfiguratorwhich provide access to the
PartitionCellIdassignment of the configurator as well as the mappings between
EdgeRouterin 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 (see
BusDescriptor.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 specified
CoreLayoutis either an instance of class
ClassicTreeLayout. Furthermore, property
MultiPageLayout.AdditionalParentCountallows 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 property
CreateProxyReferenceNodesthat allows to disable the creation of proxy reference nodes as well as property
MultipleComponentsOnSinglePagethat allows to prevent that elements of different connected components are placed on the same page.
PortPlacementStagenow 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 using
DataProviders registered with
TreeComponentLayout: Added property
ConsiderUndirectedTreesthat allows to specify whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered.
SimpleNodePlacernow 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 method
ClassicTreeLayoutnow allows you to specify a minimum vertical distance for the horizontal edge segments of the bus, see
HierarchicLayoutDatacan be used to configure layer and sequence constraints for the
HierarchicLayout. These supersede the previous
OrthogonalLayout: Reduced the number of bends of directed edges.
EdgeRouterclass now calculates a better routing for edges between group nodes and their descendants in the case that the routing is aborted via
AbortHandleror 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.
HierarchicLayoutclass now respects the sequence and layering constraints between subcomponents. Previously, such constraints were ignored.
PlaceNodesAtBarycenterStageDatawhich allows to conveniently define the affected nodes that should be affected by
HierarchicLayoutnow requires less memory for graphs with sequence constraints.
HierarchicLayoutno longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges.
Mouse2DEventTypes.Enteredevent now provides the correct coordinates.
PolylineEdgeStylenow takes arrow heads into account for visibility checks.
SelectionIndicatorManagerno longer results in a
OrientedRectangleExtensions.GetCenterdidn't return the correct center if the width or height of the rectangle was equal to 0.
HitTestRadiusproperty of the following implementations of
ICanvasContextnow correctly contain the value in world coordinates instead of view coordinates:
Contexts.CreateCanvasContextwhen passing a
CanvasControlbut no hit test radius.
InteriorStretchLabelModel.GetMinimumNodeSizemethod now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width.
GroupNodeDefaults.Labels.AutoAdjustPreferredSizeproperty and the
GroupNodeDefaults.Ports.AutoCleanupproperty were not considered for labels and ports of groups.
ApplicationCommands.Copycommand is no longer executed twice.
GraphClipboard.Cutdon't copy items anymore which depend on items that are selected but not included in
FreeEdgeLabelModel: Static property
Instanceis now excluded from obfuscation.
IFoldingViewnow raises the
BendAddedevents 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.
GraphMLIOHandler: The methods
OnQueryTypenow throw an
ArgumentNullExceptioninstead of a
NullReferenceExceptionwhen one of the arguments is null.
Table: The methods
SetLabelLayoutParameternow throw an
ArgumentExceptioninstead of an
IPortSnapResultProvidernever returned any snap results.
DefaultGraphnow calls the
OnRemovingPortmethods before their incident items are removed.
Duplicateare no longer enabled if there are no elements to cut, copy, or duplicate.
GroupingSupport.HasGroupNodesmethod 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.
ShinyPlateNodeStyleRenderernow consider the shadow in their
NullReferenceExceptionthat occured when any of the Descriptor properties were set while the
GraphModelManagerinstance was not yet associated to an
GenericLabelModelserialization: Fixed cyclic reference in GraphML which could happen while serializing a
GenericLabelModelwith a parameter with associated descriptor.
RectangleIndicatorInstallerreturned 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.
DefaultPortCandidateDescriptorwhich used incorrect coordinates.
PortRelocationHandleProvidernow can handle null as "graph" constructor parameter.
PreferredPlacementDescriptor.Equalsmethod incorrectly reported instances with different angles and distances as equal.
SmartEdgeLabelModelcentered all labels on an edge that overlapped with a segment of the edge or were placed directly next to it.
NullReferenceExceptionin class Animator, that might be caused when using
CanvasControl: Fixed possible changes to
Zoomwhen moving the viewport while a
TextEditorInputModewas uninstalled directly after starting an edit.
ClickInputModeprovided wrong click locations in the
Clickedevent if a
Mouse2DEventTypes.Clickedevent without preceding
Mouse2DEventTypes.Pressedevent was processed.
CreateBendInputModenow cancel on
CreateEdgeInputModedid not show port candidates after re-installation of the input mode.
SmartEdgeLabelModelthat is owned by an edge without visible path no longer throws an exception.
ItemHoverInputModenow resets the hovered item when moving the mouse out of the control.
GraphViewerInputModeno longer ignore changes to their sub-input modes after having been installed once.
MarqueeSelectionInputModeduring the gesture via code left the marquee visible on the screen.
ClickInputModewere 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.
GraphSnapContext.NodeToEdgeDistanceproperty is set to
LabelEditingEventArgs.Context.ParentInputModeproperty provided in the events
TableEditorInputMode.LabelEditingnow contains the corresponding
ValidBeginCursoris now correctly hidden during edge creation when bend creation isn't allowed.
CreateEdgeInputModedidn't always update the highlight of possible source port candidates when its
ShowPortCandidatesproperty was configured to show the source port candidates.
ItemHoverInputModeupdates the hovered item upon mouse drag events, too. This is the documented behavior. Previously, the hovered item was only updated on mouse move events.
ItemHoverInputModeremoves the hovered item upon
ParentInputModeproperty of the
InputModeEventArgsnow is the input mode which has raised the event. Previously, some input modes erroneously set the
ParentInputModeto the containing
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.QueryToolTipwas raised twice for every mouse hover event.
ITable.LabelRemovedevents for the implicitly removed associated labels are now raised, too.
TextBoxnow is correctly placed.
OrthogonalLayoutnow considers edge grouping also if there are no directed edges specified.
EdgeRouter, an error occurred when there were intermediate routing points and the path search got aborted (e.g. because of maximum duration time limit).
ShortestPaths, an error occurred when the a-star algorithm was applied to a graph with non-monotonic heuristic costs.
HierarchicLayout, an error was triggered when a
yWorks.Algorithms.Util.DataProviderAdapterthat does not override the
DataProvider.getmethod was registered with key
GivenLayersLayerer.LayerIdDpKey. This issue only appeared in conjunction with subcomponents.
HierarchicLayoutnow produces less bends if the edges should be routed on a grid and the grid reference point is not
HierarchicLayoutdid 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.
HierarchicLayoutnow produces more symmetric results for grouped edges if property
OrthogonalLayoutthat may have caused infinite looping for grouped input graphs.
OrganicLayoutproduced an error if the
CycleSubstructureStyleproperty was set to
CircularLayoutdoes now correctly consider the
EdgeBundleDescriptor.Bundledproperty for edges between different partitions. Previously, when at least one of these edges had the
Bundledproperty enabled, all of them were bundled, ignoring the property value of the other edges.
TreeMapLayoutthat may have caused
NaN-coordinates or infinite looping for input graphs that are non-directed trees.
GraphLayoutLineWrappernow produces more compact results.
GraphLayoutLineWrapperproduced drawings with large empty space between lines.
HierarchicLayout: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers.
MultiPageLayoutnow correctly considers the maximum page size for tree layouts.
TabularLayoutno longer crashes when applying an instance of it to a single-node graph after that same instance was previously applied to a larger graph.
HierarchicLayoutnow correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues.
GenericLabelingnow always prefers
LabelCandidateswith higher profit values over others with lower profit (see
LabelingBase.GetProfit). Previously, this sometimes happened even though both candidates did not intersect with other elements.
GenericLabelingdoes no longer assume that all
LabelCandidatesassociated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given.
EdgeRouternow always considers the
PortCandidatesfor edges grouped with fixed edges.
EdgeRouternow keeps collinear bends of fixed edges.
FamilyTreeLayoutnow correctly considers the preferred family member order.
OrthogonalLayoutdoes no longer throw an exception for some input graphs when property
SubtreeStyleis set to
ChainStyleis set to a wrapped style.
OrthogonalLayoutno longer throws exceptions if property
CycleStyleis set to a specific style and the input graph only consists of a single cycle.
BusRouterdoes no longer produce non-deterministic results, i.e. different results for consecutive runs on the same input. Previously, this was possible in rare cases.
EdgeRouterdoes no longer crash when defining exactly two equal intermediate routing points for an edge.
ReparentStripePositionHandler: All callback methods dealing with ghost objects have been renamed consistently:
MoveLabelInputMode.CreateLabelHitTestablehas been removed. Developers who want to set a custom instance need to set it directly to the
CanvasControl.AnimateScrollTomethod has been removed and is superseded by the new
AnchoredPortLocationModelExtensionclass has been moved to the GraphML compatibility demo where it was really needed.
GraphInputMode.CanvasClickedevent now provides the
GraphViewerInputModeas parent input mode in the
Contextproperty of its
ITable.RelativeLocationproperty has been removed. Use
CleanUpin API names.
EdgeCreatormight receive null as
targetPortCandidateparameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null.
StripeSubregion.TargetTableNodeproperty is now read-only.
Enabledparts from the following property names.
GraphEditorInputMode.CreateMoveUnselectedInputModemethod has been removed. Use the property
CreateEdgeInputMode.ShowPortCandidatesproperty has now the enum type
SnapLine.SnapLineColorKey, which never worked correctly. Use
OverviewInputMode.AutoMouseWheelZoomproperty is superseded by the new
SizeD.IsFinitenow also consider empty instances as not finite.
IGraph.SetNodeLayoutmethod and the various methods to create a node now throw an
ArgumentExceptionif the layout rectangle contains one or more
NaNvalues. Similarly, the
IGraph.SetBendLocationand the various methods to add a bend to an edge now throw an
ArgumentExceptionif the location point contains one or two
CreateEdgeInputMode.DummyEdgeproperty 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 the
Visualization.Ghostto restore the old mode.
LayoutExecutor.UpdateContentRectproperty is now enabled by default.
CreateEdgeInputMode, determination whether the mouse hovers over a valid end: if
ForceSnapToCandidateis disabled, the
EndHitTestablenow 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.
GraphModelManager.UseHierarchicEdgeNestingproperty was set to true, canvas objects for edges were added to the
GraphModelManager.EdgeGroupas long as no group nodes were part of the graph. The corresponding new
NodesAndEdgeshas no such behavior and thus,
EdgeGroupis empty by default. Use one of the other polices if canvas objects for edges should be part of
PolylineEdgeStyledefaults to an improved smoothing algorithm when using the
SmoothingLengthproperty. This is especially apparent when using large values for
Mouse2DEventArgsnow is more synchronized with the real mouse button state. The old behavior can be restored using the new property
TextEditorInputMode.Editingis now false when
TextEditorInputMode.InstallTextBox()is now called after
AdjustSize, so the
TextBoxis not yet available as a child control of the Canvas in those methods.
CollapsibleNodeStyleDecorator.CreateSelectionInstallerhas been removed.
HierarchicLayoutDatahave been marked as obsolete. The new properties
SequenceConstraintsshould be used instead. Similarly, the extension methods
HierarchicLayout.CreateSequenceConstraintFactory(IGraph)have been marked as Obsolete.
RotatableNodedemo shows how support for rotated node visualizations can be implemented on top of the yFiles library.
RenderPoliciesdemo shows the effect of different render policies on the z-order of nodes, edges, labels and ports. This demo replaces the
Integrated Node Styledemo.
GraphMLCompatibilitydemo: Added missing implementation of
BpmnDemo: Fixed clone implementations of some styles.
yEd.NET: Fixed a bug that prevents using triangle arrows for edges.