yFiles.NET Release Notes

yFiles.NET version 4.4 is the newest major release available. It contains many exciting new features and is almost completely API compatible with the 4.3 series.
The latest release of yFiles.NET is version 4.4.0.1. (See also the entire yFiles.NET change log.)

Technical Requirements

  • Visual Studio 2008 or higher for software development with yFiles.NET
  • Applications based on yFiles.NET Complete or yFiles.NET Viewer require the Microsoft .NET Framework 3.5 (or higher) runtime. Applications based on yFiles.NET Layout require the Microsoft .NET Framework 2.0 (or higher) runtime.
  • A browser to view the HTML documentation.
  • A Microsoft Windows operating system that supports the .NET platform.

yFiles.NET 4.4 - Changes Since 4.3.0.5

New radial layout algorithm
New compact node
placement support in balloon layout algorithm
New integrated node label
placement in balloon layout algorithm

Major Features Added

Viewer

  • GraphClipboard now supports copying independent items. This allows the user to copy labels, ports, bends, or edges to other elements without having to copy their owners. Also this technique allows for copying an item (for example a label) to multiple target elements at once.
  • The GraphClipboard now supports an optional target location for pasting and the new method GraphEditorInputMode.PasteAtLocation can be used for this end, too. In addition, ApplicationCommands.Paste now supports an optional parameter of type IPoint to provide a target location.
  • GraphEditorInputMode now provides default actions for duplicating single graph items or whole subgraphs. This also works with incomplete subgraphs, for example in a tree, it is possible to duplicate a subtree and the tree will never be disconnected.
    In addition, the new command GraphCommands.DuplicateSelectionCommand (shortcut: Ctrl-D) and the new method GraphClipboard.Duplicate can be used to duplicate selected items without altering the clipboard contents.
  • GraphEditorInputMode now provides a default action for reversing edges. To this end, the methods ReverseEdge and ReverseEdges have been added to GraphEditorInputMode. Also, the new command GraphCommands.ReverseEdgesCommand (shortcut: Ctrl-R) has been added.
  • Node and edge labels can now snap to particular locations while moving them interactively. Both types of labels can be aligned horizontally or vertically to their original location. In addition, a node label can be aligned with the borders or the center of its owner, and during resizing of that owner, smartly keeps its relative location to the snapped position. An edge label can be snapped on the path of its owner, or at particular distances of it.
    This feature can be enabled and configured with a LabelSnapContext and is available for labels with one of these label models: SmartEdgeLabelModel, FreeEdgeLabelModel, FreeNodeLabelModel, and FreeLabelModel.
  • Interactive label editing and creation has the following new features:
    • The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is disabled by default and can be controlled through the property GraphEditorInputMode.HideLabelDuringEditing.
    • GraphEditorInputMode and TableEditorInputMode provide new events LabelTextEditingStarted and LabelTextEditingCanceled that are raised directly before the label text editor is shown and after the label editing has been canceled, respectively.
    • Double clicking nodes and edges now opens the label editor. An existing label can be double clicked to edit the label text. This feature can be disabled with the property GraphEditorInputMode.DoubleClickLabelEditingAllowed.
    • IEditLabelHelper implementations provided by the ILabel's lookup can now be used to forbid or customize the editing of individual labels. Class LabelDecorator provides a new property EditLabelHelperDecorator to customize this feature.
    • GraphEditorInputMode.EditLabel and TableEditorInputMode.EditLabel can now be used with SimpleLabel instances. This provides editing capabilities for dummy elements such as legends, page headers or other textual elements.
    In addition, label editing has been reworked for a more consistent user experience. Especially, label editing now:
    • Uses the various callback methods on GraphEditorInputMode, TableEditorInputMode and IEditLabelHelper implementations in a consistent way, regardless of how many labels or labeled items are edited or added, and independent from how the editing/label creation process has been started (e.g. through a command or programmatically through the input mode convenience methods).
    • Determines the actual labeled item that is modified when multiple elements are selected in a consistent way.

Layout

  • Added new layout algorithm RadialLayouter that places nodes on concentric circles. Edges are routed in a radial fashion using one of several routing strategies.
  • Added support for terminating (layout) algorithms prematurely. To this end, new class AbortHandler provides methods for requesting early but graceful termination (see method Stop) and immediate termination (see method Cancel). The following layout algorithms have at least rudimentary support for immediate termination:

    Layout Algorithms
    • BalloonLayouter
    • CircularLayouter
    • CompactOrthogonalLayouter
    • DirectedOrthogonalLayouter
    • GenericTreeLayouter
    • GRIP
    • HierarchicGroupLayouter
    • HierarchicLayouter
    • IncrementalHierarchicLayouter
    • OrganicLayouter
    • OrthogonalGroupLayouter
    • OrthogonalLayouter
    • PartialLayouter
    • RadialLayouter
    • RecursiveGroupLayouter
    • SmartOrganicLayouter

    Routing Algorithms
    • BusRouter
    • Polyline.EdgeRouter
    • OrganicEdgeRouter
    • OrthogonalEdgeRouter

    Other Algorithms
    • GreedyMISLabeling
    • SALabeling

    The following layout algorithms also support graceful early termination:

    Layout Algorithms
    • HierarchicGroupLayouter
    • HierarchicLayouter
    • IncrementalHierarchicLayouter
    • OrganicLayouter
    • SmartOrganicLayouter

    Routing Algorithms
    • Polyline.EdgeRouter

    Other Algorithms
    • SALabeling

  • Added support for parallel execution of computationally intensive tasks.
    Layout algorithms SmartOrganicLayouter and OrganicLayouter may take advantage of multiple threads for layout calculations. Parallel execution is enabled using the algorithms' MultiThreadingAllowed property.
    Interface ITaskExecutor and factory class TaskExecutorFactory make up the programmatic interface for the new concurrency support.
  • Introduced concept of node halos. Halos are reserved space around a node in which layout algorithms will not place other graph elements. Node halos are modelled using class NodeHalo. The following layout algorithms support node halos:

    Layout Algorithms
    • BalloonLayouter
    • CircularLayouter
    • CompactOrthogonalLayouter
    • ComponentLayouter
    • DirectedOrthogonalLayouter
    • GenericTreeLayouter
    • IncrementalHierarchicLayouter
    • OrthogonalGroupLayouter
    • OrthogonalLayouter
    • RadialLayouter
    • RecursiveGroupLayouter
    • SmartOrganicLayouter
    • TreeLayouter

    Routing Algorithms
    • Polyline.EdgeRouter
    • SelfLoopLayouter

    Other Algorithms
    • GreedyMISLabeling
    • SALabeling
    • InsetsGroupBoundsCalculator
    • MinimumSizeGroupBoundsCalculator

  • SmartOrganicLayouter: Added support for partition grid layout. See PartitionGrid.

Minor Features Added

Viewer

  • GraphEditorInputMode got support for cyclic click selection. This helps in conveniently selecting items that are hidden behind other items. By default, this features is bound to the Alt-Key being pressed. It can be disabled by setting the CyclicSelectionRecognizer property to EventRecognizers.Never.
  • ItemDropInputMode is a new DropInputMode that facilitates subclasses that support preview and snapping of the dragged item as well as highlighting potential drop targets.
    NodeDropInputMode and StripeDropInputMode have been refactored to use ItemDropInputMode as base class.
  • ItemHoverInputMode is a new IInputMode that fires events when the mouse enters or leaves the visualization of a graph item.
  • GraphEditorInputMode and GraphViewerInputMode provide a new CanvasClicked event to detect clicks on an empty canvas location.
  • Node ports can now be moved by dragging their IHandle.
  • GraphClipboard has new properties CopyItems, IndependentItems, and DependentItems that allow for restricting the types of items that can be copied at all, independently from their owners, or implicitly through their owners, respectively.
  • GraphViewerInputMode and GraphEditorInputMode: Their ClickInputMode now delivers both left and right clicks.
  • GraphViewerInputMode: The click hit test order can now be configured by property ClickHitTestOrder.
  • GraphEditorInputMode and GraphViewerInputMode provide an explicit hit test order for double clicks that can be changed through the DoubleClickHitTestOrder property. By default, this hit test order prefers labels over other graph elements.
  • Added new method ClickInputMode.PreventNextDoubleClick that can be used in event handlers for single clicks to prevent that this click can become part of a double click event.
  • NodeDropInputMode can now optionally drop nodes onto leaf nodes and thus convert the leaves into group nodes. Also it is possible to drop nodes into collapsed folder nodes. For both use-cases, an opt-in property has been added and a predicate property allows for fine-grained control over this feature.
  • Similarly, leaf nodes can now be the target of a reparenting gesture if the property GraphEditorInputMode.ReparentToLeavesAllowed is enabled. In this case, leaves are converted into group nodes.
  • Added support for deleting bends in a way that an orthogonal edge remains orthogonal after removing the bends. The new property GraphEditorInputMode.OrthogonalBendRemoval enables/disables this feature.
  • GraphViewerInputMode now supports multi-selection via Ctrl+Click and marquee selection. The latter is disabled by default.
  • OverviewInputMode and the GraphOverviewControl have been optimized to improve the user experience when used on touch devices.
  • OverviewInputMode 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.
  • Improved GraphModelManager to allow for easier customizations. Property UseHierarchicNesting was added to allow for adding custom logic that uses a different approach to hierarchic nesting. Also the return types of some of the factory methods where made less restrictive to allow for further modifications.
  • FoldingManager now offers two convenience methods, UpdateViewStates(INode) and UpdateViewStates(IEdge), that will trigger update calls on IDummyNodeConverter and IDummyEdgeConverter for elements that are currently being displayed in a view. This makes it easier to synchronize state between the master graph and the folded graph views in case this is not automatically performed by the default implementation.

Layout

  • BalloonLayouter: Added support for integrated node and edge labeling. See new properties IntegratedEdgeLabeling, IntegratedNodeLabeling, and NodeLabelingPolicy.
  • BalloonLayouter: Added support for different policies to align nodes having the same root node. See new property ChildAlignmentPolicy.
  • BalloonLayouter: Added support for interleaved child node placement. With interleaved placement, child nodes are placed at different distances to their parent node to achieve a more compact layout. See new property InterleavedMode.
  • IncrementalHierarchicLayouter: Improved partition grid support. Nodes can now be mapped to a multi-lane partition cell identifier, i.e., a cell spanning multiple columns and rows. See class PartitionGrid.
  • IncrementalHierarchicLayouter: Improved edge label placement. Edge labels with preferred placement at source/target are placed closer to the corresponding node. Additionally, SimplexNodePlacer offers the option to place adjacent edge labels in a compact, stacked style. See new property LabelCompaction.
  • Polyline.EdgeRouter: Added a fine-granular configuration option to weigh the crossing costs for each label using the data provider look-up key EdgeRouter.LabelCrossingCostFactorDpKey.
  • Polyline.EdgeRouter: Added property IgnoreInnerNodeLabels that allows to ignore node labels that are inside the bounds of their owner so they may be crossed by edges. This is especially useful if labels of group nodes may be crossed while outer labels of non-group nodes may not.
  • Polyline.EdgeRouter: Added support for customizing the order in which edges are routed. See new property EdgeOrderComparator.
  • GenericTreeLayouter: When enabling GenericTreeLayouter.IntegratedNodeLabeling and/or GenericTreeLayouter.IntegratedEdgeLabeling, the respective labels will be taken into account during the calculation of group bounds.
  • DelegatingNodePlacer: Added key DelegatingNodePlacer.LeftRightDpKey that allows choosing on which side a node is placed.
  • PartialLayouter: Now supports handling of directed and undirected edges. See data provider key DirectedEdgesDpKey.
  • FixNodeLayoutStage: Added additional FixPointPolicys UpperRight, LowerRight, and LowerLeft.
  • LabelLayoutTranslator: Added properties WriteBackRelativeEdgeLabelLocation and WriteBackRelativeNodeLabelLocation that allow a core layouter to specify new node or edge label locations relative to the label's owner.
  • LabelLayoutKeys: Added key IGNORE_LABEL_KEY that allows specifying which edge and node labels should be ignored during layout calculations.
  • Added new class OrganicRemoveOverlapsStage that removes node overlaps while respecting a specified minimal node distance. Unlike the approach implemented in class RemoveOverlapsLayoutStage, this approach tries to keep the original layout structure, i.e., it tries to keep the geometric distance between the nodes.
  • Added class StraightLineEdgeRouter that routes edges as straight lines considering specified port constraints.

Improvements

Viewer

  • Various performance improvements for the rendering and the selection handling. This affects, amongst others, ShapeNodeStyle and styles that use a GeneralPath.
  • GraphEditorInputMode.DetailSelectionRecognizer is now also applied for double clicks to determine the clicked item.
  • Improved options for internationalization of strings used in the library. Now custom resources with the names yWorks.Canvas.CanvasResources and yWorks.yFiles.GraphResources can be added to the application project and override strings the library uses.
  • GraphEditorInputMode and GraphViewerInputMode don't select or focus graph items styled with a void style (VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, and VoidPortStyle). The new property VoidStylesIgnored specifies whether this feature is enabled.
  • GraphEditorInputMode and GraphViewerInputMode: the new protected method ShouldSelect can be overridden to determine whether an item can be selected in general.
  • DropInputMode: Added property LastDragEventArgs.
  • OverviewInputMode: The new property Margins specifies margins for the visible area of the bound GraphOverviewControl. The new protected method UpdateVisibleArea provides further means for customizing the visible area.
  • CompositePositionHandler: Added methods GetPositionHandler and GetHandle to retrieve an earlier added IPositionHandler or IHandle.
  • PortRelocationHandles now triggers the EdgePortsChanged event of the GraphEditorInputMode.
  • EdgeStyleDecorationInstaller can now be used with self loops without bends, too.
  • ContextConfigurator: The new property Zoom determines the zoom value that should be assumed on the canvas when drawing. This can affect the rendering of zoom dependent paintable implementations.
  • TableLayoutConfigurator: Improved support for routing algorithms.
  • IGraph: The collection models of graph items returned by the properties Nodes, Edges, etc. now support the methods Remove and Clear to remove graph items from the graph. Note that calling the method Add is still not allowed.
  • GraphModelManager: New callback method OnGraphChanged.
  • LayoutExecutor: The new property ConsiderViewportLimiter can be enabled to let the target viewport after a layout respect the ViewportLimiter of the GraphControl.
    The ViewportAnimation has a new property ConsiderViewportLimiter for the same purpose.
  • LayoutGraphAdapter now adds data providers that map each node, edge and label of a LayoutGraph to their corresponding IModelItem in the original IGraph. Especially, these data providers are available if a layout is run with a LayoutExecutor or the convenience methods LayoutExtensions.MorphLayout and LayoutExtensions.ApplyLayout.
  • GeomSupport: The new method CreateSmoothedPath creates a new path as copy of a given one but with smoothed bends.
  • IconLabelStyle: The icon is added to the hit test area for mouse clicks and marquee selection. This can be switched off by overriding IconLabelStyleRenderer.ShouldHitTestIcon.
  • CanvasControl: Method FitContent now respects the ViewportLimiter. This might result in zoom levels greater than 1.0.
  • DefaultDummyEdgeConverter now synchronizes the Tag property of the first label if label synchronization is enabled.
  • GraphCopier has been improved to facilitate manipulation of the copied items:
    • The new events NodeCopied, EdgeCopied, LabelCopied, and PortCopied are dispatched after a model item has been copied.
    • The method GetOrCreateCopy<T> is now public to facilitate copying of, for example, node tags.
  • GraphClipboard: In hierarchically organized graphs, nodes are now pasted into their previous parent group, the group at their target position, or the root, depending on the new property ParentNodeDetection.
  • Automatic installation of the integrated API documentation is now available for Visual Studio 2013 and 2015 and enabled for all supported Visual Studio versions by default.

Algorithms

  • Dfs: Added method Cancel that can be used by subclasses to cancel the search.
  • Cycles: Improved method FindCycle to stop the search as soon as the first cycle has been found.
  • GraphConnectivity: Improved method MakeBiconnected to work with graphs with self-loops (i.e. edges whose source node is also the target node).
  • Groups: Replaced recursive implementation of method BiconnectedComponentGrouping with an iterative algorithm to support larger graphs.

Layout

  • IncrementalHierarchicLayouter: The default sequencing phase has been improved to produce less crossings and run faster.
  • IncrementalHierarchicLayouter: Now prevents overlaps among same layer edges attached to group nodes.
  • IncrementalHierarchicLayouter: Selfloop routing now takes the layout flow into account. For layout orientation top-to-bottom, selfloops will by default exit on the left or right and enter on top.
  • IncrementalHierarchicLayouter: Added option to route selfloops like backloops (starting at the bottom of the node and ending at the top of the node) when backloop routing is enabled.
  • IncrementalHierarchicLayouter: During layering, edges connected to group nodes may be redirected and replaced by dummy edges connected to the children of the group node. For these dummy edges ILayoutDataProvider.GetEdgeData now returns an IEdgeData of the new type EdgeDataType.RedirectedGroupEdge.
  • PCListOptimizer: Improved port candidate assignment calculated by method OptimizeAfterSequencing.
  • SmartOrganicLayouter: Now uses a more sophisticated approach to remove node overlaps if the scope is set to Scope.All and the quality to time ratio is greater than or equal to 0.7 (property QualityTimeRatio).
  • InteractiveOrganicLayouter: Method StartLayout now takes advantage of multiple threads for layout calculation which may reduce the required runtime.
  • BalloonLayouter: Reduced gaps between adjacent nodes.
  • PartitionLayouter: Added nested class PartitionLayouter.PolylineInterEdgeRouter that routes inter-edges using class Polyline.EdgeRouter.
  • PartialLayouter: Now considers port constraints independent of the specified layout orientation. Note that port constraints are only considered if the core layout algorithm supports port constraints as well.
  • PartialLayouter.StraightLineEdgeRouter: Added support for port constraints.
  • RecursiveGroupLayouter: Added option ReplacePortConstraints that replaces port constraints by port candidates and, thus, may improve the layout result.
  • Polyline.EdgeRouter: Improved support for port candidate sets (see class PortCandidateSet).
  • Polyline.EdgeRouter: Rerouting improved to provide better results.
  • Polyline.EdgeRouter: Memory usage has been reduced.
  • Polyline.EdgeRouter: Added penalty setting for edge length. See PenaltySettings.EdgeLengthPenalty.
  • Polyline.EdgeRouter: Added four predefined optimization strategies. See PenaltySettings.OptimizationBalanced, PenaltySettings.OptimizationEdgeBends, PenaltySettings.OptimizationEdgeCrossings, and PenaltySettings.OptimizationEdgeLengths.
  • Polyline.EdgeRouter: Default penalty settings for minimal node to edge distance, minimal group node to edge distance, minimal first and last segment length, and bends in node to edge distance increased. As a result, these restrictions are considered more strongly.
  • Polyline.EdgeRouter: Now avoids very small octilinear segments.
  • Polyline.EdgeRouter: Edge grouping improved to keep edge segments grouped longer and to consider the paths of fixed edges when calculating the paths of edges having the same edge group.
  • Polyline.EdgeRouter: When using polyline routing, short orthogonal edge segments in a monotonic path section are replaced by a single diagonal segment instead of a short diagonal segment followed by an orthogonal segment followed by a second short diagonal segment.
  • DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added optimization step that reduces the number of perceived bends. See new property PerceivedBendsOptimization.
  • OrthogonalLayouter, OrthogonalGroupLayouter and DirectedOrthogonalLayouter: Added optimization step that aligns degree one nodes (i.e. nodes with one incident edge) that have the same neighbor. See new property AlignDegreeOneNodes.
  • OrthogonalGroupLayouter: Improved routing and edge labeling for self-loops of normal (non-group) nodes.
  • LayoutTool: Added new rectangle arrangement method ArrangeRectangleMultiRows suitable for arranging rows of rectangles with highly different sizes.
  • ComponentLayouter: Added the following new component arrangement strategies to ComponentArrangementStyles that are suitable for components with highly different sizes: MultiRows, MultiRowsCompact, MultiRowsHeightConstrained, MultiRowsHeightConstrainedCompact, MultiRowsWidthConstrained, and MultiRowsWidthConstrainedCompact

Demos

  • The new demos Demo.yFiles.Graph.Bpmn.View and Demo.yFiles.Graph.Bpmn.Editor are more complex demos that show how yFiles can be customized to create ambitious BPM Editor and BPM Viewer.
  • The new demo Demo.yFiles.Graph.Events shows how to register to the various events provided by the graph, the input modes, and the GraphControl.
  • The new demo Demo.yFiles.Graph.Input.MoveUnselectedNodes shows how to use and configure a modified MoveInputMode which lets the user move nodes without selecting them first.
  • The new demo Demo.yFiles.Graph.Input.LabelEditing shows customizations of the interactive label editing made possible by the improvements of the label editing, for example input validation and instant typing.
  • The demo Demo.yFiles.GraphEditor now supports changing the style of a label, drag'n'drop ports with a SimplePortStyle and editing nodes with a TableNodeStyle.
  • The new demo Demo.yFiles.Layout.AbortHandler shows how the new class AbortHandler can be used to stop a layout algorithm which is running in the background.
  • The demo Demo.yFiles.Layout.InteractiveOrganic was simplified. Now, it uses the events provided by MoveInputMode instead of a custom IPositionHandler implementation.
  • The demo Demo.yFiles.Graph.IntegratedNodeStyle demonstrates a custom node style that renders its labels and ports on the same layer as itself. This results in labels and ports being hidden behind other nodes and edges that are rendered in front of the item that they belong to.
  • The demo Demo.yFiles.Graph.Input.HandleProvider now also shows how to implement a handle which supports rotation of labels.
  • The new step 21 Bridge Support of the Style Tutorial shows how to add support for bridges to a custom edge style.
  • Various aspects of the InputDemos have been improved: more concise sample code, more meaningful descriptions and comments, and nicer overall appearance.

Incompatible Changes

Changes in Default Behavior

  • GraphEditorInputMode now by default supports the new GraphCommands.DuplicateCommand that is bound to keyboard shortcut Ctrl-D. If this behavior is undesired new behavior, the DuplicateAllowed property can be set to false.
  • TableEditorInputMode now only handles left mouse clicks by default, which is consistent with the rest of the library.
  • The clipboard now supports copying and pasting of items independently from their owning elements. E.g. single selected labels can be copied to other elements, as well as edges without their source and target nodes. This behavior can be reverted to the old behavior by setting GraphClipboard's IndependentItems to None.
  • GraphEditorInputMode now by default allows for reversing selected edges using the Ctrl-R keyboard shortcut and the new GraphCommands.ReverseEdgeCommand. This new behavior can be turned off by setting the EdgeReversalAllowed property to false.
  • GraphEditorInputMode and GraphViewerInputMode: The default click actions that change the selection and create new nodes are only triggered on left mouse clicks now.
  • Previously, ports at nodes and edges that were copied and pasted to and from the clipboard were all copied, even if there where no edges attached to them after the operation. Now those empty ports are not copied/pasted anymore unless the PortDefaults' AutoCleanup property is set to false or they were unoccupied before the operation already. In order to restore the old behavior, where all ports were copied, regardless of edges where adjacent to them, make sure to include them in the core predicate, since this behavior change just affects ports that had previously not been accepted by the core predicate function.
  • CanvasControl: Method FitContent now respects the ViewportLimiter. This might result in zoom levels greater than 1.0.
  • GraphEditorInputMode's NodeCreated event may now report nodes that are not part of the graph, when the user has dropped a node via NodeDropInputMode and the new NodeDropInputMode.FolderNodeParentsAllowed property is enabled. By default this feature is disabled, though.
  • IReparentNodeHandler's IsValidParent method may now also be queried if the new GraphEditorInputMode.ReparentToLeavesAllowed property is enabled. By default this property is disabled, though. Note that the method will also be queried if the reparent handler is used outside the context of GraphEditorInputMode.
  • IValueSerializerContext.Instance inside GraphML writing code now provide the object that should be converted, not the parent object. If you need to access the actual parent object, you can use the Owner property on the GraphMLValueSerializerContext implementation of this interface.
  • GraphMLIOHandler.QueryReferenceId now never is fired for MarkupExtensions and other proxy objects for serialization, only for the original object references.
  • Polyline.EdgeRouter: Method DoLayout now throws an ArgumentException if there is a node with zero width or height in the given graph.
  • FixedGroupLayoutStage: Method OrthogonalEdgeRouter now returns an instance of class Polyline.EdgeRouter instead of class OrthogonalEdgeRouter.
  • ComponentLayouter: Property PreferredLayoutSize now throws an ArgumentException when setting the preferred size to negative values or zero.
  • Changed default behavior of edge label placement in layouters with integrated edge labeling when using LabelPlacements.Anywhere. Now edge labels are placed on the edge and in the center between source and target node. This change affects the following layout algorithms: IncrementalHierarchicLayouter, OrthogonalLayouter, OrthogonalGroupLayouter, DirectedOrthogonalLayouter, GenericTreeLayouter, and LabelLayoutDataRefinement.
  • LabelCandidateDescriptor: The default values of the properties EdgeOverlapPenalty and NodeOverlapPenalty have been changed to 0.0. Values greater than 0.0 trigger a known issue in all generic label placement algorithms that erroneously rejects all potential candidates. As a result, no suitable placement is calculated in this case.
  • MoveInputMode accepts mouse hovers with the Shift key held down again. This restores the default behavior in earlier versions of yFiles.NET 4.3.
  • GraphEditorInputMode and GraphViewerInputMode: By default, graph items styled with a void style (VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, VoidPortStyle) won't be selected or get the focus.
  • GraphEditorInputMode's ClickHitTestOrder property default value has changed. Now it does not contain the redundant GraphItemTypes.All as the last element in the array anymore.
  • GraphViewerInputMode: By default, clipboard commands are now disabled. This can be controlled with the new property ClipboardCommandsEnabled.
  • The default keyboard shortcut for deselecting elements (GraphCommand.DeselectAllCommand) has been changed to Ctrl+Shift+A. Ctrl+D is now the default shortcut for duplicating selected elements (GraphCommand.DuplicateSelectionCommand). Duplicating elements can be disabled via the DuplicateAllowed property.
  • GraphEditorInputMode.ShouldBeMarqueeSelected is no longer queried by the Paste command to determine the items which should be selected after paste. Instead, the new method GraphEditorInputMode.ShouldBeSelectedAfterPaste is queried. Note that GraphEditorInputMode.ShouldBeMarqueeSelected still is queried to determine the items which should be selected by marquee selection.
  • Now, all pasted items are selected after a Paste (was: only nodes, edges, and bends). This can be configured via the new PasteSelectableItems property in GraphEditorInputMode and the corresponding ShouldBeSelectedAfterPaste method.
  • The hit test order for double clicks in GraphEditorInputMode and GraphViewerInputMode is now controlled through the separate DoubleClickHitTestOrder property. By default, this hit test order prefers labels over other graph elements.
  • If ClickInputMode is configured to deliver both single and double clicks, double clicks are not reported if the first click has created a new node or if cyclic selection is currently active. The same holds for TapInputMode and single/double taps.
  • The Rotate handle visualization is now a single circle, its very thin central point has been removed.
  • The segment index for label model parameters of SliderEdgeLabelModel and SideSliderEdgeLabelModel now is related to the visible segments for edges styled with PolylineEdgeStyle.
  • If an IEditLabelHelper implementation is present in an ILabel's lookup, its EditLabel method is now called in addition to an eventual owner's edit helper when the label text is edited. If implementations are present for both the label and the owner, editing is only allowed if both helpers return true. Additionally, the predicate method GraphEditorInputMode.ShouldLabelBeEdited always has to return true, whether edit helpers are present or not.
  • The label that is edited is now determined in the following order:
    1. If a label is explicitly provided as a command parameter or through a convenience method or is the only selected element, it is edited if the previous condition is satisfied. No other candidates are tried in that case.
    2. If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, the first label that satisfies the condition above is edited if the previous condition is satisfied. If no such label exists, a new label is be added, provided that the owner allows adding. In either case, no other candidates are tried.
    3. The first selected label for which the previous condition is satisfied.
    4. If multiple label owners are selected, the first owner that has a label for which the previous condition is satisfied (in which case that label is edited).
    5. If IEditLabelHelper.EditLabel for either an editable label or its owner provides a different label instance, this instance is edited instead.
    6. Otherwise, a label is added if an eligible owner can be found (see below).
  • If an IEditLabelHelper implementation is present in an ILabeledItem's lookup, its AddLabel method is called to determine whether a label may be added and provide a suitable label instance. Additionally, the predicate method GraphEditorInputMode.ShouldLabelBeAdded always has to return true, 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 an IEditLabelHelper implementation usually should allow editing of label instances that it has created itself in AddLabel.
  • The label owner for which a label is added is now determined in the following order:
    1. If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, a label is added if the previous condition is satisfied. No other candidates are tried in that case.
    2. If multiple label owners are selected, the first one for which the previous condition is satisfied.
  • ContextConfigurator now provides separate Scale and Zoom properties. The Scale property now just scales the complete resulting output by the specified scale factor, including zoom invariant items such as selection decorations. The Zoom property acts as logical zoom factor, e.g. for zoom dependent rendering of items. In contrast, earlier versions the Scale property acted like the CanvasControl's zoom property, i.e. zoom invariant items were not scaled. To get the old behavior, set Scale and Zoom to the same value.

API Changes

  • Changed SnapLine to support non-orthogonal snap lines as well: its properties From and To have been changed from type double to PointD, its property Orientation was removed, and its constructors have been changed accordingly.

    Orthogonal snap lines are now modeled by class OrthogonalSnapLine. It extends SnapLine and provides the property Orientation. Existing API uses either SnapLine or OrthogonalSnapLine, depending on whether it works only with orthogonal snap lines or not.

    As a consequence, in class SnapLineSnapResult, the property SnapLine returns a non-orthogonal SnapLine and the property Delta returns a PointD instead of a double. API related to GraphSnapContext still works only with orthogonal snap lines and uses OrthogonalSnapLine.

  • The Key property on SingleLineSnapLineTemplatePaintable, FixedDistanceSnapLineTemplatePaintable, and InBetweenSnapLineTemplatePaintable, has been made read only.
  • GraphModelManager's factory methods for creating the installers now have a less restrictive return type. The default implementation still returns the same types as before, though.
  • GraphClipboard's factory methods for creating the predicates for the various cut and copy operations now require a second argument that is the graph that the predicate is working on. Usages typically use the graph in the graph control where the selection is also being used. If the default graph selection implementation is used. The graph instance can be obtained from its corresponding property.
  • GraphModelManager's installer related properties now use a weaker return type to simplify subclassing with new functionality. The instances used are the same and can be down-casted accordingly to the more specific types as documented.
  • AlgorithmAbortedException: Removed overloaded methods Check. Client code that needs to terminate layout calculations prematurely must use new class AbortHandler instead.
  • Moved classes PartitionGrid, PartitionCellId, RowDescriptor, and ColumnDescriptor from package yWorks.yFiles.Layout.Hierarchic.Incremental to package yWorks.yFiles.Layout.Grid.
  • IItemFactory: Added method CreateRedirectedGroupEdge.
  • LayeredNodePlacer: Removed data provider key DpKeyDistanceToParentMap from public API, since it is for internal use only.
  • Polyline.EdgeRouter: Method DoLayout now throws an ArgumentException if there is a node with zero width or height in the given graph.
  • Polyline.EdgeRouter: Penalty settings have been changed to double precision. See class PenaltySettings.
  • PathSearch: Signature of method CalculateCosts has changed. It now takes an additional double array as parameter that is populated with the calculated costs instead of returning a new array.
  • DrawingEmbedder: Removed public method PreprocessNodes and protected method PrintStatistics.
  • GraphClipboard's protected method Copy(IGraph, Predicate>IModelItem>, IGraph, ElementCopiedDelegate) which was called by Cut, Copy, and Paste to invoke the GraphCopier has been split: Copy(IGraph, Predicate >IModelItem>, IGraph, ElementCopiedDelegate) now is called only by Cut and Copy. Paste now invokes the new method Paste(IGraph, Predicate >IModelItem>, IGraph, ElementCopiedDelegate, Predicate >IModelItem>).
  • The type of GraphMLAttribute's Serializable property has been changed from bool to the enum GraphMLSerializationMode.
  • GraphEditorInputMode and TableEditorInputMode: return value of callback methods OnAddLabel and OnEditLabel has been changed from void to bool. The return value should specify whether the operation in question was successful.

Bugfixes

Viewer

  • FoldedGraph detects more carefully what has changed before invoking the methods CreateDummyEdgeAppearance and ChangeDummyEdgeAppearance of IDummyEdgeConverter. Previously, in some cases, these methods were called to often or not at all.
  • When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
  • Fixed problem in LayoutGraphAdapter where label candidates for edge labels were not always determined correctly.
  • Fixed LayoutGraphAdapter producing threading issues when PortCalculator was used during a multi-threaded layout.
  • When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
  • FoldedGraphUndoSupport didn't add the correct bend information to its internal data structures.
  • When using an IEditLabelHelper and adding a label interactively, the helper's EditLabel callback was called instead of AddLabel.
  • Newly added labels could have had an empty size when an IEditLabelHelper instance was registered.
  • When a highlighted item was removed from the graph, the highlight was not cleaned up.
  • Reparenting an empty group node displayed the target node highlight around the reparented node.
  • The modified MoveInputMode created by MainInputMode.CreateMoveUnselectedInputMode changed the cursor to indicate a movable object even when the modifierRecognizer disabled moving.
  • When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
  • ClickInputMode: Cancelling the mode during clicks didn't work correctly and as a result, the location reported for the next click might have been wrong.
  • CreateEdgeInputMode now copies the dummy edge's tag to the created edge. This could have caused issues when the EdgeCreationStarted was used to set a custom tag on the dummy edge.
  • When the pressed status of the Shift key changed during a reparenting gesture of a node, the bounds of its containing group node were not immediately updated.
  • When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
  • Labels whose positions were determined by NinePositionsEdgeLabelModel, SliderEdgeLabelModel, and SideSliderEdgeLabelModel might have disappeared when one or more edge segments were hidden under the source or target node.
  • SnapContext: Snap results with a null tag were erroneously always discarded.
  • GeneralPath#Transform and other GeneralPath methods using Matrix2D applied the transformation matrix incorrectly in the case of a rotation.
  • BevelNodeStyle: Fixed update of drop shadow after Radius has been changed.
  • IconLabelStyle: Method GetBounds in IconLabelStyleRenderer returned a valid rectangle even if the label layout was invalid. As a consequence, IsVisible erroneously returned true for labels with invalid bounds.
  • The lookup of CollapsibleNodeStyleRenderer was missing the correct results for IGroupBoundsCalculator, ISizeConstraintProvider, and IShapeGeometry.
  • The lookup of ShadowNodeStyleDecoratorRenderer was missing the correct result for IShapeGeometry.
  • The Name property of the GraphMLAttribute was not considered during deserialization.
  • Write events in GraphML were not always raised.
  • After setting an ICanvasObjectGroup's Visible property to false the group was still visible.
  • CanvasControl.EnsureVisible hasn't worked for bounds larger than the current viewport.
  • Setting the view point on a CanvasControl with a width or height of 0.0 could cause an exception if a ViewportLimiter was enabled.
  • GraphCopier threw an ConcurrentModificationException if the source and the target graph are identical.
  • Prevent an ArgumentNullException in the print preview of the CanvasControl.
  • GraphEditorInputMode and GraphViewerInputMode now respect the MultiSelectionRecognizer for extending an existing selection via marquee.
  • Fixed TableEditorInputMode exhibiting problematic behavior under certain circumstances when the GraphControl's graph is replaced.
  • GraphML could write incorrect values for bend tags.
  • Properties ShinyPlateNodeStyleRenderer.Radius, ShinyPlateNodeStyleRenderer.Brush, ShinyPlateNodeStyleRenderer.Pen and BevelNodeStyleRenderer.Radius were not used consistently.
  • Fixed memory leak that occurred when CreateEdgeInputMode was uninstalled.
  • DefaultArrow.Length did not take the Scale factor into account, sometimes leading to gaps between the edge and the arrow.
  • Custom selection visualizations using EdgeStyleDecorationInstaller in DecorationZoomMode.Mixed or DecorationZoomMode.ViewCoordinates did not work correctly together with BridgeManager.
  • Fixed problems with license validation in conjunction with temporary or mandatory user profiles.

Layout

  • Running any label placement algorithm had no effect for node/edge labels if the properties RemoveNodeOverlaps/RemoveEdgeOverlapswere enabled because all potential candidates were erroneously rejected.
  • AbstractLabelingAlgorithm: Fixed bug that may cause removal of labels that don't overlap with other elements if option RemoveNodeOverlaps is enabled.
  • IncrementalHierarchicLayouter: Fixed rare InvalidOperationException that may appear for grouped graphs containing nodes with fixed coordinates hint (see, e.g., IncrementalHintsFactory.CreateUseExactCoordinatesHint).
  • IncrementalHierarchicLayouter: Fixed bug that breaks incremental hints of grouped edges in incremental layout mode. (see IncrementalHintsFactory.CreateSequenceIncrementallyHint).
  • IncrementalHierarchicLayouter: Fixed bug that may cause a wrong order of fixed (non-incremental) elements if the layouter is applied in incremental mode and the graph contains sequence constraints.
  • BorderLine: Fixed bug in method Grow that may result in an ArgumentException because the minimum value of a BorderLine becomes greater than the maximum value.
  • Polyline.EdgeRouter: Fixed bug that may cause zero length routes of edges whose start and end point are at the same location.
  • IncrementalHierarchicLayouter: Fixed possible IndexOutOfRangeException that may occur for grouped graphs in incremental mode with recursive group layering enabled.
  • IncrementalHierarchicLayouter: Fixed possible exception caused by inconsistent grouping.
  • IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if SimplexNodePlacer's option EdgeStraighteningOptimization is enabled.
  • IncrementalHierarchicLayouter: Fixed minimum edge length for orthogonal edges. It is now also taken into consideration for edges that connect to a node's side and for backloop edges.
  • IncrementalHierarchicLayouter: Fixed possible IndexOutOfRangeException in PCListOptimizer that may appear if there are port constraints which have no matching port candidate or port candidate set entry.
  • SmartOrganicLayouter: Fixed bug that caused weird placement of fixed elements if the minimal node distance is set to 0.
  • MultiPageLayouter: Fixed possible NullReferenceException if the input graph contains empty group nodes.
  • MultiPageLayouter: Fixed possible InvalidCastException.
  • PartialLayouter: Fixed broken edge routes that may appear if option EdgeRoutingStrategy is set to EdgeRoutingStrategyOctilinear.
  • Polyline.EdgeRouter: Fixed wrong heuristic bend calculation if grid is used.
  • BusRouter: Fixed NullReferenceException in BusRepresentations that could appear if the input graph contains overlapping nodes.
  • OrganicEdgeRouterModule: Fixed option Use existing bends which was ignored in previous versions.
  • FixedGroupLayoutStage: Fixed canLayout which changed the structure and layout of the graph.
  • IncrementalHierarchicLayouter: Fixed possible IndexOutOfRangeException if PortConstraints are used together with PortCandidateSets.
  • Polyline.EdgeRouter: Minimum first and last segment length and minimum node to edge distance were sometimes ignored when used together with octilinear routing style.
  • Grouping: Fixed bug in method NearestCommonAncestor that sometimes caused wrong results if one of the specified nodes is the ancestor of the other node.
  • InsetsGroupBoundsCalculator: Fixed method CalculateBounds to consider only the given child nodes and all edges between those child nodes instead of all nodes and all edges in the graph.
  • GenericTreeLayouter: Fixed NullReferenceException that occurred when using LayeredNodePlacer as default node placer.
  • LayoutTool: Fixed calculation of lower width bound in method ArrangeRectangleRows. Due to the better bound, the optimization procedure now needs less steps, especially for graphs with very wide components. Note, that the results may also slightly differ, because the optimization may now stop with slightly different values.
  • SALabeling and GreedyMISLabeling: Fixed possible NullReferenceException caused by labels with zero width/height and a "free" edge label model.
  • IncrementalHierarchicLayouter: Fixed bug that caused wrong coordinates of empty rows (see class RowDescriptor) whose minimum height is zero.
  • DirectedOrthogonalLayouter: Fixed a bug that sometimes caused misplaced edge labels of grouped edges.
  • Polyline.EdgeRouter: Fixed possible NullReferenceException for edge groups that contain fixed edges.
  • Polyline.EdgeRouter: Fixed bug that caused wrong routes for edges grouped with fixed edges.
  • IncrementalHierarchicLayouter and RankAssignments: Fixed possible NullReferenceException that may occur if the maximal duration of the algorithm is limited.
  • IncrementalHierarchicLayouter: Fixed bug that may cause overlaps of edge labels with preferred placement at source/target.
  • Polyline.EdgeRouter: Fixed rare NullReferenceException that mainly appears if there are overlapping nodes.
  • PartialLayouter: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if option RouteInterEdgesImmediately is enabled.
  • CompactOrthogonalLayouter: Fixed possible ArgumentException caused by nodes without node-ids. This problem may only appear if the inter edge router is set to ChannelInterEdgeRouter.