yFiles for HTMLChangelog
yFiles for HTML 3.0.0.4
This fourth bugfix release for yFiles for HTML 3.0 corrects some errors. Also, there are several improvements for the demos. There are no incompatible changes.
Bug fixes
Interaction
-
CanvasComponent.pointer-long-restevents are no longer repeatedly raised during auto-scroll at the canvas bounds. OnlyCanvasComponent.pointer-dragevents are now triggered during this gesture. -
If the
CreateEdgeInputMode.allowCreateBendproperty is false, a long rest of the pointer no longer cancels edge creation. -
The
IPortCandidateProvider.fromPortDefaultsmethod no longer returns a malfunctioningIPortCandidateProviderimplementation that causedTypeErrors. - The detection logic for trackpad and mouse wheel events has been expanded again and now correctly recognizes even more devices that report events with unusual movement values.
Hierarchical Layout
-
The
HierarchicalLayoutclass no longer creates avoidable crossings between edges with the same target node infromSketchMode. -
The
HierarchicalLayoutclass no longer unnecessarily enlarges group nodes in the case when no group node padding is defined, i.e. no data registered with theLayoutKeys.GROUP_NODE_PADDING_DATA_KEYproperty. -
The value of the
HierarchicalLayout.stopDurationproperty is no longer ignored during the execution of someILayerAssignerorICoordinateAssignerimplementations that have their own specificstopDuration. TheHierarchicalLayoutclass will now always consider the shortest applicable duration.
Tree Layout
-
The
TreeLayoutnow correctly handles the specifiedcompactSubtreePlacerStrategyMementos(STRATEGY_MEMENTO_DATA_KEY) for nodes associated with aCompactSubtreePlacer. Previously, the algorithm incorrectly overwrote the value for the leaves.
Circular Layout
-
The
CircularLayoutclass no longer throws an exception with certain graph structure constellations when thebetweenCirclesRoutingStyleproperty is set tocurved.
Noteworthy demo improvements
- The new Supply Chain Demo visualizes a bakery supply chain in France. The graph’s nodes represent individual facilities and list the items produced at that location, including the current stock. The edges between products describe product flows. Interact with the diagram to highlight the dependencies between products and see how changes in inventory at one location affect dependent locations.
- We have simplified the code of many smaller demos by reducing the setup code and other boilerplate code. The code for these demos can now be used unchanged in the revised yFiles Playground, for example, to simplify sharing with colleagues or the yFiles support team. In this release, most demos in the “Layout” category have been updated, and more demos will be migrated in future releases.
- The CSS Styling Demo received a fresh visual look, demonstrating how to target different graph elements using a pre-defined color palette in CSS.
-
The demo directories now contain
package-lock.jsonfiles as an additional safety measure against npm supply chain attacks. - The timeline component used in the Fraud Detection Demo and the Timeline Demo now properly reacts to touch events.
- Many more improvements and corrections in other demos.
yFiles for HTML 3.0.0.3
This third bugfix release for yFiles for HTML 3.0 corrects some errors.There are no incompatible changes.
Bug Fixes
Components
-
The
GraphComponentnow is more careful when removing DOM elements from item styles that are no longer needed. This prevents errors if the element has already been removed otherwise, e.g., by frameworks such as React or Angular.
Styles
-
The selection, highlighting and focus visualization of edges using
BridgeEdgeStyleorArcEdgeStyleno longer disappears too early if the edge path is only partially in the viewport. -
MarkupLabelStylenow trims trailing whitespace on each line, improving horizontal alignment. -
MarkupLabelStylenow provides improved support for text wrapping in nested markup tags.
WebGL
- The position of WebGL labels is now always updated after interactive gestures.
-
WebGLIconLabelStylenow correctly renders transparent icons, which previously appeared greyed out. -
WebGLImageNodeStyleandWebGLIconLabelStyleno longer exhibit image border glitches during rendering. - With WebGL rendering, the alignment of single-line labels now more closely resembles that of SVG, and letters are no longer cut off at the edge.
Interaction
- 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 ofCommand.TOGGLE_ITEM_SELECTIONhas been adjusted accordingly, and the behavior theCommand.SELECT_ITEMandCommand.DESELECT_ITEMhas also been changed accordingly. -
NavigationInputModenow reliably brings items selected with keyboard navigation into the view. Previously this only worked for nodes. - The default selection visualization for stripe labels is now actually rendered.
-
Adding a key binding to
KeyboardInputModefor a shortcut that also triggers a browser action now properly prevents the execution of the browser action. - Pinch-zoom gestures on touchpads are now reliably recognized, even if they alternate with touch or pen inputs.
-
In a
GraphComponentwith aprojection, rotated label text edit boxes are now placed at the correct location.
GraphML
- The GraphML parser now correctly reads arrays with empty strings.
View-Layout-Bridge
-
When called multiple times, the
LayoutExecutorAsyncWorker.initializeWebWorkermethod will now clean up event listeners from previous runs before registering a new one. -
The
IGraph.applyLayoutmethod now correctly considers itsportPlacementPolicyargument. -
The
LayoutExecutorandLayoutGraphAdapterclasses 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
-
For the
LayoutDataclasses, setting a property of typeItemMappingwith a native JavaScript map now works correctly in all cases. Previously, such anItemMappingproperty did not return the correct default value for diagram elements whose value was not explicitly set unless the default happened to benull. -
The
CurveFittingStagenow correctly respects the maximum error. Previously, it sometimes produced curves that violated the maximum error. -
The
LineSegment.getIntersectionmethod 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 returnednullinstead.
Hierarchical Layout
-
The
HierarchicalLayoutalgorithm now correctly handles node and edge labels with width or height set to negative values. Previously, large negative values may have caused exceptions.
Labeling
-
The
GenericLabelingalgorithm now correctly considers the case where model parameters of aCompositeLabelModelhave different weight values. Higher weights are preferred.
Partial Layout
-
PartialLayoutScopeDatawill 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.
Algorithms
-
The
Intersectionsclass does not disposeFilteredGraphWrapperinstances 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 intonullfields and properties, generating exceptions that were non-trivial to understand. -
IntersectionsResultno 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.
Geometry
-
The
GeneralPath.pathMayIntersectClipmethod has been corrected for paths with multiple segments, at least one of which is a cubic segment.
General
-
Corrected broken links in the documentation comments of the TypeScript types. In
particular, there are no longer broken links to primitive types,
ObjectandArray.
Noteworthy Demo Improvements
- We have significantly improved the Process Mining demo. The demo now shows a more realistic example, and it is possible to pause at any time to examine the details of individual processes more closely.
yFiles for HTML 3.0.0.2
This second bugfix release for yFiles for HTML 3.0 corrects some errors. We have added a few new API members that are required to use existing API meaningfully, but there are no incompatible changes.
Bug Fixes
Components and Styles
-
Setting
nullto theGraphComponent.inputModeproperty now works as expected. Previously, a new instance ofGraphViewerInputModewas created and returned by this property ifnullwas set. - In more cases, the text now wraps as it did in version 2.6 and as you would naturally expect. In the previous version, text wrapping could be incorrect, especially for texts that contained consecutive spaces, leading and trailing spaces or long words.
- In multiline labels, the distance between the first and second line is no longer larger than all other distances.
- The WebGL image style no longer unnecessarily generates the associated SVG image data if it is not required for rendering. This led to a noticeable delay in some user actions, e.g., when using the marquee selection in large diagrams for the first time.
-
The
Size.areaproperty now returns 0 for empty sizes. This is consistent with the behavior of theRect.areaproperty.
Interaction
- During text editing, the first mouse click outside the text editor is no longer ignored.
- In certain rare cases, the insertion of edges could end up in an endless loop. This has now been fixed.
Hierarchical Layout
-
Instances of
LayerConstraintDataandSequenceConstraintDatathat are configured with comparables can now be reused for multiple layout calculations. -
The
HierarchicalLayoutclass now always places aligned ports correctly in from-sketch mode. -
The
HierarchicalLayoutclass no longer assigns superfluous space to group nodes if there are grouped edges. -
The
HierarchicalLayoutclass no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints. -
The
HierarchicalLayoutclass no longer produces an error for labeled graphs with port alignment constraints when the integrated edge label placement is enabled. -
The
HierarchicalLayoutclass no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer.
Labeling
-
The
EdgeLabelCandidates.buildCandidatesmethod does no longer returnnullfor some setups with free edge label models. Instead, it returns an emptyIEnumerablenow. -
The
GenericLabelingclass now produces less node-label overlaps.
Other Layouts
-
The
TreeLayoutclass no longer ignores the initial locations for some subtree placers if thefromSketchModeproperty is enabled. -
The
OrthogonalLayoutclass no longer throws an error for many input graphs when thefromSketchModeproperty is enabled. -
The new
TabularLayoutData.layoutGridCellDescriptorsResultproperty makes it easy to query the cell to which a node was assigned to by theTabularLayoutclass after applying it. -
The layout algorithms do no longer throw an Exception when a
LayoutGridincluding a mapping from nodes tolayoutGridCellDescriptorsis defined and if algorithmTabularLayoutwas executed before with alayoutModeof eitherAUTO_SIZEorFROM_SKETCH. In these modes theTabularLayoutautomatically assigns cells to nodes so that any mapping defined prior will be ignored now. -
The new protected
ParallelEdgeRouter.hideMultiEdgesmethod is required to meaningfully overwrite the existing protectedParallelEdgeRouter.findAndHideMultiEdgesmethod.
Noteworthy demo changes
- During user interaction, the browser on the Meta Quest VR headset sends unusual pointer events of type mouse alongside regular pointer events. These additional events confuse the yFiles's input event handling. Therefore, the demos now detect and ignore such events on this browser.
yFiles for HTML 3.0.0.1
This 1st bugfix release for yFiles for HTML 3.0 corrects some errors, and includes two small improvements. There are no incompatible API changes.
Improvements
-
The
ShadowNodeStyleDecoratorclass now wraps the decorated style in an additionalSVGGElementthat applies the SVG filter instead of tainting the wrapped style's filter attribute. -
The
MoveViewportInputMode.priorityvalue has been lowered to105to make viewport panning withCTRLorSPACEmodifiers easier in dense graphs.
Bug Fixes
Layout
-
Serializing a large graph with
LayoutExecutorAsyncto calculate a layout in a web worker no longer takes an extremely long time. -
Executing a layout with the
GraphComponent.applyLayoutAnimatedandIGraph.applyLayoutmethods now behaves in exactly the same way as configuring theLayoutExecutorwith the same setting. Previously, there were subtle differences that could lead to different behavior. -
The Tree, Orthogonal, Organic, and Series-parallel layout now automatically places
edge labels of the parallel edges handled by their
ParallelEdgeRouterinstance, when integrated edge labeling is enabled. -
The
EdgeRouternow prefers to use fixed port candidates that are not overlapped by other nodes. -
The
OrganicLayoutclass no longer ignores the preferred edge length in incremental layout mode with a single affected element. -
The
TreeLayoutclass no longer produces broken edge routes for some input graphs with multi-parent structures. -
The numerical value of
LayoutAnchoringPolicy.NONEhas been changed from 7 to 0 to avoid errors in certain cases.
Styles
-
The intersection calculation for
RectangleNodeStylehas been corrected for some previously failing edge cases that resulted in edges ending in midair or disappearing. -
The
LabelStyleclass no longer renders single-line labels if the label height is too small. -
The
TextRenderSupport.addTextmethod no longer displays single-line text if the maximum height is too small. -
ArrowEdgeStyleno longer triggers an error when WebGL rendering is used. -
With
ShadowNodeStyleDecorator, the nodes are no longer occasionally invisible. -
Resolved access errors in
StyleIndicatorRendererslikeNodeStyleIndicatorRendererwhen the item or owner no longer exists.
Component and Interaction
-
The trackpad and mouse wheel detection logic did not properly work on macOS and on
various non-default browser zoom levels. The configuration and logic have been
improved and should now yield more consistent results across browsers,
OSs, browser zoom settings, most drivers and hardware. For edge cases and future inconsistencies, a configuration setting has been made available inWorkarounds. -
Several members of
EditLabelInputModecould not be overwritten by mistake. Theinstall,uninstall,tryStop, andcancelmethods and theenabledproperty can now be overwritten. -
Elements in the
GraphComponentDOM no longer have class attributes that contain the namenull.
Notable Demo Improvements
-
With the
TemplateStylesof the Template Styles Demo, changing thecssClassproperty while the style is already in use now has an effect, since changes to this property are now detected by theupdateVisualmethod.
yFiles for HTML 3.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.
New Features, Improvements, and Bug Fixes
Categories: General Graph Components Rendering Selection, Focus, Highlight Styles WebGL Interaction Label Editing Snapping Clipboard Folding View-Layout-Bridge Layout Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Organic Layout Interactive Organic Layout Radial Tree Layout Partial Layout Component Layout Algorithms Analysis Collections Geometry
General
New Features and Improvements
-
The yFiles class system now follows the conventions of the ECMAScript standard even
more closely. As a result, some special classes and constructs have become
superfluous, e.g., the
YObject,YNumber,YBoolean, andYStringtypes and the$classmember. -
The event listener API for yFiles events is now similar to JavaScript's
EventTarget. Each event sender now has a singleaddEventListenerandremoveEventListenermethod that gets the event name as the first parameter and an optional options object as the last one. The second parameter is the event listener function that gets two parameters: a specificEventArgsobject and the sender instance. The options support automatic event deregistration via theAbortControllerAPI and single (once) event invocation with automatic deregistration. - Option objects in arguments of constructors and other methods now also work for nested properties. Previously, only the direct properties of the class could be defined.
-
It is now possible to explicitly pass
undefinedto optional parameters matching the behavior of ECMAScript and TypeScript. - yFiles for HTML 3.0 uses a new license format (license version "1.2"). Existing licenses with license version "1.1" remain compatible.
-
The yFiles npm package is now named
@yfiles/yfiles. This makes it easier to serve yFiles from a local registry by associating the @yfiles scope with it. -
The lookup API has been restructured. In particular, the
LookupDecoratorclass is now easier to use, but most use cases are covered without having to access the low-level lookup architecture. -
The library now prevents problems with strict CSP settings, as we now set CSS styles
with the
HTMLElement.styleproperty instead of thestyleattribute.
Graph
New Features and Improvements
-
The new
IGraph.getEdgesBetweenmethod returns all edges between two ports or port owners. -
CompositeLabelModelnow 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.addParametermethod wraps a given parameter of one of the composed label models. -
The methods of
IGraphnow check consistently whether given geometric arguments are neither infinite norNaN. -
The rotation direction of
OrientedRectangle,LayoutNodeLabel,LayoutEdgeLabelandFreeEdgeLabelModelis 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, andInteriorStretchLabelModelhave been renamed toExteriorNodeLabelModel,InteriorNodeLabelModel, andStretchNodeLabelModel, respectively, to make it clear that only nodes are supported as label owner for these models. -
The implementations of
ILabelModelParameterandIPortLocationModelParameterused by the publicILabelModelandIPortLocationModelclasses are now public and provide all properties necessary to recreate them on the models. Consequently, the staticdeserializeParameterandserializeParametermethods of theILabelModelParameterandIPortLocationModelParameterclasses, which could be used to retrieve those properties and recreate the parameter, have been removed. -
The
ILabelModelparameter of theILabelModelParameterFinder.findBestParameterandILabelModelParameterProvider.getParametersmethods has been removed as it was only very rarely required. -
The
GraphCopierAPI has been enhanced to offer improved clarity and functionality.-
The
GraphCopierhas been optimized since its support for theGraphClipboardhas been removed. -
The
GraphCopier.copymethod now uses anIEnumerableof items to define the subset to copy.
-
The
-
The
SimpleNode,SimpleEdge,SimpleBend,SimpleLabel, andSimplePortclasses now provide a convenienceLookupDecoratorinstance through theGetDecoratormethod. -
The
ILabelModel.createDefaultParametermethod and most of its implementations have been removed as it was often unclear what “default” meant. Most label models already had a correspondingCreate*Parametermethod. For the remaining models, theGroupNodeLabelModel.createTabParametermethod and theFreeNodeLabelModel.CENTERandFreePortLabelModel.CENTERfields 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.groupNodesmethod now has optional parameters that specify thestyleandtagof the newly created group. -
The static parameter fields of
FreeNodePortLocationModelhave been renamed analogue to the static parameter fields inInteriorNodeLabelModel. -
FilteredGraphWrappernow supports changing the node and edge predicates after creation. -
The
property-changedevent on theUndoEngineclass is now also emitted if the token is changed. -
The new static
ITable.getTablemethod returns theITableinstance of a node if there is one. -
The types of
IModelItem.tagproperties are now easier to customize. See the "Augmenting the tag property" section in the Developer's Guide for more details.
Bug Fixes
-
Fixed
EdgeSegmentLabelModelandSmartEdgeLabelModellabel placement at source and target nodes when using indices less than 0 or greater than the number of bends in the edge. -
The
EdgeSegmentLabelModelclass now calculates valid label locations for selfloop paths with one port at the side of the node. -
The
EdgeSegmentLabelModelclass 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'sparentNodeDetectionnow can useParentNodeDetectionModes.NONEas fallback if no valid parent is found for modesParentNodeDetectionModes.SELECTIONorParentNodeDetectionModes.PREVIOUS_PARENT.
Components
New Features and Improvements
-
ViewportLimiternow also works with isometric projections and offers options to use theCanvasComponent.contentBoundsfor 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.CanvasComponentnow also notifies the viewport limiter when the size of thecontentBoundsor the size of theCanvasComponentchanges. -
Added a
pointer-cancelevent to theCanvasComponent. -
The
SvgExport.exportSvgAsyncmethod now supports an optional render completion callback that can be used to await asynchronous rendering. -
Theming is now specified with CSS variables, such that the look and feel of a
GraphComponentcan now be customized with a few lines of CSS.-
The available values for the
--variable areyfiles-theme-variantroundandsquarewith solid strokes, and the newsquare-roundandsquare-hatchedwith a hatched stroke. - It's now possible to specify an offset for resize handles and the selection indicator rectangle via theming. Setting an offset can prevent such handles from overlapping ports.
-
Consequently, the
Themeclass has been removed.
-
The available values for the
-
The scrollbars of a
CanvasComponentare now easier to style since we improved their CSS rules. For example, the scrollbar size is now determined by the CSS variables--,yfiles-scrollbar-size--, andyfiles-scrollbar-horizontal-size--.yfiles-scrollbar-vertical-size -
GraphComponentnow usesGraphViewerInputModeas the defaultinputModefor basic graph exploration. -
The
ICanvasContext.canvasComponentproperty (and consequentlyIRenderContextandIInputModeContext) is now guaranteed to have a non-nullvalue. -
All predefined
EventRecognizerconstants 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 onCanvasComponentwhich are related to input devices now have the same consistent names. -
The
CanvasComponent.contentRectproperty is now namedcontentBoundsto make its purpose clearer. TheupdateContentRectmethod has been renamed likewise. -
The superfluous
CanvasComponent.setContentRectmethod has been removed in favor of the setter of thecontentBoundsproperty. -
It is now possible to have more than one
BridgeManager. This allows you to have different types of bridges on different types of edges. -
The DOM focus state of the
CanvasComponentmoved from the container element to an inner child of theCanvasComponent. This makes it easier to listen to DOM events in HTML elements that are part of the render tree, e.g. in anHtmlVisualor an overlay panel. -
CanvasComponentconstructor now acceptsHTMLElementas hosting element instead ofHTMLDivElement. This allows initialization of theCanvasComponentin semantic elements and custom elements. -
The
CanvasComponent.focusmethod now has an optional parameter that takes an options object with apreventScrollproperty, similar to theHTMLElement.focusmethod. This replaces theCanvasComponent.preventFocusScrollingproperty.
Bug Fixes
- Fixed an issue where a sequential animation would break when the preferred duration was set to zero.
New Demos
-
New Viewport Limiter demo shows the improved behavior of the
ViewportLimiterclass. - The new timeline demo shows how to implement a timeline component for graphs that change over time.
Rendering
New Features and Improvements
-
The new
ObjectRendererBaseclass allows conveniently implementing theIObjectRendererinterface. -
New classes formalize the data passed as
RenderTagto implementations ofIObjectRenderer.-
The new
PortCandidateRenderTagclass will be passed as render tag for port candidates. -
The new
MarqueeRenderTagclass will be passed as render tag for the marquee rectangle renderer of theMarqueeSelectionInputModeclass. -
The new
LassoPathFinishRegionRenderTagclass will be passed as render tag for the finish region renderer of theLassoSelectionInputModeclass. The newLassoPathStateenum defines the current state of the lasso selection path in this class. -
The new
LabelCandidateRenderTagclass will be passed as render tag to the label candidate renderer of theLabelPositionHandler.
-
The new
-
The new
IObjectRenderer.VOID_OBJECT_RENDERERconstant provides a singleton renderer that renders nothing.
Selection, Focus, Highlight
New Features and Improvements
-
The new
domainproperty on theHighlightIndicatorManagerclass matches thedomainproperty on theSelectionIndicatorManagerclass and allows automatic removal of highlights no longer present in the domain. -
FocusIndicatorManagersupports 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, andCompositePortStyleclasses. -
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, orDelegatingPortStyleclass. -
The new
ShapePortStyleclass displays ports as geometric shapes and supports the same shapes as theShapeNodeStyleclass. -
The
Arrowclass 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.edgePathCropperfor this.
-
There are three new shapes that are similar to what is available in common
drawing apps:
-
The new
PathEdgeStyleBaseclass simplifies using a complexGeneralPathas 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
ShapeNodeStyleclass now supports more shapes, namelyPENTAGON,OCTAGON_STANDING,TRIANGLE_POINTING_LEFT, andTRIANGLE_POINTING_RIGHT. 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
GeneralPathNodeStyleclass. -
The
WebGLShapeNodeStyleandWebGLImageNodeStyleclasses, and the WebGL selection visualization now support triangle shapes pointing down, left, and right as well as a diamond shape. -
The
ImageNodeStyleandIconLabelStyleclasses can now have a background visual. The shape of this background can be one of the values ofShapeNodeShape. -
The new
CssFillclass is a fill that supports CSS color values. -
TextWrappingsupports four new policies for trimming the text without wrapping the line:TRIM_CHARACTER,TRIM_CHARACTER_ELLIPSIS,TRIM_WORD, andTRIM_WORD_ELLIPSIS. The existing policies that allow wrapping lines have been renamed to properly distinguish them from the new ones. In addition, the clipping-only policy previously enabled with theDefaultLabelStyle.clipTextandMarkupLabelStyle.clipTextproperties is now available with theTextWrapping.CLIPvalue, and the defaultwrappingpolicy of these styles is nowTextWrapping.WRAP_WORD_ELLIPSIS. -
Group nodes and nodes with
GroupNodeStylenow 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. -
The
CollapsibleNodeStyleDecoratorclass positions and styles the button now closer to whatGroupNodeStyledoes to achieve a more modern look. -
The new
getLassoTestablemethod of the interfacesINodeStyleRenderer,IEdgeStyleRenderer,ILabelStyleRenderer, andIPortStyleRendereris similar to the existinggetMarqueeTestablemethod, so marquee and lasso selection do no longer differ in the ways the testable is retrieved. -
The
IconLabelStylenow has a default icon size of 24x24 instead of empty, such that the icon is always visible. -
ShapeNodeStylenow 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. -
The fill conversion now prioritizes the new
CssFillclass for input strings. -
The Color class is now a fill and can therefore be used wherever the
SolidColorFillclass was previously used. The latter has therefore been removed. -
CollapsibleNodeStyleDecoratorhas new methods for creating a custom button visualization. - The default line spacing has been reduced to 0.2 to better match the platform defaults.
Bug Fixes
-
The following node styles now consider the pen thickness in the visibility test:
ShapeNodeStyle,ArrowNodeStyle,GeneralPathNodeStyle,GroupNodeStyle, andRectangleNodeStyle. -
For
IconLabelStylethewidthandheightof the rendered icon are no longer swapped. -
When the label text is rendered using the
TextRenderSupport.addTextmethod and wrapping is word-ellipsis or character-ellipsis, an ellipsis character is now always added when necessary. -
The
TextRenderSupport.addTextmethod now uses the correct line spacing when a shape is specified. - Resolved an issue where resize handles were not updating when group nodes were expanded or collapsed.
-
Nodes rendered with
ArrowNodeStylethat are filled with a gradient do not rotate the fill along with the arrow, anymore.
New Demos
- The new Shape Port Style demo shows this new style.
- The new Arrow demo shows the new visualization options for arrows.
- The new General Path Node Style demo shows how to create stars, polygons, and other shapes with this style.
WebGL
New Features and Improvements
-
The new
WebGLArrowType.CROP_AT_PORTenum value enables cropping similar to the newIArrow.cropAtPortproperty. -
The
WebGLLabelStyleandWebGLIconLabelStyleclasses now support different paddings per direction. -
The automatic conversion of
LabelStyletoWebGLLabelStylenow considers the minimumLabelStyle.padding(if uniform padding is not set) to prevent text misplacement or disappearance. -
WebGL styles can now be set directly via the
IGraph. - Decorator styles for WebGL and SVG rendering simplify style handling on rendering type switch.
- Automatic conversion for WebGL styles in SVG rendering mode.
Bug Fixes
-
Fixed an issue where instantiating animations via
WebGLGraphModelManager.createBeaconAnimation(and all other animation creating functions) would throw an exception when the timing parameter was not provided. -
WebGLLabelStylenow avoids unnecessary text wrapping for labels with large padding when there is sufficient space to place the text. - Bend handles are now always displayed correctly when rendering with WebGL.
- Ports are now correctly positioned when they lie slightly outside the node.
Interaction
New Features and Improvements
-
Marquee and lasso selection have been enhanced to support multiple selection
policies. While the default gestures replaces the selection, pressing the
Ctrl,Shift, orAltmodifier during the gestures extends, subtracts or toggles the current selection with the elements in the marquee or lasse area. -
The
IHitTesterinterface has been changed to support faster hit testing. The generic type has been removed. Instead, aGraphItemTypesparameter has been added that is used to reduce hit tests to the specified item types. -
The new
pointer-long-pressevent is available for all pointer input types and replaces the previous touch-specific long press API. -
The new
pointer-long-restevent is raised when the pointer stays still for a configurable amount of time during a move or drag gesture. -
All events of an
IInputModewhich report creation of, changes to, or deletion of model items now have arguments of typeInputModeItemEventArgsorInputModeItemChangedEventArgs. This type provides the affected item and theIInputModeContextfor 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
Altkey can now be pressed instead of theCtrlkey. -
When resizing a node using its reshape handles, the
Ctrlkey instead of theAltkey can be pressed to keep the center of the reshaped node. -
To reparent a node to another parent during a drag gesture, the
Ctrlkey has to be pressed instead of theShiftkey.
-
To temporarily disable snapping during edge creation, moving, or resizing items,
the
-
Moving items interactively now supports constraining the move gesture to an
octilinear direction. This constraint is used when pressing the
Shiftkey while dragging the items. -
The new
GraphEditorInputMode.creationSelectableItemsproperty allows you to specifyGraphItemTypeswhich should be selected after creation. -
The new
CreateEdgeInputMode.edge-direction-reversedevent and the newCreateEdgeInputMode.onEdgeDirectionReversedmethod are triggered when the direction of the edge creation changed during edge creation. -
The new
HandleType.VOIDenum value makes a handle invisible and excludes it from hit testing. - Reconnecting edges to other nodes is now allowed per default.
- Elements can now be moved without selecting them first.
-
The new
CreateEdgeInputMode.minimumSelfLoopBendCountproperty allows for specifying the number of bends an edge must at least have before it can be created as selfloop. -
The new
CreateEdgeInputMode.showStartPortCandidateDelayproperty 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.movableUnselectedItemsproperty allows for defining items which can be moved without selecting them first. ThemovableUnselectedItemsPredicateproperty can be used for closer specification. -
Edge creation now supports constraining the current edge segment to use an
octilinear direction. This constraint is used when pressing the
Shiftkey while dragging the pointer. -
The new
GraphEditorInputMode.setNodeLocationmethod uses theIPositionHandlerof 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. -
The
CanvasComponent's event system is now based on thePointerEventAPI 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
MoveInputModeclass now also handles moving labels, thus theMoveLabelInputModehas been removed. -
The event
items-copiedonGraphViewerInputModeand the eventsitems-copied,items-cut,items-pasted,items-duplicated, anddeleted-selectiononGraphEditorInputModenow useItemsEventArgsproviding the items that are the subjects of the events. -
When editing label text, users can now enter newlines with
Shift+Enterin addition toCtrl+Enter/Command+Enter. -
The
CanvasComponentnow listens to nativePointerEventsto handle mouse, touch, and stylus input. -
The new
ctrlKey,shiftKey,altKey, andmetaKeyboolean properties ofPointerEventArgsandClickEventArgsspecify which modify keys were pressed during the event. -
The order of the two parameters of the
EventRecognizerfunction has been reversed: Theeventis now the first one, and the rarely usedsenderthe last one. -
A fully customizable context menu is now included. You have complete control over
the menu elements and can customize all UI elements to your liking. Of course, it's
also still possible to use the context menu of your favorite UI framework. In
addition, the API of the
ContextMenuInputModehas been improved and its event handling was simplified. -
The rendering order of visuals created by an
inputModenow 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
GraphInputMode.findItemsmethod now considers the actual z-order of the hit items. -
The
GraphInputMode.item-clickedevent 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. -
MoveViewportInputModenow gracefully handles concurrent programmatic viewport modifications. -
The modifier for using the
ILabelModelParameterFinderduring label movement can now be changed with theLabelPositionHandler.useParameterFinderRecognizerproperty. -
The
ClickInputMode.clickedevent is now raised also for double-clicks and multi-clicks. Clicking multiple times in the same location increments theClickEventArgs.clickCountby one for each click. -
The
MoveInputModeandmoveUnselectedInputModeproperties ofGraphEditorInputModehave been renamed tomoveSelectedItemsInputModeandmoveUnselectedItemsInputModeto better describe what they are used for. Associated properties and methods have been renamed accordingly. - 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.
-
Toggling the item selection via
Ctrl+Spacenow prefers toggling the selection state ofGraphComponent.currentItemover deselecting a single selected item. -
The
IInputModeAPI has been updated for clarity: theinputModeproperty has been removed from the interface. Instead, most implementations now offer the protectedparentInputModeContextproperty 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 protectedcreateInputModeContextmethod. The created context has the input mode set as the parent input mode. The newInputModeContextclass 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 theCtrlorSpacekey. -
The new
Command.ZOOM_TO_SELECTIONzooms to the bounding box around all selected items. It can be triggered by the keyboard short cutAlt+2. - Edge creation can now be cancelled by ending the gesture over the source node.
-
Edge creation is canceled if the
GraphComponentloses the focus. -
GraphViewerInputMode's andGraphEditorInputMode'sclickHitTestOrdernow reflects the z-Order of the elements. By enablingskipHitLabels(the default) elements behind labels can still be prioritized over the labels. -
Several default keyboard shortcuts have been adjusted to more widely used ones:
Ctrl+0orAlt+0sets the zoom to 100%.Alt+1fits the content in the view.Alt+2brings the selection into the view.Alt+3brings the current item into the view.Ctrl+Plusincreases the zoom value.Ctrl+Minusdecreases the zoom value.Alt+Leftcollapses a selected group node.Alt+Rightexpands a selected folder node.Alt+Upexits the current folder node.Alt+Downenters the current folder node.-
Alt+Shift+LeftorAlt+Shift+Righttoggles the expansion state of a selected group or folder node.
-
GraphEditorInputModenow allows for starting label editing just by starting to type. TheallowEditLabelOnTypingproperty 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
HandleTypesenums has been refactored to a non-flaggableHandleTypeenum, and the values have been adjusted to those used in the library as well as some custom variants for individual use. -
Custom
IHandleimplementations can use the newIHandle.tagproperty for various purposes, including custom handle visualizations. yFiles does not use the property and initializes it withnull, but decorating handles forwards any values unmodified. -
OverviewInputModenow uses theCanvasComponent'smouseWheelZoomEventRecognizerto determine if the used performed a zoom gesture. - Dragging a selected edge doesn't move all its bends anymore which often screwed up the first and last edge segment.
-
If a
Wheelevent is handled by code, the default behavior (zoom/scroll) will be cancelled. -
Command handling has been improved: The previous
ICommand, inspired by WPF's commands, has been replaced with an enumeration of primary input gestures calledCommand.GraphComponentnow manages the execution of commands:-
GraphComponent.executeCommandruns the specified command with an optional parameter. -
GraphComponent.canExecuteCommandindicates whether the specified command can be executed. -
The
CanExecuteCommandChangedevent is triggered when the executable state of a command has changed.
-
-
The
MouseHoverInputModehas been renamed toToolTipInputModeto better reflect its function. -
The
handleIsHitandgetClosestHitHandlemethods ofHandleInputModenow have an additional parameter which specifies thePointerTypeof the related user gesture. -
The
GraphEditorInputMode.orthogonalEdgeEditingContextproperty is now set and enabled per default and may not benullanymore. Edges can be individually configured to be edited orthogonally by providing an apropriateIOrthogonalEdgeHelperin their lookup.-
For edges using a
PolylineEdgeStyle, the style's neworthogonalEditingproperty can be set so such a helper is automatically provided. -
To disable orthogonal editing for all edges, the
enabledproperty of theOrthogonalEdgeEditingContextcan be set to false. -
To enable orthogonal edge editing for all edges that don't explicitly forbid
this, the
OrthogonalEdgeEditingContext.fallbackEdgeHelperProviderproperty can be set to a helper supporting orthogonal edge editing.
-
For edges using a
-
NavigationInputModenow interprets the direction of arrow keys in view coordinates by default. Previously the default settings could lead to surprising behavior when combined with aprojectiononGraphComponent. - Improved keyboard navigation for graph items.
-
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. -
LabelDropInputModenow consults theIEditLabelHelperof possible drop targets when dragging and dropping labels. -
New overloads of the
CreateEdgeInputMode.startEdgeCreationmethod can be used to start interactive edge creation from a node or port, respectively. -
The parent node detection of
GraphClipboardhas been streamlined. -
The new
GraphViewerInputMode.hitTesterproperty works in the same way as theGraphEditorInputMode.hitTesterproperty. -
The
GraphEditorInputMode.duplicateSelectionmethod now also dispatchesmulti-selection-startedandmulti-selection-finishedevents. -
The items reported by the
HandleInputMode.affectedItemsproperty now include edges that were modified with the height handle ofBezierEdgeStyleandArcEdgeStyle. -
The static member
GraphClipboard.DEFAULT_GRAPH_CLIPBOARDhas been added and is used per default asGraphComponent.clipboard. This way copy&paste operations work between multipleGraphComponentinstances without the need to set a sharedGraphClipboardinstance first. -
The sub-input modes of
GraphViewerInputModeandGraphEditorInputModecan now be replaced while the input mode is installed. - It is now possible to declare different sets of keyboard shortcuts as well as localizations for string constants depending on the language the user has enabled in their user agent.
-
The
Cursorconstructor now allows the specification of the hot-spot. - Cursors for resize handles now show double-headed arrows on all devices.
-
NodeDropInputMode,LabelDropInputMode,StripeDropInputMode, andPortDropInputModenow provide a staticDEFAULT_TRANSFER_TYPEproperty which represents the transfer type to which the respective input mode is configured by default. - Setting the tooltip content or custom components as tooltips has been streamlined.
Bug Fixes
-
GraphInputMode.findItemsmethod: when the filter includes both edges and bends, the edge will no longer be ignored if any of its bends are hit. -
GraphInputMode.findItemsmethod: when usingGraphItemTypes.ALL, bends will not be ignored. Furthermore, the interfacesIBendSelectionTesterandIPortSelectionTesterare properly queried. -
GraphInputMode.findItemsmethod: Ports with a style are no longer reported twice. -
When moving the viewport in a
GraphComponentthat has a projection, the inertia now works in the right direction. -
Fixed that the
onMarqueeSelectandonLassoSelectmethods ofGraphEditorInputModeandGraphViewerInputModewere called with a wrong input mode context. - Fixed occasionally missing auto-scrolling on viewport bounds for touch devices.
-
The
GraphInputMode.findItemsoverload without thecontextparameter did not find items correctly. - Fixed an issue where keyboard navigation would stop working when two items were positioned at the same location.
- Offset rectangle handles were hard to hit with a custom theme scale and now properly consider theme scaling and custom offsets.
- Fixed label edit boxes having no width/height if editing started outside of the viewport.
New Demos
- the new Mouse Wheel Customization demo shows how to customize and enhance the default mouse wheel behavior.
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,AddLabelandEditLabel, remain accessible throughGraphEditorInputMode. - The text editor will now stay open by default if label text validation fails.
-
Each
ILabelandILabelOwnernow includes a default implementation ofIEditLabelHelperin itsLookup. TheIEditLabelHelperinterface 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 methodsAddLabelandEditLabel. Label editing is now handled throughGraphEditorInputMode'sEditLabelInputMode. - The label text editor element now takes the on-screen keyboard into account when it scrolls into the visible part of the view, so that it is actually always visible.
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, andSnapSizeinstances are created and are available for theSnapResultproviders. -
Label snapping is now also handled by the
GraphSnapContext, so theLabelSnapContexthas been removed. Configuration options have been moved fromLabelSnapContexttoGraphSnapContext. -
Additional improvements:
-
The new
GraphSnapContext.affectedItemsproperty provides the items for whichSnapResultshall be collected. -
The configuration options of
GraphSnapContextare now easier to use and more concise. -
The new protected methods
collectGridSnapReferencesandcollectSameSizeSnapReferencesofGraphSnapContextcan be overridden to customize theSnapGridandSnapSizeinstances items can snap to. -
The new
SnapReferenceclass is now the base class ofSnapLine, and the newSnapGrid,SnapSize, andSnapCircleclasses. The newSnapReference.snappableItemsproperty describes which item types may snap to this reference. - Snap references of all types can be styled with CSS classes.
-
The new
OrthogonalSnapLine.croppableproperty is used to decide which snap lines to crop ifGraphSnapContext.cropSnapLinesistrue. -
The new properties
reference,item, anditemAnchorof theSnapResultclass can be used by theIObjectRendererfor the visualization of theSnapResult. -
New methods of
ReshapeRectangleContextsimplify the calculation of the bounds for a specified pointer delta or theSnapConstraintnecessary to result in a specified width, height or side location.
-
The new
Clipboard
New Features and Improvements
-
Members of
GraphClipboardandGraphEditorInputModewithelementin their name that actually referred to model items were renamed toitemto clarify their usage. -
The
GraphClipboard.pastemethod now accepts an optionalpasteLocationparameter specifying the center of the bounds of the pasted items. -
The events on
GraphClipboardnow useGraphClipboardEventArgsthat provide the currentIGraphClipboardContextand theitems. -
IClipboardHelpernow has methods to supportDuplicate, too:shouldDuplicateandonDuplicated. -
GraphClipboard'sCut,Copy,Paste, andDuplicatemethods now use anIEnumerableto determine the subgraph to copy. -
GraphClipboardnow uses an optimizedClipboardGraphCopierfor its clipboard operations instead of the generalGraphCopier.
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,
updateGroupNodeStateandupdateMasterEdges, have been added toIFolderNodeConverterandIFoldingEdgeConverter, 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
GraphClipboardif 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
FolderNodeConverterif labels are copied between master and view node.
View-Layout-Bridge
New Features and Improvements
-
LayoutExecutorcan 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, andCompositePortLocationModelPortSideof this candidate can be specified when adding the parameter to the model. -
The new
LayoutExecutorAsync.createWebWorkerMessageHandlerandLayoutExecutorAsyncWorker.initializeWebWorkermethods simplify the default setup for layouts running in a web worker. -
The
LayoutExecutor.tableLayoutConfiguratorfeature now uses more flexible placements for nodes that don't belong to any table node.
Bug Fixes
-
Exceptions thrown by
IGraph.applyLayoutare now properly re-thrown (instead of causing an unhandled promise rejection) and can be caught by a catch block.
Layout
New Features and Improvements
-
LayoutPortCandidates now have amatchingId. When finding matchingLayoutPortCandidates at nodes and for edges, twoLayoutPortCandidates can only match if theirmatchingIdproperties are equal. -
The
LayoutAnchoringStageclass (previously calledFixNodeLayoutStage) now allows using not only nodes but also edges and labels to anchor the graph's position.-
The new
nodeAnchoringPolicies,edgeAnchoringPolicies,nodeLabelAnchoringPoliciesandedgeLabelAnchoringPoliciesproperties specify which part of the items should be used to calculate the anchor point. -
The new
LayoutExecutor.anchoredItemsproperty specifies the graph items used to anchor the graph's position.
-
The new
-
The
ComponentLayouthas now the ability to specify which layout to apply to individual components usingComponentLayoutData.componentLayoutsproperty. 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.layoutGridproperty. This way it is no more required to set the global layout grid with theLayoutGridData.gridproperty. If a node is to be placed in a grid but not in a specific cell, this can now be achieved using the newLayoutGrid.createDynamicCellDescriptormethod. Be aware that many layout algorithms likeHierarchicalLayoutdon't support multiple layout grids. -
The
LayoutDataclasses are now generic and can be used for items of aLayoutGraph, too. Of course, it's still possible to useLayoutDatawithIGraphitems.-
LayoutDatainstances when used withIGraphtypically needINode,IEdge,ILabel, andILabelas their type arguments. -
LayoutDatainstances when used withLayoutGraphtypically need Node, Edge,LayoutNodeLabel, andLayoutEdgeLabelas their type arguments. -
Instances of
LayoutDataclasses 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
LayoutGraphclass has received a major rework. TheLayoutGraphis the only remaining graph implementation for the layout analysis part. ClassesGraph(previously used for graph analysis, only) andCopiedLayoutGraphhave been removed and functionality was moved toLayoutGraph.-
The API has been made
more similar to the API of the
IGraphwith respect to creation, modification and access to nodes, edges and labels. -
Low-level data types like
NodeListandEdgeListhave been removed as well as cursor for iteration over the elements. -
Properties
nodeCountandedgeCounthave been removed. Query the size of thenodesandedgesproperties 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, seeLayoutNode.layoutproperty. -
The edge path information is no defined by properties on the edge, most
importantly these are
sourcePortLocation,targetPortLocationandbends. -
Labels of nodes and edges are now accessed via a property on the respective
owning item. To add labels, use
LayoutGraph.addLabelmethod. The complicatedILabelLayoutFactorythat 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
LayoutGraphHiderclass. -
The
Graph.containsEdgemethod has been removed in favor ofLayoutGraph.getEdgesBetween. The same holds for theNode.getEdgeToandNode.getEdgeFrommethods. -
Convenience properties like
Node.neighborshave been removed. Instead, query all edges (using the Edges property) and filter the required adjacent nodes manually. -
To copy a
LayoutGraphinstance, the newLayoutGraph.createCopymethod has been added. -
If a
LayoutGraphwithout coordinate/path information is needed (to optimize memory performance), it can be created using the factoryLayoutGraph.createStructureGraphmethod.
-
The API has been made
more similar to the API of the
-
The new
LayoutGraph.getEdgesBetweenmethod returns all edges between two nodes. -
The
PortPlacementStagenow 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
PortPlacementStagenow correctly considers port candidates together with port groups.
Hierarchical Layout
New Features and Improvements
-
The
HierarchicalLayoutclass now supports defining minimum distances between the ports. They can be specified per node side using theHierarchicalLayoutNodeDescriptor.minimumPortDistanceproperty. 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.sourcePortAlignmentIdsandPortData.targetPortAlignmentIdsaccessible viaHierarchicalLayoutData.ports. -
The
HierarchicalLayoutnow produces fewer bends for multi-edges with labels when integrated edge labeling is enabled. -
The
HierarchicalLayoutclass 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
HierarchicalLayoutno 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
HierarchicalLayoutnow enforces a more symmetric placement of the nodes that are part of chains or height-2 trees.
Bug Fixes
-
The
HierarchicalLayoutnow 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 theLayoutGraphinstance when running the layout algorithm directly on the graph instance without using a copy. -
The
HierarchicalLayoutclass no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints. -
The
HierarchicalLayoutclass 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
HierarchicalLayoutclass no longer produces very long edge segments for some input graphs containing groups with node halos and polyline edge routing. -
The
HierarchicalLayoutclass 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
HierarchicalLayoutclass no longer produces intertwined edge routes with many superfluous crossings and bends for some cases with sequence constraintsPlaceAtHeadorPlaceAtTail. The problem mainly occurred with graphs with groups orPartitionGridand incompatible sequence constraints.
New Demos
-
There is a new demo showing how to implement
sourcePortAlignmentandtargetPortAlignmentin hierarchical layout. -
There is a new demo showing how to use the
HierarchicalLayoutData.incrementalNodesproperty to incrementally lay out the newly loaded nodes in a nested graph.
Tree Layout
New Features and Improvements
-
Added the new
TreeLayout.fromSketchModeproperty to consider the initial coordinates of the graph elements. This has an effect only if the used subtree placers implementIFromSketchSubtreePlacer. -
Added the
TreeLayoutData.multiParentDescriptorsproperty that allows to specify style information for multi-parent structures. -
The
TreeReductionStageDataclass now offersnonTreeEdgesResultproperty. It allows to conveniently query the set of edges that the stage actually selected as non-tree edges. -
The
TreeLayoutnow considers minimum last segment lengths no matter on which side the port shall be placed. -
The
LeftRightSubtreePlacernow supports minimum segment length, which can be set with the propertiesminimumFirstSegmentLengthandminimumLastSegmentLength. -
All subtree placers that used
RootNodeAlignmentsupport placing the subtree root centered above the ports with the new valueCENTER_OF_PORTS. -
The
SingleLayerSubtreePlacersupports placing the subtree root centered with respect to the ports at its children with the new enum valueSingleLayerSubtreePlacerRootAlignment.CENTER_OF_PORTS. -
The
AspectRatioSubtreePlacernow supports minimum first and last segment lengths. -
The
AspectRatioSubtreePlacernow supports multiple variants how to place the root node with respect to its children, which can be set using the propertieschildArrangementandrootPlacement. -
Added properties of
TreeReductionStageDatadirectly to theLayoutDataof tree layouts, includingRadialLayoutData,AspectRatioTreeLayoutData,RadialTreeLayoutData, andTreeLayoutData.
Bug Fixes
-
The
AspectRatioSubtreePlacerclass no longer ignores the specifiedAspectRatioSubtreePlacer.childAlignmentPolicyfor 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.qualityTimeRatioproperty allows controlling the layout quality by automatically enabling/disabling additional optimization steps. -
The
OrthogonalLayoutalgorithm 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.edgeOrientationproperty.
Edge Router
New Features and Improvements
- The quality of edge routing for buses is improved.
-
If
EdgeRouteris 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
EdgeRouterclass 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.
Organic Layout
New Features and Improvements
-
The performance for the
OrganicLayouthas 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
OrganicLayoutnow supports different styles for group substructures, which are set via theGroupSubstructureStyleproperty.
Bug Fixes
- Fixed an issue that may have automatically disabled the component layout when using constraint-based features.
Interactive Organic Layout
Demo Improvements
-
The Interactive Organic Layout demo now shows how to run the
InteractiveOrganicLayoutin a web worker thread.
Radial Tree Layout
New Features and Improvements
-
Added data key
OUT_EDGE_COMPARATOR_DATA_KEYtoRadialTreeLayoutclass (formerlyBalloonLayout).
Partial Layout
New Features and Improvements
-
PartialLayoutnow supports specifying inversely directed edges in addition to undirected and directed edges.
Component Layout
New Features and Improvements
-
ComponentLayoutnow supportsnodeMargins(formerlynodeHalos) for eachComponentArrangementStyleother thanNONEandKEEP_CENTERS.
Algorithms
New Features and Improvements
-
The
LongestPathalgorithm now uses double values instead of integers for edge traversal costs. This improves thePaths,LayoutGraphAlgorithms, andLongestPathclasses. -
The
LayoutGraphAlgorithms.findCycleEdgesmethod 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.
Analysis
New Features and Improvements
-
The
KShortestPathsclass 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 thesimplePathsparameter. -
For usage with a
LayoutGraph, the algorithm is also available via theLayoutGraphAlgorithms.kShortestPathsmethod.
Collections
New Features and Improvements
-
The
IEnumerable.ofTypemethod now supports primitive types as element types. -
The
IEnumerable.filtermethod now has two new overloads with type guards.
Geometry
New Features and Improvements
-
The new
GeneralPath.areaOrPathContainsmethod tests if the path fuzzily contains a point and can be used for hit-testing aGeneralPath. -
All methods on the
GeneralPathclass now consistently acceptIPointinstead ofPointandIRectangleinstead ofRect. -
There are now methods on
RectandPointto calculate the distance between points and rectangles. -
The
GeneralPath.getProjectionmethod is now faster for paths with Bezier segments. -
The
IRectangleinterface 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 itstopLeftmethod. Similarly,IMutableRectangleno longer implementsIMutablePoint.
Incompatible Changes
Categories: General Graph Components Rendering Selection, Focus, Highlight Styles WebGL 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 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
Defaultprefix from the names of the following types:DefaultEdgePathCropper,DefaultFoldingEdgeConverter,DefaultFolderNodeConverter,DefaultLabelStyle,ObservableCollection,DefaultPortCandidate, andDefaultSelectionModel. - Removed
DefaultLabelModelParameterFinder. - Removed
DefaultBendCreator. -
Removed the
Defaultprefix from the names of the following types:Graph,WebGL2DefaultLabelStyle. -
Consistently use names
PaddingandMarginsin member names:-
Renamed the
TextEditorInputMode.textBoxPaddingproperty totextBoxMargins. -
Renamed the
IndicatorLabelStyleDecorator.paddingproperty tomargins. -
Renamed the
IndicatorNodeStyleDecorator.paddingproperty tomargins. -
Renamed the
GraphEditorInputMode.contentRectMarginsproperty tocontentMargins. -
Renamed the
OverviewInputMode.marginsproperty tocontentMargins. -
Renamed the
ViewportAnimation.targetBoundsproperty totarget. -
Renamed the
ViewportAnimation.targetViewMarginsproperty totargetMargins. -
Renamed the
StripeControl.Insetsproperty toTotalPadding. -
Renamed the
StripeLabelModel.useActualInsetsproperty touseTotalPadding. -
Renamed the
StretchStripeLabelModel.useActualInsetsproperty touseTotalPadding. -
Renamed the
IStripe.actualInsetsmethod tototalPadding. -
Renamed the
GroupNodeStyle.contentAreaInsetsproperty tocontentAreaPadding. -
Renamed
Insetsproperties of allILabelModelimplementations tomargins. -
Replace name part
Insetsof other types and members with {}Padding{}.
-
Renamed the
-
Removed the
BridgeManager.clipMarginproperty. -
Enum values that followed the
NORTH,EAST,SOUTH,WESTnaming convention have been renamed to follow aTop,Right,Bottom,Leftnaming convention. In particular, the values of the following enums have been renamed:HandlePositions,EdgeSegmentDirection,ExteriorLabelModelPosition,InteriorLabelModelPosition,InteriorStretchLabelModelPosition,StretchStripeLabelModelPosition, andStripeLabelModelPosition,. -
Renamed the
CompositePortLocationModelPortSideenum toPortSides. -
The yFiles npm package is now named
@yfiles/yfiles. This makes it easier to serve yFiles from a local registry by associating the @yfiles scope with it. -
The
Enumstatic helper methods have been removed. Instead, each yFiles enum has a newmethod that can be used to retrieve the name of an enum value.getName(value): string -
Removed obsolete browser-specific workarounds:
- Cr320635, Cr433873, Cr701075.
- Edge2057021.
- Ie14492280, Ie205775, Ie233711, Ie2337112, Ie7766782, Ie964525.
- Wk203237.
-
Renamed all members containing
ComparisonorComparertoComparator. -
The static
isInstancemethod of each type was removed. Useinstanceofinstead. This change can be done by the migration tool. - The library now only comes in a variant that uses JS modules, and the UMD variant has been removed. Nowadays, almost all tools work with JS modules, and you can use a bundler like Rollup if you need the library in a different format.
- The TypeScript types for very old versions of TypeScript have been removed. The oldest supported TypeScript version is now 5.0.
-
APIs that used
Classnow use the<T>Ttype directly instead. This usually means that instead of, you can now useSomeClass.$classSomeClassinstead. -
Renamed the
CreateEdgeInputMode.allowSelfloopsproperty toallowSelfLoops. -
Renamed the
GraphEditorInputMode.selectNodeAndSelfloopBendsmethod toselectNodeAndSelfLoopBends. -
Renamed the
GraphEditorInputMode.autoSelectSelfloopBendsproperty toautoSelectSelfLoopBends. -
Renamed the
IEdge.isSelfloopmethod toIEdge.isSelfLoop.
Graph
Incompatible API Changes
-
The
ILookupinterface and its extension methods have been moved to theyWorks.Utilsnamespace. -
The
IMapperinterface, the Mappers,Mapper, andWeakDictionaryMapperclasses have been moved to theyWorks.Utilsnamespace. -
The
SegmentRatioPortLocationModelclass is now namedEdgeSegmentPortLocationModel, similar toEdgeSegmentLabelModel. -
The
createFromSourceandcreateFromTargetmethods of theSegmentRatioPortLocationModelandBendAnchoredPortLocationModelare now namedcreateParameterFromSourceandcreateParameterFromTarget. -
Removed the
TableAnimationclass. Use the factoryIAnimation.createTableAnimationmethod as a replacement. -
GenericPortLocationModelhas been renamed toCompositePortLocationModeland doesn't implementIEnumerableanymore. Instead, theparametersproperty can be used to iterate the parameter. -
The
FreeEdgeLabelModel.createEdgeAnchoredmethod has been renamed toCreateParameter. -
The
FreeNodeLabelModel.createDefaultParametermethod has been removed and replaced by the newFreeNodeLabelModel.CENTERfield. -
The
FreeNodeLabelModel.createCanonicalParametermethod has been renamed toCreateParameter. -
The
FreePortLabelModel.createDefaultParametermethod has been removed and replaced by the newFreePortLabelModel.CENTERfield. -
The label models
ExteriorLabelModel,InteriorLabelModel, andInteriorStretchLabelModelhave been renamed toExteriorNodeLabelModel,InteriorNodeLabelModel, andStretchNodeLabelModel, respectively,. -
The
GenericLabelModelclass has been removed. Its functionality has been integrated into theCompositeLabelModel, which can be used instead. -
The
CompositeLabelModel.labelModelsproperty has been removed. Instead of adding label models to this list, the newaddModelmethod has to be called. -
The static
deserializeParameterandserializeParametermethods of theILabelModelParameterandIPortLocationModelParameterclasses have been removed. These methods 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 of theILabelModelParameterFinder.findBestParameterandILabelModelParameterProvider.getParametersmethods has been removed. -
The classes
DelegateUndoUnitandCompositeUndoUnithave been removed. The new factory methodsIUndoUnit.fromHandlerandIUndoUnit.combinecan be used instead. -
The
UndoUnitBaseclass has been removed. Subclasses now have to implement theIUndoUnitinterface instead. -
The
ownerparameter of theITable.createRow,CreateColumn, andsetParentmethods has been renamed toparent. -
Changes to the
GraphCopierclass:-
The methods
copyNodeStyle,copyEdgeStyle,copyPortStyle,copyLabelStyle,getOrCreateCopy,copyLabelLayoutParameter, andcopyPortLocationParameterhave been made protected. -
The methods
copyChildNode,copyGroupNode, andcopyEdgehave been renamed toCreateNode,createGroupNode, andcreateEdgeto clarify their role. -
The
cloneproperty has been renamed toCloneTypes. -
The
Copymethod now uses anIEnumerableof items instead of a filter predicate to define the subset to copy.
-
The methods
-
The
ILabelModel.createDefaultParametermethod has been removed. Instead suitable other Create*Parameter methods of the concrete label model implementations should be used. -
The
IPortLocationModelParameter.supportsmethod has been removed. Instead, theIPortLocationModel.getLocationmethod may now throw an exception if the port and port location model parameter don't match. -
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 withhasOwnerorhasSourceAndTargetPortfirst before accessing these properties. -
IEdge'ssourceNodeandtargetNodemethods 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
ILabelModelParameter.supportsmethod has been removed. Instead, theILabelModel.getGeometrymethod may now throw an exception if the label and label model parameter don't match. -
The
GraphItemTypes.enumerableNotContainsTypesmethod was removed, use theincludesmethod instead. -
Method
GroupingSupport.getPathToRoothas been renamed togetAncestorsand returns anIReadOnlyListinstead of anIList. -
The static parameter fields of
FreeNodePortLocationModelhave been renamed analogue to the static parameter fields inInteriorNodeLabelModel. -
The
GraphClipboard.isDummymethod has been renamed toisHelper. -
The
UndoEngine.tokenproperty replaces theUndoEngine.getTokenmethod. -
The
IMapperRegistryinterface, theMapperRegistryclass, and theIGraph.mapperRegistryproperty 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, useLayoutDatainstead.
Incompatible Behavior Changes
-
The rotation direction of
OrientedRectangle,LayoutNodeLabel,LayoutEdgeLabelandFreeEdgeLabelModelis now clockwise to be consistent with the other models. -
The
EdgeSegmentPortLocationModel.createParameterFromTargetmethod now interprets the parameter ratio from the target to the source side. -
The arrow of the default edge style is now
ArrowType.TRIANGLE. -
The default edge label model parameter is now created from an
EdgeSegmentLabelModelusing itscreateParameterFromCentermethod instead ofcreateParameterFromSource. -
The default value for the
paddingproperties ofExteriorNodeLabelModel,InteriorNodeLabelModel,StretchNodeLabelModel, andStretchStripeLabelModelhave 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
distanceproperties of theEdgePathLabelModelandEdgeSegmentLabelModelwhen 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 anedgeSideother thanON_EDGEis used. -
The default lookup for
INodedoesn't return anIMutableRectangleanymore, the default lookup forIBenddoesn't return anIMutablePointanymore, and the default lookup forILabeldoesn't return anIMutableSizeanymore. -
SegmentRatioPortLocationModelnow uses the path geometry from the edge's style instead of bend locations to determine segments.
Components
Incompatible API Changes
-
GridVisualCreatorhas been renamed toGridRenderer. -
Renamed the coordinate transformation methods to also include the source coordinate
system in their names:
-
Renamed
CanvasComponent.toViewCoordinatestoworldToViewCoordinates. -
Renamed
CanvasComponent.toWorldCoordinatestoviewToWorldCoordinates. -
Renamed
IRenderContext.toViewCoordinatestoworldToViewCoordinates.
-
Renamed
-
The default
inputModeinGraphComponentis no longernullbut is now set toGraphViewerInputMode. -
Renamed
HighlightIndicatorManager.selectionModeltoitems. -
Renamed
SelectionIndicatorManager.selectionModeltoitems. -
Renamed
SelectionIndicatorManager.modeltodomain. -
Renamed commands
MOVE_FOCUS_BACKandMOVE_FOCUS_FORWARDtoMOVE_FOCUS_LEFTandMOVE_FOCUS_RIGHT. -
Removed the
animateScrollCommandsproperty andCanvasControl.AnimateScrollCommandsPropertyfield. ChangeanimatedViewportChangesproperty instead. -
Renamed the
CanvasComponent.autoDragproperty toAutoScrollOnBounds. -
Renamed the
CanvasComponent.autoDragInsetsproperty toautoScrollPadding. -
Renamed the
ViewportChanges.AUTO_DRAGfield toAutoScrollOnBounds. -
Removed the
dragSize,dragTimeanddoubleClickSizeproperties of theCanvasComponentclass. -
The predefined
EventRecognizerconstants of theMouseEventRecognizers,KeyEventRecognizers, andTouchEventRecognizersclasses have been moved to theEventRecognizersclass. In addition, some rarely used constants have been removed. -
The events on
CanvasComponentwhich are related to input devices and the correspondingEventRecognizerconstants have neem renamed to conform to platform conventions. -
The new
CanvasComponent.renderTreeproperty now encapsulates all low-level render object related API which was previously available directly onCanvasComponent.-
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 toRenderTreeas 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 (
-
The superfluous
CanvasComponent.setContentRectmethod has been removed in favor of the setter of thecontentBoundsproperty. -
The
GraphModelManagerconstructor no longer hascanvasControlandcontentGroupparameters. Also, thecontentGroupproperty can no longer be set directly. Instead, theinstallmethod now sets bothCanvasComponentandcontentGroup. -
Renamed
Canvasword components in properties and method parameter names toCanvasComponent. -
ViewportLimiter.limitViewportnow uses a signature that works with the new typeViewportDescriptorand respects the newViewportLimitingModeenum. -
ViewportLimiter.honorBothDimensionsis now calledViewportLimiter.strictBoundsContainmentand the default value changed to false. -
The
ICanvasObject.groupproperty has been renamed toparent. -
Due to the switch to pointer events and the unification of code, some gestures may
now start or end on an
upevent instead of adownevent or vice versa. -
The
CanvasComponent.resourcesproperty has been removed since everything can now be customized in other ways, in particular with CSS classes. -
The names of
CanvasComponent's coordinate transformation methods now also include the source coordinate system:toPageFromViewis nowviewToPageCoordinates,toViewFromPageispageToViewCoordinates, andtoWorldFromPageispageToWorldCoordinates. -
The DOM focus state of the
CanvasComponentmoved from the container element to an inner child of theCanvasComponent. Therefore, 'blur' listeners onCanvasControl.div(nowCanvasComponent.htmlElement) do not trigger anymore. Instead, use thefocusoutevent onCanvasComponent.htmlElement. -
The
Color.fromArgbmethod has been removed. Use theColorconstructor or theColor.fromRGBAmethod instead. -
The events
GraphComponent.graph-changed,CanvasComponent.content-margins-changed,CanvasComponent.input-mode-changed, andCanvasComponent.input-mode-context-changedhave been removed. -
The order of the arguments of the methods
CanvasComponent.zoomToandCanvasComponent.zoomToAnimatedhas changed. -
The
HTMLCanvasVisual.paintmethod has been renamed torender. -
SizeChangedDetectionModehas been removed: TheGraphComponentsize is now always detected using a Resize Observer. -
The
Themeclass has been removed in favor of CSS variables. TheCLASSICtheme is no longer available. -
The
CanvasComponent.schedulemethod has been removed as it had no use. -
The
RenderModesenum is now calledRenderMode, since this is not a flags enum. Also, its valuesWEB_GLandWEB_GL2have been renamed to the nicer names WebGL and WebGL2. -
Renamed
CanvasComponent.divtoCanvasComponent.htmlElementto reflect the less strict requirement for its hosting element. -
Renamed the values of the
ScrollBarVisibilityenum to be more clear:-
ScrollBarVisibility.NEVERis nowScrollBarVisibility.HIDDEN. -
ScrollBarVisibility.AS_NEEDED_DYNAMICis nowScrollBarVisibility.AUTO. -
ScrollBarVisibility.ALWAYSis nowScrollBarVisibility.VISIBLE.
-
Incompatible Behavior Changes
-
For new
GraphModelManagerinstances, theinstallmethod has to be called either directly or indirectly by assigning theGraphModelManagerto theGraphComponent.graphModelManagerproperty.
Rendering
Incompatible API Changes
-
The
VOID_VISUAL_CREATORclass was removed. Use theIVisualCreator.VOID_VISUAL_CREATORsingleton instead. -
The
ICanvasObjectDescriptorinterface has been renamed toIObjectRendererand itsisDirtymethod has been removed. -
The
ICanvasObjectinterface has been renamed toIRenderTreeElementand itsuserObjectproperty has been renamed totag. Itsdescriptorproperty has been replaced with propertyrendererof typeIObjectRenderer. -
The
ICanvasObjectGroupinterface has been renamed toIRenderTreeGroup. -
The
ICanvasObjectInstallerinterface has been removed. -
The singletons of the
ICanvasObjectDescriptorclass are no longer necessary, and thus, this class has been removed. There is now aVoidObjectRenderer.Instancesingleton. -
The
IFocusIndicatorInstaller,IHighlightIndicatorInstaller, andISelectionIndicatorInstallerinterfaces have been renamed toIFocusRenderer,IHighlightRenderer, andISelectionRendererrespectively and now inherit fromIObjectRendererinstead ofICanvasObjectInstaller. Classes implementing these interfaces have been changed accordingly (EdgeStyleDecorationInstaller,LabelStyleDecorationInstaller,NodeStyleDecorationInstaller, andPortStyleDecorationInstallerhave been renamed toEdgeStyleIndicatorRenderer,LabelStyleIndicatorRenderer,NodeStyleIndicatorRenderer, andPortStyleIndicatorRendererrespectively). -
The
getInstallermethods on theModelManager,FocusIndicatorManager,HighlightIndicatorManager,SelectionIndicatorManager,GraphFocusIndicatorManager,GraphHighlightIndicatorManager, andGraphSelectionIndicatorManagerclasses are now calledgetRendererand returnIObjectRenderer. Similarly, theGetCanvasObjectGroupmethods of these classes have been renamed toGetRenderTreeGroup. -
The members of class
GraphModelManagerhave been adjusted to reflect theICanvasObjectDescriptorandICanvasObjectrenamings. More precisely,defaultEdgeDescriptor,DEFAULT_LABEL_DESCRIPTOR,defaultNodeDescriptor,DEFAULT_PORT_DESCRIPTOR,edgeDescriptor,edgeLabelDescriptor,nodeDescriptor,nodeLabelDescriptor,portDescriptor,portLabelDescriptor,provideUserObjectOnMainCanvasObject,getCanvasObject,GetCanvasObjectGroup,GetCanvasObjectGroup,GetCanvasObjectGroup,GetCanvasObjectGroup, andgetMainCanvasObjecthave been renamed toDEFAULT_EDGE_RENDERER,DEFAULT_LABEL_RENDERER,DEFAULT_NODE_RENDERER,DEFAULT_PORT_RENDERER,edgeRenderer,edgeLabelRenderer,nodeRenderer,nodeLabelRenderer,portRenderer,portLabelRenderer,provideRenderTagOnMainRenderTreeElement,getRenderTreeElement,GetRenderTreeGroup,GetRenderTreeGroup,GetRenderTreeGroup,GetRenderTreeGroup, andgetMainRenderTreeElementrespectively. -
The members of class
ItemModelManagerhave been adjusted to reflect theICanvasObjectDescriptorandICanvasObjectrenamings. More precisely,canvasObjectGroup,descriptor,getCanvasObject,GetCanvasObjectGroup, andgetDescriptorhave been renamed torenderTreeGroup,renderer,getRenderTreeElement,GetRenderTreeGroup, andgetRendererrespectively. -
The
RectangleIndicatorInstaller,OrientedRectangleIndicatorInstaller, andPointSelectionIndicatorInstallerclasses have been removed. -
The
IStripeInputVisualizationHelperinterface is now calledIStripeInputRendererand extendsIObjectRenderer, theDefaultStripeInputVisualizationHelperclass has been removed. -
The
StripeDecorator.inputVisualizationDecoratorproperty has been renamed toinputRenderer. -
The
DefaultPortCandidateDescriptorclass is now calledPortCandidateRenderer. The class no longer has theCANDIDATE_DRAWING_VALID_NON_FOCUSED_KEY,CANDIDATE_DRAWING_VALID_FOCUSED_KEY,CANDIDATE_DRAWING_INVALID_NON_FOCUSED_KEY, andCANDIDATE_DRAWING_INVALID_FOCUSED_KEYstatic properties. -
The new
PortCandidateRendererproperty on theCreateEdgeInputModeclass replaces thecandidateDescriptorandclosestCandidateDescriptorproperties. -
The new public property
PortCandidateRendereron thePortRelocationHandleclass replaces thecreatePortCandidateDescriptorandcreateCurrentPortCandidateDescriptorprotected methods. -
The new public property
PortCandidateRendereron thePortRelocationHandleProviderallows customizing the renderer for the port candidates. -
The new
viewportRectangleRendererproperty on theOverviewInputModeclass allows customizing the renderer for the viewport rectangle. It replaces thetemplateproperty and theVIEWPORT_TEMPLATE_KEYstatic property. -
The new
MarqueeSelectionInputMode.marqueeRendererproperty replaces thetemplateproperty andMARQUEE_RECTANGLE_TEMPLATE_KEYstatic property. -
The new
LassoSelectionInputMode.LassoRendererproperty replaces thefinishRegionTemplateandfinishRegionHighlightTemplateproperties and theFINISH_REGION_TEMPLATE_KEYandFINISH_REGION_HIGHLIGHT_TEMPLATE_KEYstatic properties. Also, theLASSO_STROKE_KEYandLASSO_FILL_KEYstatic properties have been removed. -
The new
candidateRendererproperty on theLabelPositionHandlerclass replaces thecandidateTemplateandhighlightTemplateproperties and theCANDIDATE_TEMPLATE_KEYandHIGHLIGHT_TEMPLATE_KEYstatic properties. -
The
getCanvasObjectandgetCanvasObjectsmethods of classCanvasComponenthave been renamed togetRenderTreeElementand have been moved to theGraphModelManagerclass. -
The
createSnapResultCanvasObjectDescriptormethod of classSnapContexthas been renamed tocreateSnapResultRenderer. -
The
graphVisualCreatorproperty of classGraphOverviewComponentis now calledGraphOverviewRendererand of typeIObjectRenderer. -
The classes
GraphOverviewSvgVisualCreator,GraphOverviewCanvasVisualCreator,GraphOverviewWebGLVisualCreator, andWebGL2GraphOverviewVisualCreatorwere replaced by theGraphOverviewRendererclass, which implementsIObjectRenderer. The new class uses canvas rendering. The other rendering methods were removed from the library. There is a demo implementation for SVG rendering in the overview styles demo.
Selection, Focus, Highlight
Incompatible API Changes
-
Class
FocusIndicatorManagerno longer implementsINotifyPropertyChanged. -
Replaced event
FocusIndicatorManager.property-changedwith eventfocused-item-changed. -
Renamed Method
FocusIndicatorManager.onPropertyChangedtoonFocusedItemChangedand changed signature. -
The
IndicatorEdgeStyleDecorator,IndicatorLabelStyleDecorator,IndicatorNodeStyleDecorator, andIndicatorPortStyleDecoratorclasses were removed. Use theEdgeStyleIndicatorRendereretc. classes instead. -
The
GraphFocusIndicatorManager,GraphHighlightIndicatorManager, andGraphSelectionIndicatorManagerclasses were removed. Use theFocusIndicatorManageretc. classes and their default instances on theGraphComponentclass instead and register instances of theEdgeStyleIndicatorRendereretc. classes to the item lookups via the graph decorator. -
The
addSelectionandremoveSelectionmethods on theSelectionIndicatorManagerclass were removed. Instead, modify theitemsproperty directly. -
FocusIndicatorManager.showFocusPolicychanged its default to the newWHEN_USING_KEYBOARD. The old policy calledONLY_WHEN_FOCUSEDis now calledWHEN_FOCUSED. -
HighlightIndicatorManagernow by default uses the newGraphComponent.highlightscollection. Adding, removing, and clearing highlights should now be done via theGraphComponent.highlightsproperty. -
The
ISelectionModelinterface 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
ItemSelectionChangedEventArgshave been replaced by usages ofItemEventArgsand there are now two separate events for adding/selecting and removing/deselecting elements from the collections. TheItemSelectionChangedEventArgstype has been removed. -
The default implementations of
IGraphSelectionandIStripeSelectionhave been removed from the public API.
Styles
Incompatible API Changes
-
Class
TableNodeStyleno longer implementsINotifyPropertyChanged. -
The class
Arrowis 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. -
The
Wrappedproperty ofCollapsibleNodeStyleDecorator,IndicatorNodeStyleDecorator,IndicatorEdgeStyleDecorator,IndicatorLabelStyleDecorator,IndicatorPortStyleDecorator,ShadowNodeStyleDecorator, andIconLabelStylehas been renamed towrappedStyle. -
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
DelegatingNodeStyleandCompositeNodeStylestyle 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.copyBackgroundStylemethod has been removed. Theclonemethod doesn't deep copy the background style but just uses it for the clone as well, which also was the previous default behavior. -
The deprecated styles
BevelNodeStyle,PanelNodeStyleandShinyPlateNodeStylehave been removed. -
Renamed some values of
TextWrappingShapeandShapeNodeShape:- Triangle2 is now
TRIANGLE_POINTING_DOWN. - Hexagon2 is now
HEXAGON_STANDING.
- Triangle2 is now
-
Removed the following values from
ShapeNodeShape:SHEARED_RECTANGLE,SHEARED_RECTANGLE2, Trapez, Trapez2,FAT_ARROW, andFAT_ARROW2.-
Use the
ArrowNodeStylefor more flexible visualizations of these geometries.
-
Use the
-
Renamed
STAR5_UPto Star5, removed old (down pointing) Star5.-
Use the factory methods on
GeneralPathNodeStylefor 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:SHEARED_RECTANGLE,SHEARED_RECTANGLE2, Trapez, and Trapez2. -
The
IArrowinterface now requires thecropAtPortproperty to be provided by implementations. For backward compatibility return false in simple subclasses. -
Removed
TemplateNodeStyle,StringTemplateNodeStyle,TemplateLabelStyle,StringTemplateLabelStyle,TemplatePortStyle,StringTemplatePortStyle,TemplateStripeStyleandStringTemplateStripeStyle. Alternatively, useLitNodeStylefrom the yFiles demos, or implement a custom style. -
The
SolidColorFillclass has been removed because the Color class takes over its functions. -
The
MarkupLabelStyleno longer inherits fromDefaultLabelStyle. -
WebGLImageNodeStyle: renamed background visual properties: shape →backgroundShape, fill →backgroundFill, stroke →backgroundStroke. -
Renamed
textDecorationtoTextDecorationsto reflect its enum flags characteristic. - Removed
TextDecoration.BLINKenum value. -
Renamed
WebGL2IconNodeStyletoWebGLImageNodeStyle.-
Renamed its
iconproperty toimage. -
Renamed its
iconColorproperty toimageColor.
-
Renamed its
-
The
VoidNodeStyle,VoidEdgeStyle,VoidLabelStyle,VoidPortStyle,VoidStripeStyleclasses, and the respective renderer classes were removed. Use one of the following constant singletons instead:INodeStyle.VOID_NODE_STYLE,IEdgeStyle.VOID_EDGE_STYLE,ILabelStyle.VOID_LABEL_STYLE,IPortStyle.VOID_PORT_STYLE, andIStripeStyle.VOID_STRIPE_STYLE. -
The
VoidShapeGeometryandVoidPathGeometryclasses were removed. Use one of the following constant singletons instead:IShapeGeometry.VOID_SHAPE_GEOMETRYandIPathGeometry.VOID_PATH_GEOMETRY. -
The
ImageNodeStyle.imageproperty has been renamed to `href`. -
The
ImageNodeStyle.fallbackImageproperty has been removed. -
The
ImageNodeStyleRenderer.TEMPLATE_KEYhas been removed. -
Removed
fontWeightenum in favor of setting the font's weight as string. -
The values of the
TextWrappingenum have been renamed to distinguish those that wrap the lines from those that don't. -
The
DefaultLabelStyle.clipTextandMarkupLabelStyle.clipTextproperties have been removed. In case a label text should be clipped but not wrapped, use theTextWrapping.CLIPpolicy. - Font's equals implementation now check for value equality instead of only looking for referential equality.
Incompatible Behavior Changes
- The default line spacing has been reduced to 0.2 to better match the platform defaults.
-
The default value of the
DefaultLabelStyle.wrappingandMarkupLabelStyle.wrappingproperties has been changed toTextWrapping.WRAP_WORD_ELLIPSIS.
WebGL
Incompatible API Changes
-
The type of the
WebGLLabelStyle.paddingandWebGLIconLabelStyle.paddingproperties is nowInsetsinstead of a singlenumber. - Made
WebGLTextureRenderinga non-flag enum. -
The
WebGL2ShapeNodeShape.HEXAGON2property is now calledHEXAGON_STANDING. -
Style setters on the
WebGL2GraphModelManagerhave been removed. -
Replaced "WebGL2" prefix with "WebGL" for the following types:
WebGL2Animation,WebGL2AnimationDirection,WebGL2AnimationEasing,WebGL2AnimationTiming,WebGL2ArcEdgeStyle,WebGL2ArrowType,WebGL2BeaconAnimationType,WebGL2BeaconNodeIndicatorStyle,WebGL2BridgeEdgeStyle,WebGL2DashStyle,WebGL2DefaultLabelStyle,WebGL2EdgeIndicatorStyle,WebGL2Effect,WebGL2FadeAnimationType,WebGL2FocusIndicatorManager,WebGL2GraphModelManager,WebGL2GraphModelManagerRenderMode,WebGL2GroupNodeStyle,WebGL2HighlightIndicatorManager,WebGL2IconLabelStyle,WebGL2IndicatorType,WebGL2LabelIndicatorShape,WebGL2LabelIndicatorStyle,WebGL2LabelShape,WebGL2LineCap,WebGL2NodeIndicatorShape,WebGL2NodeIndicatorStyle,WebGL2PolylineEdgeStyle,WebGL2PulseAnimationType,WebGL2ScaleAnimationType,WebGL2SelectionIndicatorManager,WebGL2ShakeAnimationType,WebGL2ShapeNodeShape,WebGL2ShapeNodeStyle,WebGL2Stroke,WebGL2TextureRendering,WebGL2Transition,WebGL2TransitionProperties,WebGL2Visual. -
The
RenderModes.WEB_GLenum value and theWebGLShapeNodeStyle,WebGLImageNodeStyle,WebGLPolylineEdgeStyle,WebGLTaperedEdgeStyle, andGraphOverviewWebGLVisualCreatorclasses have been removed. -
The
textAlignmentproperty inWebGLLabelStylewas renamed tohorizontalTextAlignment. -
Class
WebGLAnimationno longer implementsIAnimationbut is still accepted inIAnimation.createParallelAnimationandIAnimation.createSequentialAnimationthrough auto-conversion.
Interaction
Incompatible API Changes
-
Removed the
PortRelocationHandle.createDummyEdgeVisualCreatormethod. To change the preview edge's style overwritePortRelocationHandle.createPreviewEdgeinstead. -
The
LabelPositionHandler.setPositionmethod has been removed. -
The
LabelPositionHandler.useFinderproperty has been removed. Use the newuseParameterFinderRecognizerproperty instead. -
The
LabelPositionHandler.useParameterFindermethod has been renamed toshouldUseParameterFinder. -
The
LabelPositionHandler.useFinderproperty has been removed. -
The protected virtual
createEdgeCreationInputModeContextmethod on theCreateEdgeInputModeclass has been removed. Use or override thecreateInputModeContextmethod, instead. -
The
ToolTipQueryEventArgsclass is now namedQueryToolTipEventArgsto properly match the corresponding event's name. -
Renamed
DoubleClickPolicytoClickReportingPolicy. -
Renamed
ClickInputMode.doubleClickPolicytoClickReportingPolicy. -
Renamed
DoubleClickPolicy.INITIAL_SINGLE_AND_DOUBLE_CLICKtoClickReportingPolicy.INSTANT. -
Renamed
DoubleClickPolicy.DOUBLE_CLICK_ONLYtoWAIT_FOR_DOUBLE_CLICK. -
Removed
DoubleClickPolicy.BOTH_SINGLE_CLICKS_AND_DOUBLE_CLICK. -
Changed the default of
ClickInputMode.clickReportingPolicytoClickReportingPolicy.INSTANT. -
Removed the
preventNextDoubleClickmethod fromClickInputModeclass. Use theCancelmethod instead. -
The
LassoSelectionEventArgs.selectionPathproperty has been renamed to Path. -
The core
onMarqueeSelectandonLassoSelectmethods ofGraphEditorInputModeandGraphViewerInputMode, that take an enumerable and predicate, have been removed while the otheronMarqueeSelectandonLassoSelectmethod got an additional parameter of typeSelectionPolicy. -
Renamed
DropInputMode.mousePositiontopointerPosition. -
Renamed
DropInputMode.captureMouseInputDuringDragtocapturePointerInputDuringDrag. -
Renamed
ItemDropInputMode.snappedMousePositiontosnappedPointerPosition. -
The generic type of the
IHitTesterinterface has been removed. Instead, a parameter of typeGraphItemTypeshas been added to itsenumerateHitsmethod. -
Renamed
LabelDropInputMode.useBestMatchingParameterandPortDropInputMode.useBestMatchingParametertouseLocationForParameter. -
Events which involve item changes triggered by input modes are now of type
InputModeItemEventArgsinstead ofItemEventArgs. These are the events:-
CreateBendInputMode:bend-created. -
CreateEdgeInputMode:start-port-candidate-changed,end-port-candidate-changed,edge-created,port-added,edge-creation-started. -
GraphEditorInputMode:label-edited,label-added,node-created,port-added. -
ItemDropInputModeand inheritors:item-created. -
NavigationInputMode:group-collapsing,group-collapsed,group-expanding,group-expanded,group-entering,group-entered,group-exiting,group-exited. -
TableEditorInputMode:deleted-item. -
EditLabelInputMode:label-added,label-editing-started,label-editing-canceled,label-edited. -
StripeDropInputMode:stripe-created.
-
-
Events which involve item deletion or structural changes triggered by input modes
are now of type
InputModeItemChangedEventArgs:-
GraphEditorInputMode.deleted-item:InputModeItemChangedEventArgsinstead ofItemDeletedEventArgs. -
GraphEditorInputMode.edge-ports-changed:InputModeItemChangedEventArgsinstead ofEdgeEventArgs. -
GraphEditorInputMode.node-reparented:InputModeItemChangedEventArgsinstead ofNodeEventArgs. -
EditLabelInputMode.label-deleted:InputModeItemChangedEventArgsinstead ofLabelEventArgs.
-
-
Renamed "Source" to "Start" and "Target" to "End" in the following members of
CreateEdgeInputModeclass:-
Renamed
resolveSourcePortCandidatestoresolveStartPortCandidates. -
Renamed
resolveTargetPortCandidatestoresolveEndPortCandidates. -
Renamed
source-port-candidate-changedtostart-port-candidate-changed. -
Renamed
target-port-candidate-changedtoend-port-candidate-changed. -
Renamed
sourcePortCandidatetostartPortCandidate. -
Renamed
targetPortCandidatetoendPortCandidate. -
Renamed
snapToTargetCandidatetosnapToEndCandidate. -
Renamed
cancelGestureOnInvalidTargettocancelGestureOnInvalidEnd. -
Renamed
sourceNodeDraggingFinishedRecognizertostartPortOwnerDraggingFinishedRecognizer. -
Renamed
sourceNodeDraggingCursortostartPortOwnerDraggingCursor. -
Renamed
showSourcePortCandidatesHitTestabletoshowStartPortCandidatesHitTestable. -
Renamed
onSourcePortCandidateChangedtoonStartPortCandidateChanged. -
Renamed
onTargetPortCandidateChangedtoonEndPortCandidateChanged. -
Renamed
source-port-candidate-changedtostart-port-candidate-changed. -
Renamed
target-port-candidate-changedtoend-port-candidate-changed. -
Renamed
getSourcetogetStartPortOwner. -
Renamed
getTargetNodetogetEndPortOwner. -
Renamed
lookupSourcePortCandidateProvidertogetStartPortCandidateProvider. -
Renamed
lookupTargetPortCandidateProvidertogetEndPortCandidateProvider. -
Renamed
GetSourcePortCandidatestogetStartPortCandidates. -
Renamed
GetTargetPortCandidatestogetEndPortCandidates. -
Renamed
GetSourcePortCandidate(PointD)togetStartPortCandidate. -
Renamed
getSourcePortCandidate(IEnumerable,<IPortCandidate>Point, bool) toselectStartPortCandidate. -
Renamed
getClosestCandidatetoselectClosestCandidate. -
Renamed
getClosestSourceCandidatetoselectClosestStartCandidate. -
Renamed
getClosestTargetCandidatetoselectClosestEndCandidate. -
Renamed
sourcePortCandidateHitRadiustostartPortCandidateHitRadius. -
Renamed
updateTargetLocationtoupdateEndLocation. -
Renamed
showTargetHighlighttoshowEndHighlight. -
Renamed
updateTargetHighlighttoupdateEndHighlight. -
Renamed
dummyTargetNodetopreviewEndNode. -
Renamed
dummyTargetNodePorttopreviewEndNodePort.
-
Renamed
-
Renamed
ShowPortCandidates.SOURCEtostartandShowPortCandidates.TARGETtoend. -
Removed
CreateEdgeInputMode.createDummyEdgeGraph,CreateEdgeInputMode.createDummyEdge,CreateEdgeInputMode.createDummyTargetNode,CreateEdgeInputMode.createDummyTargetNodePort,CreateEdgeInputMode.dummySourceNodePort,CreateEdgeInputMode.updateDummyEdgeSourcePort, andCreateEdgeInputMode.updateDummyEdgeTargetPort. -
The
InputModeContextproperty has been removed from theIInputModeinterface. In input mode implementations, the property has been renamed toparentInputModeand changed to protected access to prevent incorrect usage. -
ICanvasContext.DEFAULTandICanvasContext.createCanvasContexthave been removed. A validICanvasContextcan be retrieved from theCanvasComponent.canvasContextproperty. -
IInputModeContext.EMPTYhas been removed. A validIInputModeContextcan be retrieved usingCanvasComponent.inputModeContextproperty. -
The factory methods for input mode contexts on the
IInputModeContextinterface have been removed. AppropriateIInputModeContextimplementations can be obtained usingInputModeContextclass withCanvasComponent.inputModeContextas parent context. -
The static fields
ALL_NODE_CANDIDATESandALL_NODE_AND_EDGE_CANDIDATESonIEdgeReconnectionPortCandidateProviderhave been replaced by the factory methodsfromAllNodeCandidatesandfromAllNodeAndEdgeCandidates. The implementations now provide a port candidate for the unchanged port of the edge when collecting the port candidates from theIPortCandidateProviderinstances of the nodes and edges. -
CreateEdgeInputMode's methods have been renamed:-
getClosestSourceCandidatetoselectClosestStartCandidate. -
getClosestCandidatetoselectClosestCandidate. -
getClosestTargetCandidatetoselectClosestEndCandidate.
-
-
CreateEdgeInputMode.startPortCandidateHitRadiusnow is defined in view coordinates. -
The
HandleTypesenums has been refactored to a non-flaggableHandleTypeenum, and the values have been adjusted. -
A
tagproperty has been added to theIHandleinterface. yFiles does not use the property and initializes it withnull, but decorating handles forward any values unmodified. -
The
textProviderparameter forToolTipInputMode's constructor has been removed. An event handler for thequery-tool-tipevent can be registered instead. -
The
ICommandinterface and its implementations have been replaced with the enumCommand. -
Constants of
ICommandhave been replaced with equally named constants of enumCommand. -
The methods
canExecuteandexecuteand itscan-execute-changedevent inICommandhave been replaced withCanvasComponent'scanExecuteCommandandexecuteCommandmethods and theCanExecuteCommandChangedevent, respectively. -
Custom commands can no longer be created. As an alternative, register handlers on
KeyboardInputMode. -
Removed callback methods which only raised the related events from classes
CanvasComponentandGraphComponent, e.g.,OnZoomChanged. Use the corresponding events instead, e.g.,zoom-changed. -
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
toolTipandTextBoxproperties on classesToolTipInputModeandTextEditorInputMode, respectively. Set custom instances using the properties, instead. -
Removed the methods
GetBounds,getVisual,getVisualCreator, andisHitfromCanvasComponentclass. Use the respective methods ofRenderTreeclass instead. -
The
MouseHoverInputModeclass has been renamed toToolTipInputMode. -
The
GraphInputMode.mouseHoverInputModeproperty has been renamed toToolTipInputMode. -
The
handleIsHitTouchandgetClosestHitHandleTouchmethods ofHandleInputModehave been removed in favor of the methodshandleIsHitandgetClosestHitHandle, which now handle all types of pointer devices. -
The
NavigationInputMode.findNearestItemmethod now gets thestartItemas a parameter instead of the location of it, and this item is also included in theitemsToCheckparameter. Implementations may use the newgetReferenceLocationmethod to find the starting location and should make sure not to return thestartItemitself. -
The protected
Should-methods of the input modes have been removed and replaced by predicate properties. -
The event
GraphEditorInputMode.label-text-changedhas been changed tolabel-editedto reflect the broader scope of changes allowed during label editing. Similarly,GraphEditorInputMode.onLabelTextChangedis now namedonLabelEdited. -
Most methods, properties, and events related to label editing have been moved from
GraphEditorInputModetoEditLabelInputMode:autoRemoveEmptyLabels,hideLabelDuringEditing,TextEditorInputMode,textEditorInputModeConfigurator,createLabel,createLabelCore,editLabelCore,openTextEditor,label-deleted,label-text-editing-started,label-text-editing-canceled, andvalidate-label-text. The eventslabel-editingandlabel-addinghave been moved toEditLabelInputModeand renamed toquery-label-editingandquery-label-adding, respectively, to clarify their purpose. -
Most methods, properties, and events related to label editing have been moved from
TableEditorInputModetoEditLabelInputMode:autoRemoveEmptyLabels,hideLabelDuringEditing,TextEditorInputMode,textEditorInputModeConfigurator,createLabel,createLabelCore,editLabelCore,openTextEditor,label-deleted,label-text-editing-started,label-text-editing-canceled, andvalidate-label-text. The eventslabel-editingandlabel-addinghave been moved toEditLabelInputModeand renamed toquery-label-editingandquery-label-adding, respectively, to clarify their purpose. -
Replaced
MouseEventArgsandTouchEventArgswithPointerEventArgs. -
Integrated
TapInputModeintoClickInputMode. Touch input now also firesclickedevents. -
Removed all
ClickInputModeevents except forclicked. Click buttons and click count can be obtained from theClickEventArgs. -
Removed the events
item-tapped,item-double-tapped, andcanvas-tappedfromGraphInputModein favor of checking thePointerTypeon the corresponding Click event. -
Method
getBendsInPathhas been added to theIBendSelectionTesterinterface and is used to check for bends that should be lasso selected. -
Method
getPortsInPathhas been added to theIPortSelectionTesterinterface and is used to check for ports that should be lasso selected. -
discardInvalidItemsinItemHoverInputModehas been renamed toignoreInvalidItems, and its behavior was reversed. -
The
MoveLabelInputModeclass and its corresponding property onGraphEditorInputModehave been removed. Label movement is now handled directly byMoveInputMode. Most customizations related tolabelmovement (as opposed to the move gesture in general) can now be done onLabelPositionHandler, instead. -
Replaced
Dummyin names with a more descriptive term. In particular:-
In
CreateEdgeInputMode,dummyEdge,dummyEdgeGraph,dummyTargetNode,,dummyTargetNodePort,updateDummyEdgeSourcePort,updateDummyEdgeTargetPort,getDummyEdgeSnapLines, andcreateDummyBendhave been renamed topreviewEdge,previewGraph,previewEndNode,previewEndNodePort,updatePreviewEdgeStartPort,updatePreviewEdgeEndPort,getPreviewEdgeSnapLines, andcreatePreviewBend. -
The
Visualization.DUMMYenum value has been renamed toVisualization.PLACEHOLDER. -
In
PortRelocationHandle,createDummyEdgehas been renamed tocreatePreviewEdge.
-
In
-
The event
deleted-selectionofGraphEditorInputModenow usesItemsEventArgsinstead ofSelectionEventArgs. -
Renamed
GraphInputMode.shouldSelectItemtoshouldSelect. -
The
doStartEdgeCreationmethod on theCreateEdgeInputModeclass is now calledstartEdgeCreation. -
The
doStartDragmethod on theMoveInputModeclass is now calledstartDrag. -
The
beginDraggingmethod on theHandleInputModeclass is now calledstartDrag. -
The
AddLabelmethod onGraphEditorInputModeis now calledstartLabelAddition. -
The
EditLabelmethod onGraphEditorInputModeis now calledstartLabelEditing. -
Removed the
PortRelocationHandle.GHOST_VISUALIZATION_STROKE_KEYconstant. Use the new.CSS class instead.yfiles-edge-relocation-ghost -
The
LassoTestables.ALWAYSandSINGLEsingletons have been moved to theILassoTestabletype. -
The
CanvasComponentlistens to and handlesPointerEventsto intercept user input. Custom styles might need to handlepointer-downevents to ensure proper click events will be delivered to listeners. - Snapping override (i.e. disable snapping temporarily) is now recognized by pressing the command key on the macOS platform.
-
Added
META_KEYtoDragDropKeyStates. -
Removed
KeyEventArgs.originalSourcewhich is already covered byKeyEventArgs.OriginalEvent.target. -
Renamed
KeyEventArgs.alttoKeyEventArgs.altKey. -
Renamed
KeyEventArgs.shifttoKeyEventArgs.shiftKey. -
Renamed
KeyEventArgs.controltoKeyEventArgs.ctrlKey. -
Renamed
KeyEventArgs.metatoKeyEventArgs.metaKey. -
Removed the
LabelTextValidatingEventArgs.cancelproperty. Instead, set thevalidatedTexttonullto reject the edited label text. -
The
MouseEventArgs.wheelDeltaproperty has been renamed towheelDeltaY. -
The
MouseEventArgs.scrollAmountproperty has been removed. -
Removed
CanvasComponent.KeyPressevent and associatedKeyEventType.Press. Instead, use thekey-downevent or listen to the browser's (deprecated) "keypress" event. -
Renamed
ModifierKeys.WINDOWStoModifierKeys.META. -
The order of the two parameters of the
EventRecognizerfunction was reversed. -
The
CanvasComponentnow listens to pointer events, instead of mouse and touch events. -
The CSS class for all snap references was renamed from
yfiles-snap-linetoyfiles-snap-reference. - The
SNAP_LINE_STROKE_KEYwas removed. - The
toolTipclass has been removed.
Incompatible Behavior Changes
-
Changed the default of
TextEditorInputMode.textBoxPlacementPolicytoTextBoxPlacementPolicy.MOVE_TEXT_BOX. -
The
GraphInputMode.findItemsmethod now considers the actual z-order of the hit items. -
GraphEditorInputMode'smoveUnselectedItemsInputModenow only moves unselected items. Previously it also moved selected items despite its name. -
The
multiSelectionRecognizerofGraphEditorInputModeandGraphViewerInputModeare not used anymore for marquee and lasso selection. Instead,MarqueeSelectionInputModeandLassoSelectionInputModehave their own modifiers for different selection policies. -
The
LabelDropInputMode.isValidLabelOwnermethod now only accepts instances ofFreeLabelModelor that thedraggedLabel's owner type matches the owner type e.g.INode,IEdge, orIPort. -
The default values of the
NodeReshapeHandleProvider.ratioReshapeRecognizerproperty andReshapeHandlerHandlehas been changed tonull. If no custom recognizer is set,ReshapeHandlerHandleuses the newHandleInputMode.isDirectionalConstrainedmethod instead if aHandleInputModeis found in theIInputModeContext. -
The default value of
enableSnappingRecognizerinCreateEdgeInputMode,HandleInputMode, andMoveInputModehas been changed fromCTRL_UPtoALT_UP. -
The default value of
disableSnappingRecognizerinCreateEdgeInputMode,HandleInputMode, andMoveInputModehas been changed fromCTRL_DOWNtoALT_DOWN. -
The default value of
centerReshapeRecognizerinNodeReshapeHandleProviderandReshapeHandlerHandlehas been changed fromALT_IS_DOWNtoCtrlIsDown. -
The default value of
ReparentNodeHandler.reparentRecognizerhas been changed fromSHIFT_IS_DOWNtoCtrlIsDown. -
GraphEditorInputMode.allowGroupingOperationsis now true by default. -
Refined the event sequence of
CreateEdgeInputModeto ensure consistency and symmetry between gesture cancellation and completion. -
Reorganized the sequence to include
edge-creation-startedonly 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
gesture-finishing, allowing users to apply final updates to the end port. -
Ensured the following event order for gestures:
-
gesture-starting,gesture-started. -
Cancellation path:
gesture-canceling,gesture-canceled. -
Completion path:
edge-creation-started,gesture-finishing,edge-created,gesture-finished.
-
-
The
edge-creation-startedandedge-createdevents provide now arguments of typeItemEventArgs.<IEdge> -
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
IEdgeReconnectionPortCandidateProvider.fromSourceAndTarget. - 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.
- Unselected items can be moved by default.
- Edge creation: by default, start port candidates are shown when hovering over a node.
-
GraphViewerInputMode/GraphEditorInputMode: theclickHitTestOrderdefault value has been changed toGraphItemTypes.ALLwhich 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. -
The default value of
CreateEdgeInputMode.portCandidateResolutionRecognizerhas been changed fromSHIFT_IS_DOWNtoCtrlIsDown. -
The default value of the
CreateEdgeInputMode.enforceBendCreationRecognizerhas been changed formCtrlIsDowntoALT_IS_DOWN. -
The default keyboard shortcuts of several commands have been changed:
-
Command.COLLAPSE_GROUPnow usesAlt+Left. -
Command.EXPAND_GROUPnow usesAlt+Right. -
Command.ENTER_GROUPnow usesAlt+Down. -
Command.EXIT_GROUPnow usesAlt+Up. -
Command.TOGGLE_EXPANSION_STATEnow usesAlt+Shift+LeftandAlt+Shift+Right. -
Command.INCREASE_ZOOMnow usesCtrl+Plus. -
Command.DECREASE_ZOOMnow usesCtrl+Minus.
-
-
The default value of
TextEditorInputMode.autoCommitOnFocusLostis 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. -
The default edge lookup doesn't provide an
IPositionHandleranymore so dragging a selected edge doesn't move all its bends. -
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.orthogonalEdgeEditingContextproperty. This can be done by enabling thePolylineEdgeStyle.orthogonalEditingproperties of the styles, by setting an apropriatefallbackEdgeHelperProvideron the usedOrthogonalEdgeEditingContextor by providing anIOrthogonalEdgeHelperin the edges' lookup. -
NavigationInputModenow interprets the direction of arrow keys in view coordinates by default. -
The default lookup of labels now returns an
IPositionHandlerimplementation. -
In
CreateEdgeInputModeit was previously possible to define a fallback forgetPortOwnerifIHitTesterwas removed. This option for defining a fallback is removed and always returnsnull. -
Improved the
CreateBendInputModebehavior: Previously, dragging an existing bend triggered thebend-createdevent, 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. -
CanvasComponent.updateContentBoundsnow only considers the items in theRenderTree.contentGroupinstead of therootGroupwhen calculating the new bounds. -
The mouse wheel events of the
GraphComponentnow use the browser's native {}},deltaX{deltaYanddeltaModevalues. This implies that the mouse wheel behavior now also respects the client's current system settings.
Snapping
Incompatible API Changes
-
LabelSnapContexthas been removed, and label snapping is now handled byGraphSnapContext:-
The
GraphEditorInputMode.labelSnapContextproperty and theGraphEditorInputMode.onLabelSnapContextChangedmethod have been removed. -
The
CollectLabelSnapLineEventArgsclass has been removed. -
Configuration properties of
LabelSnapContexthave been moved toGraphSnapContextand renamed. -
The
ILabelSnapContextHelperinterface and theLabelSnapContextHelperclass have been removed. Instead, theILabelSnapResultProviderinterface and the classesLabelSnapResultProviderandLabelSnapReferenceProviderhave been added. -
The
LabelDecorator.labelSnapContextHelperDecoratorproperty has been replaced by the propertiessnapReferenceProviderandsnapResultProvider.
-
The
-
CollectGraphSnapLinesEventArgshas been renamed toCollectSnapReferencesEventArgs. Its methodsaddFixedNodeSnapLine,addFixedSegmentSnapLine,addPortSnapLine, andaddAdditionalSnapLinehave been removed and replaced by the singleaddSnapReferencemethod. -
GraphSnapContexthas been refactored, and the following members have changed:-
The properties
snapNodesToSnapLines,snapBendsToSnapLines,snapSegmentsToSnapLines,snapBendAdjacentSegments,snapPortAdjacentSegments,snapEdgeLabels,snapNodeLabels, andsnapPortLabelshave been replaced by the new propertiesSnappableItemsandGridSnappableItems. -
The
collectVisibleNodePairsmethod now takes theCollectSnapReferencesEventArgsthe snap references shall be added to. -
The methods
findSameWidthEntriesandfindSameHeightEntrieshave been removed. Instead, theSnapSizereferences describing to which size items can snap are provided by thesnapReferencesproperty. Similarly, thefixedNodeSnapLines,fixedSegmentSnapLines,fixedPortSnapLines, andadditionalSnapLinesproperties have been removed. ThesnapReferencesproperty should be used instead.
-
The properties
-
The
SnapLine.ResourceKeyproperty has been removed along with most of the staticresourceKeymembers used for snapping. Instead, avisualizationTypeproperty of the enum typeSnapReferenceVisualizationTypeis used to describe which visualization should be used for theSnapLine. -
Most subclasses of
SnapLinehave been removed as they only provided properties used for the visualization that are now available onSnapResult. -
The
SnapTypesenum used bySnapResulthas been replaced by the newSnapConstraintclass that supports finding common snap locations forSnapResultwith different constraints. -
The
snapandisSnappedmethods ofSnapResulthave been removed. Instead, aconstraintproperty of typeSnapConstrainthas been added that is used to merge possibleSnapResultand check if a location is valid for a givenSnapResult. -
The
SnapResult.getVisualCreatormethod has been removed and is replaced by the newobjectRendererproperty. -
The factory methods of
SnapResulthave been adjusted:-
createPointSnapResulthas been renamed tocreateSnapResult. -
createSnapLineSnapResulthas been renamed tocreateLineSnapResult. createLabelSnapResulthas been removed.
-
-
The methods of the snap result providers have been adjusted to support the new
SnapReferenceAPI. Most methods now take one instance of aSnapReferencesubclass likeSnapLineorSnapGrid. -
The classes
SnapState,ArrowContainer, andArrowControlhave been removed. -
The type of the
SnapContextproperties of all input modes has been changed fromSnapContexttoGraphSnapContext. -
Most classes and members that had
SnapLinein their name have been renamed to includeSnapReferenceinstead. -
The
ReshapeRectangleContext.initialBoundsproperty has been renamed toinitialLayout. -
The
GraphEditorInputMode.snapContextproperty is now set per default and may not benull. It is disabled per default. -
Renamed the
GraphSnapContext.nodeToNodeDistanceproperty tonodeDistance. -
Renamed the
GraphSnapContext.edgeToEdgeDistanceproperty toedgeDistance.
Clipboard
Incompatible API Changes
-
The values
LABEL_MODEL_PARAMETERandPORT_LOCATION_MODEL_PARAMETERhave been removed from theCloneTypesenum as those parameter are typically immutable, so cloning them has no effect. -
ElementCopiedCallbackhas been renamed toItemCopiedCallback. -
GraphViewerInputMode'selements-copiedevent has been renamed toitems-copied. -
GraphEditorInputMode'selements-copied,elements-cut,elements-copied,elements-pastedandelements-duplicatedevents were renamed toitems-copied, etc. -
On
GraphClipboard, theelements-cut,-Cutting,-Copying,-Copied,-Pasting,-Pasted,-Duplicating, and-Duplicatedevents were renamed toitemsinstead ofelementsand use the newGraphClipboardEventArgs. Also, theonElementCut,-Copied-, and-Pastedmethods were renamed to start withOnItemand take an additionalClipboardOperationContextas a parameter. -
GraphClipboard.removeElementshas been renamed toremoveItems. -
GraphClipboard.isFoldingStateElementhas been renamed toisFoldingStateItem. -
GraphClipboard.createContextnow takes an additionalIInputModeContextparameter that should be returned in the new contexts lookup. -
The
GraphClipboard.clipboardGraphproperty is now read-only. -
The parameters of
GraphClipboard'sCopymethod have been rearranged so default values for optional parameters could be added. -
The methods
createClipboardGraph,createToClipboardCopier,createFromClipboardCopier,createDuplicateCopier, andcreateDefaultClipboardIdProviderfromGraphClipboardthat were used to lazily initialize the corresponding properties have been removed. -
GraphClipboard.pastenow takes an enumerable ofIModelItemastargetOwnersparameter instead of atargetFilterpredicate. -
GraphClipboard.isFoldingStateElementis now an instance method and doesn't have an owner parameter anymore. -
The
GraphClipboard.pasteDeltaproperty has been renamed topasteOffset. It is now modified by theGraphClipboard'sCut,Copy,Paste, andDuplicatemethods instead of the corresponding methods onGraphEditorInputMode. -
The
GraphEditorInputMode.pasteDeltaproperty has been removed and replaced by the newGraphClipboard.pasteOffsetIncrementproperty. -
IClipboardHelper's methodsCut,Copy, andPastehave been renamed toonCut,onCopied, andonPasted. -
IClipboardHelper's methodsCutandCopydon't return anobjectanymore and theobjectparameter ofPasteandshouldPastehas been removed. ForCut/CopyandPastethe sameIClipboardHelpermethod is now used so any state that should be transfered can be stored in a custom implementation. -
IClipboardHelperhas new methodsshouldDuplicateandonDuplicatedwhich have to be implemented, now. -
GraphClipboard`s methodsgetMementoandgetClipboardHelperhave been removed. -
GraphClipboard's protectedCopyandPastemethods now take the newClipboardOperationContextas parameter instead of thesourceGraphsandfilterpredicates. -
GraphClipboard'sCut,Copy,Paste, andDuplicatemethods now use anIEnumerableinstead of a filter predicate to determine the subgraph to copy. -
GraphClipboard'sCreate*Filtermethods have been removed. -
The
GraphClipboardnow usesClipboardGraphCopierinstances for itstoClipboardCopier,fromClipboardCopier, andduplicateCopier. -
The
ParentNodeDetectionModeshas been reduced to contain only the mainly used options. The optionroothas been renamed toNONE, and the optionsALLOW_SELFandFORCEas well as theMODE_MASKandMODIFIER_MASKhave been removed. ThetargetNodemethod can be overridden if the reduced modes are not suitable and may call the newfindParentByPreviousParentmethod to simulate the oldFORCEsetting. -
GraphClipboard`sgetTargetNodemethods now take an additionalClipboardOperationContextparameter, and thegetTargetNodeoverload for nodes also takes apasteLocationas an additional parameter. -
GraphComponentinstances now use a sharedGraphClipboardper default. To revert to the previous behavior, a newGraphClipboardinstance can be set on eachGraphComponent. -
For consistency reasons, the property
GraphClipboard.emptyis now calledisEmpty.
Folding
Incompatible API Changes
-
Interface
IFolderNodeConverterhas a newupdateGroupNodeStatemethod. -
Interface
IFoldingEdgeConverterhas a newupdateMasterEdgesmethod. -
FolderNodeConverternow relies onFolderNodeDefaultsto configure initialization and update of states. -
FoldingEdgeConverterandMergingFoldingEdgeConverternow rely onFoldingEdgeDefaultsto configure initialization and update of states.
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
IFolderNodeConverterandIFoldingEdgeConverterimplementations. The default implementations already synchronize the tags. -
In the graph of a folding view, the
createGroupmethod now always creates a group even if theisExpandedpredicate specified in theFoldingManager.createFoldingViewmethod specifies otherwise. Create the group on the master graph if you want the predicate to be respected.
Lookup
Incompatible API Changes
-
The methods
setLookupImplementationandgetLookuphave been removed fromGraph. Instead theLookupmethod should be overridden if the default lookup behavior should be replaced. -
The methods
setLookupandgetLookuphave been removed fromGraphWrapperBase. Instead, theLookupmethod should be overridden if the default lookup behavior should be replaced. -
The
nodeparameter of the methods in the interfacesIGroupPaddingProvider,INodeSizeConstraintProvider, andIGroupBoundsCalculatorhas been removed. -
The
edgeparameter of the methods in the interfacesIEdgePortHandleProvider,IBendCreator, andIOrthogonalEdgeHelperhas been removed. -
The
labelparameter of the methods in the interfacesILabelModelParameterProvider, andILabelModelParameterFinderhas been removed. -
The model item parameter in
ISnapReferenceProvider.addSnapReferenceshas been removed. -
The
ILabelModelParameterparameter ofILabelModel.getContexthas been removed andILabelModeldoesn't extendILookupanymore. Instead, the lookup returned bygetContextshould be used for all lookup calls. -
The
IPortLocationModelParameterparameter ofIPortLocationModel.getContexthas been removed andIPortLocationModeldoesn't extendILookupanymore. Instead, the lookup returned bygetContextshould be used for all lookup calls. -
The
OrthogonalEdgeEditingContext.getOrthogonalEdgeHelpermethod has been replaced by thefallbackEdgeHelperProviderandorthogonalEdgeHelperProviderproperties. -
The
INodeInsetsProviderinterface was renamed toIGroupPaddingProvider. -
Renamed
LookupDecorator.setImplementationtoaddConstant. -
Renamed
LookupDecorator.setFactorytoaddFactory. -
Renamed
LookupDecorator.setImplementationWrappertoaddWrapperFactory. -
Renamed
LookupDecorator.hideImplementationto Hide. -
Renamed lookup decorators in general by removing the
decoratorsuffix. For example,graphDecorator.EdgeDecorator.PositionHandlerDecorator.HideImplementationis nowgraphDecorator.Edges.PositionHandler.Hide. -
Removed
LookupDecorator.nullIsFallback. Instead, use the predicate of theaddFactorymethod or return the original instance in theaddWrapperFactorymethod. -
Removed
LookupDecorator.decorateNulls. Instead, implement the desired behavior inaddWrapperFactory. -
Removed the
SimpleNode.lookupImplementationproperty,SimpleEdge,SimpleBend,SimpleLabelandSimplePort. Instead, use the newGetDecoratormethod to adjust the item's lookup. -
The
SimpleNode,SimpleEdge,SimpleBend,SimpleLabelandSimplePortclasses are now sealed, and theirLookupmethod is no longer virtual. To adjust the item's lookup, use theGetDecoratormethod. -
Removed
CanvasComponent.inputModeContextLookupandCanvasComponent.inputModeContextLookupChain. Instead, use the newgetInputModeContextDecoratorFormethod to decorate the input mode context lookup. -
The
EdgeDecorator.getDecoratorFormethod,NodeDecorator, etc. no longer has thenullIsFallbackanddecorateNullparameters.
GraphML
Incompatible API Changes
-
The methods
GraphMLIOHandler.addInputMapperFutureandGraphMLIOHandler.addInputHandlerFactoryhave been removed, together with their support classes. -
Type and property annotations via the
$metaattributes are not supported anymore. Instead, metadata has to be registered withGraphMLIOHandler.addTypeInformation. -
The convenience
GraphMLSupportclass, the predefinedICommand.OPENandICommand.SAVEcommands, and theStorageLocationenum have been removed. Use custom application code instead. -
The
addRegistryInputMapperandaddRegistryOutputMappermethods have been removed fromGraphMLIOHandler, since theMapperRegistryhas been removed. To read or write additional per-item data, use theaddInputMapperoraddOutputMappermethods, instead.
View-Layout-Bridge
Incompatible API Changes
-
Renamed
ItemMapping.delegatetomapperFunction. -
Renamed
ItemCollection.delegatetopredicate. -
Renamed the
LayoutExtensions.MorphLayoutmethod toapplyLayoutAnimated. -
Renamed the
LayoutExecutor.durationproperty toanimationDuration. -
Renamed the
LayoutExecutor.createMorphAnimationmethod tocreateLayoutAnimation. -
The
LayoutGraphAdapter.PORT_DUMMY_NODE_DP_KEYconstant has been renamed toPORT_HELPER_NODE_DATA_KEY. -
Several expert arguments have been removed from the convenience functions
applyLayoutandapplyLayoutAnimated. These areeasedAnimation,updatedContentBound,allowUserInteraction,configureTableLayout,considerViewportLimiterandhideEdgesAtEdges. -
Some default values of
LayoutExecutorhave been changed to be in line with default behavior ofIGraph.applyLayout/applyLayoutAnimatedthat was already in place in 2.6. These areanimateViewport, has changed from false to true and eased animation, has changed from false to true. -
The parameters
updateContentBounds,considerViewportLimiter, andtargetBoundsInsetswere removed fromIGraph.applyLayout. -
Renamed
LayoutExecutorAsync.createMorphAnimationtocreateLayoutAnimation. -
Boolean
LayoutExecutorAsync.fixPortsproperty is replaced by anItemMappingportPlacementPolicies, that allows to specify a policy for the handling of each individual port. -
The static
frommethod has been removed from theItemMapping,ItemCollection, and. ContextItemMappingclasses.-
The deprecated
LayoutExecutorAsync.graphControlproperty has been removed. Use theLayoutExecutorAsync.graphComponentproperty instead. -
Boolean
LayoutExecutor.fixPortsproperty is replaced by anItemMappingportPlacementPolicies, that allows to specify a policy for the handling of each individual port. -
LayoutExecutor.automaticEdgeGroupinghas been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
LayoutGraphAdapter.automaticEdgeGroupinghas been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
Replaced
LayoutExecutor.labelPreferredPlacementPolicywithItemMappingLayoutExecutor.labelPlacementPolicies. -
Renamed Enum
LabelPreferredPlacementPolicytoLabelPlacementPolicy. -
Removed value
FROM_DESCRIPTOR.PreferredPlacementDescriptors are now automatically considered when specified throughLayoutDatas.-
Renamed value
FROM_MODELtoPREFER_MODEL. -
Renamed value
FROM_PARAMETERtoPREFER_PARAMETER. -
Added value
KEEP_PARAMETER, which suppresses the write-back of label positions to the view graph.
-
Renamed value
-
Replaced
LayoutGraphAdapter.labelPreferredPlacementPolicywithItemMappingLayoutGraphAdapter.labelPlacementPolicies. -
Changed property
PortAdjustmentPolicyofLayoutExecutorclass to anItemMappingportAdjustmentPolicieswhich allows for different values for each port. The default isPortAdjustmentPolicy.LENGTHEN. -
Changed property
PortAdjustmentPolicyofLayoutGraphAdapterclass to anItemMappingportAdjustmentPolicieswhich allows for different values for each port. The default isPortAdjustmentPolicy.LENGTHEN. -
Renamed the
LayoutExecutor.durationproperty toanimationDuration. - Removed the
ContextItemMappingclass. -
The properties
LayoutExecutor.selectionModelandLayoutGraphAdapter.selectionModelhave been removed, meaning that selected items of theIGraphare no longer automatically marked in theLayoutGraphvia keys like the formerLayoutKeys.AFFECTED_NODES_DP_KEY. If the selected items should be marked for a specific key of layout algorithms, then these items can always be provided via the specificLayoutDataproperty of the layout algorithms. -
The
TableLayoutConfigurator.prepareandLayoutExecutor.prepareTableLayoutmethods now return aPartitionGridDatainstance. -
Renamed the
YGraphAdapterclass toStructureGraphAdapter.-
Renamed the
YGraphAdapter.yGraphproperty tostructureGraph. -
Renamed
YGraphAdapter.createEdgeEnumerabletocreateOriginalEdgeList. -
Renamed
YGraphAdapter.createNodeEnumerabletocreateOriginalNodeList. -
Renamed
YGraphAdapter.createEdgeListtocreateCopiedEdgeList. -
Renamed
YGraphAdapter.createNodeListtocreateCopiedNodeList. -
Renamed
YGraphAdapter.createMappertocreateCopiedToOriginalNodeWrapperandcreateCopiedToOriginalEdgeWrapper. -
Renamed
YGraphAdapter.createDataMaptocreateOriginalToCopiedNodeWrapperandcreateOriginalToCopiedEdgeWrapper.
-
Renamed the
-
Removed key
LayoutGraphAdapter.ORIGINAL_TAG_DP_KEY. Use the Tag property of the layout items instead to get the original tag associated to the originalIGraphitems.
Incompatible Behavior Changes
- Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly.
-
The
LayoutGraphAdapterclass 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 theLayoutGraphproperty and initialized with methodLayoutGraphAdapter.initialize. After initialization, changing properties of theLayoutGraphAdapterhas no effect anymore.
Layout
Incompatible API Changes
-
The public constructors of
ItemMappingandItemCollectionhave been removed. Instead the instances returned by theLayoutDataproperties should be used to configure theLayoutData. -
The optional
ItemMappingparameter ofGenericLayoutData.addItemMappinghas been removed. -
The optional
ItemCollectionparameter ofGenericLayoutData.addItemCollectionhas been removed. -
For
GenericLayoutData, the methods toaddanItemMappingor anItemCollectionare now overloads and no longer includeLayoutNode,LayoutEdge, etc in their name. For example, theaddNodeItemCollectionmethod is now namedaddItemCollection. -
LayoutExecutor.abortHandlerwas removed and replaced by the two propertiesLayoutExecutor.stopDurationandLayoutExecutor.cancelDuration. -
OrganicLayout:OrganicLayoutParallelSubstructureStylehas been renamed toOrganicLayoutParallelSubstructureStyle. -
AlignmentStageAlignmentPolicy;SNAP_X_Yhas been renamed toSNAP_XY. -
Renamed the
SubgraphLayoutclass toSubgraphLayoutStageand renamed the respective layout data class fromSubgraphLayoutDatatoSubgraphLayoutStageData. -
Renamed
EdgeBundlingStagetoBundledEdgeRouter. -
Renamed
GivenCoordinatesStagetoGivenCoordinatesLayout. -
Renamed
GivenCoordinatesStageDatatoGivenCoordinatesLayoutData. -
The
OrientationLayoutclass has been renamed toOrientationStage.-
Furthermore, the following methods have been removed from that class:
isOrientationMirrored, Transform,prepareTransform,completeTransform,createOrientedNodeHalo,createOrientedInsetsandcreateOrientedNodeSize.
-
Furthermore, the following methods have been removed from that class:
-
Renamed
BendConvertertoBendSubstitutionStage. -
The
OrientationLayout.horizontalOrientationproperty has been removed. To check for a horizontal orientation, check if Orientation property equalsLayoutOrientation.LEFT_TO_RIGHTorLayoutOrientation.RIGHT_TO_LEFT. -
Renamed
GraphLayoutLineWrappertoLineWrappingStage. -
Renamed
HideGroupsStagetoGroupHidingStage. -
Renamed
TemporaryGroupNodeInsertionStagetoTemporaryGroupInsertionStageand the respective data class fromTemporaryGroupNodeInsertionDatatoTemporaryGroupInsertionData. -
Renamed
BorderLineSideto Side, moved to namespace Layout and renamed its values:NorthtoSide.TOP,EasttoSide.RIGHT,SouthtoSide.BOTTOM, andWesttoSide.LEFT. -
Moved
BorderLineandBorderLineSegmentto namespace Layout. - Removed all methods and properties from the Direction class and converted it to an enum.
-
Removed the
NodeHaloclass. Halos are now specified asInsetsand called node margins. in the correspondingLayoutData(e.g.HierarchicalLayoutData.nodeMargins).-
The properties previously named
nodeHaloshave been renamed tonodeMarginsfor 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.nodeHalotoFromSketchLayerAssigner.nodeMargin. -
Renamed
TemporaryGroupDescriptor.haloto Margins. -
Renamed
NodeHalo.NODE_HALO_DP_KEYtoLayoutKeys.NODE_MARGIN_DATA_KEY.
-
The properties previously named
-
Renamed
LayoutExecutor.targetBoundsInsetstotargetBoundsPadding. -
Renamed
GroupingKeys.GROUP_NODE_INSETS_DP_KEYtoGROUP_NODE_PADDING_DATA_KEYand moved the key toLayoutKeys. -
Renamed
GroupingKeys.MINIMUM_NODE_SIZE_DP_KEYtoLayoutKeys.MINIMUM_GROUP_NODE_SIZE_DATA_KEY. -
Renamed
InsetsGroupBoundsCalculator.defaultInsetstoGroupBoundsCalculator.defaultPaddingandInsetsGroupBoundsCalculator.considerNodeHalostoGroupBoundsCalculator.considerNodeMargins. -
Renamed
TemporaryGroupDescriptor.insetsto Padding. -
Renamed
Graph.reInsertNodeandreInsertEdgetoLayoutGraph.reinsert. -
From
LayoutGraphHider, thefireGraphEventsandGraphproperties, and thehideEdges,hideSelfLoops,simplifyGraph, andhideMultipleEdgesmethods have been removed. Also, all methods to hide and unhide various collections of nodes or edges have been replaced byhideandunhidemethods that get anIEnumerableofLayoutNodeorLayoutEdge. -
PortCalculator,IIntersectionCalculator, andIntersectionCalculatorKeyshave been removed. Instead, theLayoutExecutor.portAdjustmentPolicyproperty should be set to a suitable value. -
Renamed
BorderLine.createMintocreateMinimum. -
Renamed
BorderLine.createMaxtocreateMaximum. -
GraphPartitionManageris removed,LayoutGraphHiderprovides the same functionality. -
The methods
PortCalculator.calculatePortsandPortCalculator.equalsEpshave been removed. -
The following methods have been removed from the
ReverseEdgesStage:ReverseEdgesStage.findReversedTreeEdges,ReverseEdgesStage.reverseEdgeandReverseEdgesStage.reverseEdges. -
Renamed
MirrorModestoMirroredOrientationsandOrientationLayout.mirrorModetoMirroredOrientations. -
The
AbortHandler.checkFailedproperty has been removed. To achieve the same functionality, theLayoutAbortController(new name of theAbortHandler) can be subclassed, overriding itscheckmethod which allows to detect calls to that method. -
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 passednullvalues. -
Replaced properties
xOffsetandyOffsetof thePortCandidateclass by a single propertyoffsetof typePoint. -
The
SequentialLayout.layoutsproperty is now a read-onlyList. The<ILayoutAlgorithm>appendLayout,appendLayouts, andremoveAllmethods have been removed as their functionality is now handled by the list methods. -
PortConstraints andPortCandidates have been unified and renamed toLayoutPortCandidate. -
PortDirectionsandPortSidehave been unified asPortSides, and the enum values of the sides have been renamed. -
PortCandidateSets have been replaced byNodePortCandidates, and collections ofPortCandidates for edges have been replaced byEdgePortCandidates. -
The port-related settings in the
LayoutDataclasses have been combined into a sub-LayoutDataPorts. -
The keys in
PortConstraintKeyshave been moved toLayoutKeys. -
The port-related properties of the layout data classes (
sourcePortGroupIds,targetPortGroupIds,sourcePortCandidates,targetPortCandidates) have been moved to a sub-data accessible via the propertyports. -
The
BufferedLayoutclass has been removed. To apply a layout algorithm on a copy of aLayoutGraphinstance useLayoutGraph.createCopymethod to get a copy, then apply the layout on it and, finally, write back the result usingLayoutGraphCopyData.commitLayoutToOriginalGraph. -
The
CompositeLayoutStageclass has been removed. If a complex composition of layout stages is required, the newLayoutStageStackclass can be used instead. To get anILayoutAlgorithmthat is then applied likeCompositeLayoutStagewas before,LayoutStageStack.linkCoreLayoutsmethod must be called. -
Merged
MinimumSizeGroupBoundsCalculatorandInsetsGroupBoundsCalculatorinto the newGroupBoundsCalculatorclass. -
LayoutMultiplexerhas been removed. The features ofComponentLayout(COMPONENT_LAYOUT_DATA_KEY) orRecursiveGroupLayout(GROUP_NODE_LAYOUT_DATA_KEY) can be used instead. -
The classes
FixPortLocationStageandFixPortLocationStageDatahave been removed from the library. To correct the port locations after applying a layout use thePortPlacementStageclass. -
PortPlacementStage.pathCorrectionhas been replaced byPortPlacementStage.routeCorrectionPolicyof enum typeRouteCorrectionPolicy. -
The
SnapOuterPortsToNodeBorderStageclass has been removed. -
Removed
NormalizeGraphElementOrderStage. UsenodeComparatorandedgeComparatorofLayoutExecutorinstead. -
The classes
ChannelEdgeRouter,OrthogonalPatternEdgeRouterandOrthogonalSegmentDistributionStagehave been removed from the library. Their functionality is superseded by theEdgeRouterrouting algorithm.-
To configure the
EdgeRouterto generate a style that is similar to the removedChannelEdgeRouter, set thestopDurationproperty to zero and use the predefined penalty configurationEdgeRouterCosts.LOW_QUALITY. It is however not compatible with advanced features like integrated edge label placement.
-
To configure the
-
The utility
PortConstraintConfiguratorclass has been removed. -
Removed the classes
PartitionLayoutandPartitionLayoutData. - The
FamilyTreeLayoutclass has been removed. - Removed
SplitEdgeStage. -
The read/write properties
MinimumSizeGroupBoundsCalculator.minimumNodeSizeDpKeyandInsetsGroupBoundsCalculator.groupNodeInsetsDpKeyhave been removed. The bounds calculator classes now always use the values defined via the keysLayoutKeys.MINIMUM_GROUP_NODE_SIZE_DATA_KEYandLayoutKeys.GROUP_NODE_PADDING_DATA_KEY. Using theIGraphAPI, the insets and minimum sizes are registered automatically, so that this change has no effect. -
The read/write properties
SubgraphLayout.affectedNodesDpKeyandSubgraphLayout.affectedEdgesDpKeyhave been removed. They were replaced by static read-only keysSubgraphLayoutStage.SUBGRAPH_NODES_DATA_KEYandSubgraphLayoutStage.SUBGRAPH_EDGES_DATA_KEY. -
Removed
LayoutKeys.NODE_ID_DP_KEYandLayoutKeys.EDGE_ID_DP_KEY. - The
HandleNaNCoordinatesStagehas been removed. -
The
MultiStageLayoutclass 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 newlayoutStagesproperty that allows to access the mutable stack ofILayoutStageinstances associated with the respective algorithm. In addition, the offer different new properties to directly access frequently used stages. -
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
edgeRoutingStyleand those on edge-specific classes have been renamed toRoutingStyle.-
The
EdgeRoutingStyleenum has been renamed toEdgeRouterRoutingStyle. -
The
EdgeRoutingStyleenum has been renamed toSingleLayerSubtreePlacerRoutingStyle. -
The
LayeredRoutingStyleenum has been renamed toLevelAlignedSubtreePlacerRoutingStyle. -
The
EdgeRoutingStrategyenum has been renamed toRadialLayoutRoutingStyle. -
The
EdgeRoutingStrategyenum has been renamed toPartialLayoutRoutingStyle. -
The
EdgeRoutingStyleenum has been renamed toHierarchicalLayoutRoutingStylewhile the oldRoutingStyleclass has been renamed toRoutingStyleDescriptor.
-
The
-
Renamed
AbortHandlertoLayoutAbortController. -
The
maximumDurationproperty is renamed tostopDurationin all public API usages. -
StopDurationsthat were of type long are now of typeTimeSpan. -
StopDurationsnow 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 onLayoutDataclasses but only on theLayoutExecutor. -
Static methods on
LayoutAbortController(formerlyAbortHandler) likegetFromGraphhave been removed since the handler instance can easily be accessed via theLayoutGraphContextwhen working withLayoutGraph. -
The default values of properties
LayoutAbortController.stopDurationandLayoutAbortController.cancelDurationhas been changed fromTimeSpan.ZerotoTimeSpan.MaxValue. Previously,Zerowas interpreted as unlimited time, which is not the case anymore. -
The default value of the algorithm properties
RankAssignment.maximumDurationandNodeAggregation.maximumDuration(now calledstopDuration) has been changed fromTimeSpan.ZerotoTimeSpan.MaxValue. Zero is no longer interpreted as an unrestricted running time but is the shortest possible time. -
Removed public methods
hideGroupNodesandunhideGroupNodesofGroupHidingStage. -
The nested
segmentclass ofBorderLineis now the unnestedBorderLineSegmentclass, and some of its members have been changed:-
Renamed
growtoenlarge,addOffsettoaddPositionOffset,mintominPositionandmaxtomaxPosition. -
Removed the
BorderLine.adoptValuesmethod. -
Converted
BorderLine.firstSegment,BorderLine.lastSegment,BorderLine.Segment.PrevandBorderLine.Segment.Nextfrom methods to read-only properties, and renamedprevto Previous. -
Removed
BorderLine.prevandBorderLine.next. Use methodsBorderLineSegment.previousandBorderLineSegment.nextinstead.
-
Renamed
- Removed the class
Maps. -
Layout data properties that are meant for publishing results now contain the word
Resultin their name: RenamedCircularLayoutData.circleIdstoCircularLayoutData.circleIdsResult,HierarchicLayoutData.layerIndicestoHierarchicalLayoutData.layerIndicesResult,HierarchicLayoutData.sequenceIndicestoHierarchicalLayoutData.sequenceIndicesResult,OrganicLayoutData.zCoordinatestoOrganicLayoutData.zCoordinatesResult,RadialLayoutData.nodeInfostoRadialLayoutData.nodePlacementsResult, andParallelEdgeRouterData.routedParallelEdgestoParallelEdgeRouterData.routedMultiEdgesResult.-
They are now all made readonly and initialized with an
IMapperinstance.
-
They are now all made readonly and initialized with an
-
Updated the constructor of
DpKeyBaseand subclasses to accept a single string parameter 'ID' for unique identification.-
Removed properties
DpKeyBase.declaringTypeandDpKeyBase.name. - Made
DpKeyBaseclass abstract.
-
Removed properties
-
The
TemporaryGroupDescriptorused byTemporaryGroupInsertionStageclass to define temporary group nodes now does not allow that propertiesInsets,minimumSizeandmargins(formerlyHalo) arenullanymore. Previously this was the default which is nowInsets.EMPTY,Size.EMPTYandInsets.EMPTY, meaning that the behavior does not change. -
The
CopiedLayoutGraphclass was removed from the API. To create a copy of a layout graph, the new factoryLayoutGraph.createCopymethod may be used. - Methods and and properties with "BoundingBox" in their name have been renamed to include "Bounds" instead.
-
Removed the
YPointPathclass. Instead of this class an array or more generally anIEnumerableof typePoint[] is now used in API members.-
Changed value to of
HierarchicLayout.ALTERNATIVE_EDGE_PATH_DP_KEY,ClearAreaLayout.EXPANDED_NODE_ORIGINAL_EDGE_PATH_DP_KEYandGivenCoordinatesStage.EDGE_PATH_DP_KEYtoIEnumerable.<Point> -
Changed
EdgeRouterBusDescriptorpropertiesbusPointsandcomputedBusPointsto typePoint[].
-
Changed value to of
-
Removed the
IDataProviderinterface and refactored the whole way data is registered with aLayoutGraphinstance. The replacement ofIDataProvideris the genericIMapperinterface. It allows setting and getting data via an indexer.-
Removed the methods
Graph.addDataProviderandremoveDataProvider. Data is now registered and removed using the methods on the newLayoutGraphContextclass (e.g.addItemData,addData,remove). -
Removed the
Graph.dataProviderKeysproperty.
-
Removed the methods
-
Removed the look-up keys
GroupingKeys.GROUP_DP_KEY,GroupingKeys.NODE_ID_DP_KEYandGroupingKeys.PARENT_NODE_ID_DP_KEYwhich were necessary to define grouping information forLayoutGraphinstances. This can now be achieved via the helperLayoutGraphGroupingclass or directly via instance methods such asLayoutGraph.setIsGroupNode. -
The
GraphDpKeyclass was replaced byValueDataKey. -
Removed the
GraphTransformerclass; use factory methods fromLayoutTransformationsclass instead to create stages that apply transformation operations on aLayoutGraph. -
Replaced usages of the
IComparerinterface withComparisonfunction delegates. -
Removed the
LayoutGraphUtilitiesclass. The newLayoutEdge.resetPathmethod replacesLayoutGraphUtilities.resetPathmethod. The newParallelEdgeRouter.routeEdgesParallelmethod replacesLayoutGraphUtilities.routeEdgesParallelmethod. -
Methods
LayoutGraphUtilities.getBoundingBoxwere combined to one more general, moved toLayoutGraphclass and made an instance method.
Incompatible Behavior Changes
-
Method
LayoutGraph.reverseEdgenow reverses the edge path too. To exchange only source and target of an edge useLayoutGraph.changeEdgemethod.
Layout Data
Incompatible API Changes
-
The type
SingleItemwas removed. Affected properties use<TItem>ItemCollectioninstead.<TItem> -
Properties of type
ItemMappinginLayoutDataclasses are now named using plural consistently. -
The value type of properties
HierarchicalLayoutData.layerIndicesResult,HierarchicalLayoutData.sequenceIndicesResult,HierarchicalLayoutData.givenLayersIndices,RadialLayoutData.layerIdsandCircularLayoutData.circleIdsResulthas 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.LAYER_INDEX_RESULT_DATA_KEY,HierarchicalLayout.SEQUENCE_INDEX_RESULT_DATA_KEY,GivenLayersAssigner.LAYER_INDEX_DATA_KEY,RadialLayout.LAYER_ID_DATA_KEYandCircularLayout.CIRCLE_ID_RESULT_DATA_KEYhas been changed from number to a nullable number value. Null as value means that the nothing was published for an item.
Hierarchical Layout
Incompatible API Changes
-
The
DefaultDrawingDistanceCalculator.optimizeSwimlaneDistancesproperty has been removed. The behavior does not change and is the same as the old default where the property was disabled. OverrideDrawingDistanceCalculator.getMinimumDistancemethod and assign zero to nodes that are in different rows/columns to get the same behavior as when previously enabling the property. -
Property
SimplexNodePlacer.swimLaneCrossingWeighthas been renamed tolayoutGridCrossingWeight. Note that the class has been renamed toCoordinateAssigner. - Removed
groupCompactionStrategy. -
Renamed
SimplexNodePlacer.groupCompactionStrategytogroupCompactionand changed its type to boolean. -
In the sub-data
SequenceConstraintDataof theHierarchicalLayoutDataplaceBeforeandplaceAfterwere replaced byPlaceInOrder. -
In the sub-data
LayerConstraintDataof theHierarchicalLayoutDataplaceAboveandplaceBelowwere replaced byPlaceInOrder. -
HierarchicalLayout.gridSpacing: made grid spacing behavior consistent across all layouts by throwing an exception for negative values. -
NodeLayoutDescriptor.nodeLabelModewas 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
NodeLabelModeenum was removed. -
Renamed
LayerTypetoHierarchicalLayoutLayerType. -
Renamed
DefaultLayerSequencertoDefaultSequencer. -
Renamed all types, methods, properties, and namespaces containing "hierarchic" to
"hierarchical" including
HierarchicLayout, which is renamed toHierarchicalLayout. -
Moved
HierarchicLayout.stopAfterLayering/Sequencing toHierarchicalLayoutCore. -
Replaced
HierarchicLayoutpropertiesBackLoopRouting&backLoopRoutingForSelfLoopswithHierarchicalLayoutEdgeDescriptor.backLoopRouting, where it can now be specified per edge (HierarchicalLayoutData.edgeDescriptors) or for all edges at once (HierarchicalLayout.defaultEdgeDescriptor). -
Removed properties
sourcePortOptimizationandtargetPortOptimizationfromHierarchicalLayoutEdgeDescriptorclass. -
LayerConstraintDatano longer inherits fromLayoutData. -
SequenceConstraintDatano longer inherits fromLayoutData. -
Renamed
IPortAllocatortoIHierarchicalLayoutPortAssigner. -
Renamed
DefaultPortAllocatortoHierarchicalLayoutPortAssigner. -
Separated
HierarchicLayout.INCREMENTAL_HINTS_DP_KEYinINCREMENTAL_NODE_HINTS_DATA_KEYandINCREMENTAL_EDGE_HINTS_DATA_KEY. -
Separated enum
IncrementalHintinIncrementalNodeHintfor nodes andIncrementalEdgeHintfor edges. -
Separated
HierarchicLayoutData.incrementalHintsinHierarchicalLayoutData.incrementalNodesandHierarchicalLayoutData.incrementalEdges.incrementalNodesnow 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. -
Renamed the
DefaultDrawingDistanceCalculator.nodeToNodeDistanceproperty toDrawingDistanceCalculator.nodeDistance. -
Renamed the
DefaultDrawingDistanceCalculator.edgeToEdgeDistanceproperty toDrawingDistanceCalculator.edgeDistance. -
Renamed the
HierarchicLayout.nodeToNodeDistanceproperty tonodeDistance. -
Renamed the
HierarchicLayout.edgeToEdgeDistanceproperty toedgeDistance. -
Renamed
EdgeLayoutDescriptortoHierarchicalLayoutEdgeDescriptor. -
Renamed
HierarchicLayout.edgeLayoutDescriptortodefaultEdgeDescriptor. -
Renamed and moved
HierarchicLayoutCore.EDGE_LAYOUT_DESCRIPTOR_DP_KEYtoHierarchicalLayout.EDGE_DESCRIPTOR_DATA_KEY. -
Renamed
HierarchicLayoutData.edgeLayoutDescriptorstoedgeDescriptors. -
Renamed
NodeLayoutDescriptortoHierarchicalLayoutNodeDescriptor. -
Renamed
HierarchicLayout.nodeLayoutDescriptortodefaultNodeDescriptor. -
Renamed and moved
HierarchicLayoutCore.NODE_LAYOUT_DESCRIPTOR_DP_KEYtoHierarchicalLayout.NODE_DESCRIPTOR_DATA_KEY. -
Renamed
HierarchicLayoutData.nodeLayoutDescriptorstonodeDescriptors. -
Renamed "Layerer" to "LayerAssigner" in the following types and members;
-
Renamed
ILayerertoILayerAssigner. -
Moved
HierarchicLayout.fixedElementsLayerertoHierarchicalLayoutCoreand renamed tofixedElementsLayerAssigner. -
Moved
HierarchicLayout.fromScratchLayerertoHierarchicalLayoutCoreand renamed tofromScratchLayerAssigner. -
Renamed
WeightedLayerertoWeightedLayerAssigner. -
Renamed
ConstraintIncrementalLayerertoConstraintIncrementalLayerAssigner. -
Renamed
MultiComponentLayerertoMultiComponentLayerAssigner. -
Renamed
MultiComponentLayerer.singleComponentLayerertosingleComponentLayerAssigner. -
Renamed
AspectRatioComponentLayerer.singleComponentLayerertosingleComponentLayerAssigner. -
Renamed
TopologicalLayerertoTopologicalLayerAssigner. -
Renamed
AspectRatioComponentLayerertoAspectRatioComponentLayerAssigner. -
Renamed
BFSLayerertoBfsLayerAssigner. -
Renamed
GivenLayersLayerertoGivenLayersAssigner. -
Renamed
HierarchicLayoutCore.createIncrementalLayerertocreateIncrementalLayerAssigner. -
Renamed
HierarchicLayoutData.bfsLayererCoreNodestobfsLayerAssignerCoreNodes. -
Renamed
AsIsLayerertoFromSketchLayerAssigner.
-
Renamed
-
Renamed
GivenLayersLayerer.LAYER_ID_DP_KEYtoLAYER_INDEX_DATA_KEY. -
Renamed
HierarchicLayoutData.givenLayersLayererIdstogivenLayersIndices. -
Removed
HierarchicLayoutData.constraintIncrementalLayererAdditionalEdgeWeights. -
Renamed
AsIsSequencertoFromSketchSequencer. -
Renamed
SimplexNodePlacer.barycenterModetoSymmetryOptimizationStrategyand changed its type toSymmetryOptimizationStrategy. It now supports performing strong, weak and no additional symmetry optimization. -
Refactored the enum
HierarchicLayout.layoutModeproperty into a booleanfromSketchModeproperty and removed theLayoutModeenum. -
The
IEdgeReverserinterface and theHierarchicLayoutCore.createEdgeReversermethod have been removed. -
The
NodeLayoutDescriptorclass of theHierarchicLayoutalgorithm, which was renamed toHierarchicalLayoutNodeDescriptor, does no longer allow to specify the border-to-port gap ratios individually for each node side. TheborderToPortGapRatioproperty now defines the value for all four node sides. -
EdgeRouterBusDescriptoris renamed toGridComponentDescriptor. -
HierarchicLayout.BUS_DESCRIPTOR_DP_KEYis renamed toGRID_COMPONENT_DESCRIPTOR_DATA_KEY. -
HierarchicLayoutData.busesis renamed togridComponents. -
HierarchicLayoutData.busRootOffsetsis renamed togridComponentRootOffsets. -
NodeDataType.BUS_STRUCTURE_DUMMYis renamed toGRID_COMPONENT_BUS_NODE. -
Replaced
INodeDatainterface withHierarchicalLayoutNodeContextclass.-
Renamed
INodeData.groupIdtoHierarchicalLayoutNodeContext.edgeGroupId. -
Removed the
INodeData.parentGroupNodeproperty.
-
Renamed
-
Replaced
IEdgeDatainterface withHierarchicalLayoutEdgeContextclass.-
IEdgeData.typeis read-only on the newHierarchicalLayoutEdgeContext. -
The following
IEdgeDataproperties now offer read and write access on the newHierarchicalLayoutEdgeContext:sourceGroup,targetGroup,sourcePortGroup,targetPortGroup,sourcePortCandidates,targetPortCandidates,thickness,crossingCost,criticalEdgePriority,sourcePortAlignment,targetPortAlignment. -
Renamed
IEdgeData.sourcePortConstraintandtargetPortConstrainttoselectedSourcePortCandidateandselectedTargetPortCandidaterespectively. Bot properties now offer read and write access. - Removed the
IEdgeData.groupproperty.
-
-
Replaced
ILayerinterface withHierarchicalLayoutLayerclass. -
Renamed the
ILayer.listproperty toHierarchicalLayoutLayerclass.Nodes. -
Replaced
ILayersinterface with a list ofHierarchicalLayoutLayerinstances accessible viaHierarchicalLayoutContext.layersproperty.-
Methods
HierarchicalLayoutContext.insertLayerandremoveLayerare replacements for theILayers.insertandILayers.removemethods.
-
Methods
-
Replaced
IItemFactoryinterface withItemFactoryclass. Several of the factory methods have also been removed or renamed.-
createDummyEdgehas been renamed tocreateHelperEdge. -
CreateProxyNodehas been renamed tocreateSideProxyNodeanddestroyProxyNodetodestroySideProxyNode. -
createSameLayerProxyhas been renamed tocreateSameLayerProxyEdgeanddestroySameLayerProxytodestroySameLayerProxyEdge. -
setTemporaryEdgeGroupshas been renamed tocreateGroupedEdgeContext. -
setTemporaryCriticalEdgePriorityhas been removed. -
setTemporaryCrossingCosthas been removed. -
setTemporaryEdgeThicknesshas been removed. -
setTemporaryPortConstrainthas been removed.
-
-
EdgeDataType.REDIRECTED_GROUP_EDGEhas been removed. -
The
ILayoutDataProviderinterface is removed and its functionality is moved toHierarchicalLayoutContext. -
The
ILayersinterface is moved to theHierarchicalLayoutContext, and methods that acceptedILayersas a parameter instead acceptHierarchicalLayoutContextnow. -
The
IItemFactoryinterface is moved to theHierarchicalLayoutContext, and methods that acceptedIItemFactoryas a parameter instead acceptHierarchicalLayoutContextnow. -
Names containing
PortBorderGapwere renamed to now containBorderToPortGapRatio. -
Properties
HierarchicLayout.recursiveGroupLayeringandHierarchicLayout.compactGroupsare combined intoHierarchicalLayout.groupLayeringPolicy. -
Methods
ConstraintIncrementalLayerer.checkConstraints,GivenLayersLayerer.normalizehave been removed. -
The protected callback methods
getLayerAlignmentandassignNodesToSublayerhave been removed from theCoordinateAssignerclass (formerly calledSimplexNodePlacer). Furthermore, itsgetMinDistancemethod has been renamed togetMinimumDistance. -
The
IDrawingDistanceCalculator.getMinDistancemethod has been renamed togetMinimumDistance. -
Renamed
NodeDataTypetoHierarchicalLayoutNodeTypeand its valueNormaltoHierarchicalLayoutNodeType.REGULAR. -
Renamed
EdgeDataTypetoHierarchicalLayoutEdgeTypeand its valueNormaltoHierarchicalLayoutEdgeType.REGULAR. -
Renamed
LayerType.NORMALtoHierarchicalLayoutLayerType.REGULAR. -
Renamed
MergingPolicytoLayerMergingPolicy. -
Renamed
RankingPolicytoLayerRerankingPolicyandTopologicalLayerer.rankingPolicytorerankingPolicy. -
Renamed
WeightHeuristictoSequencerWeightHeuristic. -
The
HierarchicLayout.orthogonalRoutingproperty has been removed. To specify orthogonal or other routing styles, the routing style on theHierarchicalLayoutEdgeDescriptormust be used instead. -
IPortConstraintOptimizerhas been renamed toIPortCandidateSelector, and its methods have been renamed fromoptimizeAfterLayeringandoptimizeAfterSequencingForSingleNodetoselectAfterLayeringandIPortCandidateSelector.selectAfterSequencing. PortConstraintOptimizerBasehas been removed.-
PortCandidateOptimizerhas been renamed toPortCandidateSelectorand its properties have been renamed:backLoopPenaltytobackLoopCost,crossingPenaltytocrossingCost, andoverUsagePenaltytooverUsageCost. -
The
IPortCandidateMatcherinterface has been removed. For an advanced customization of the port selection consider implementing a customIPortCandidateSelector. -
The
INodePlacerinterface of the hierarchic layout has been renamed toICoordinateAssigner. Its implementation has been renamed fromSimplexNodePlacertoCoordinateAssigner. -
The
HierarchicLayout.separateLayersproperty has been moved toCoordinateAssigner.separateLayers, since it has always only worked when using that implementation. -
The
groupTranspositionproperty has been removed fromDefaultLayerSequencerclass. The Transposition property should now be used for groups too. -
The
TypeBasedDrawingDistanceCalculatorclass has been removed. -
The classes
ILayeredComponentsMergerandDefaultLayeredComponentsMergerhave been removed. The functionality is integrated into theMultiComponentLayerer, which now offers a newmergingPolicyproperty and protected methodmergefor the case that a custom merging approach is required. -
The
HierarchicLayoutCoreclass is not a standalone layout algorithm anymore but now offers only access to more advanced features of theHierarchicLayoutclass.-
All public data keys were moved to the
HierarchicLayoutclass. - The protected API of both classes was reduced, but still even highly advanced customization are possible.
-
All public data keys were moved to the
-
Property
HierarchicLayoutData.selfLoopCalculatorDatawas removed. Settings like minimum lengths for self-loop edges are specified via theHierarchicalLayoutEdgeDescriptorclass like for normal edges. -
The
SelfLoopCalculatorandSelfLoopCalculatorDataclasses was removed from the API. -
The protected methods
DefaultPortAllocator.getPortBorderGap,DefaultPortAllocator.getPortBorderGapRatio, andDefaultPortAllocator.getPortDistanceDeltawere removed. -
Removed members
HierarchicLayout.createLayerConstraintFactory,HierarchicLayoutData.layerConstraintFactory,HierarchicLayout.createSequenceConstraintFactoryandHierarchicLayoutData.sequenceConstraintFactory. The factories are no longer required to define layering and sequence constraints.-
The recommended way is to use properties
HierarchicLayoutData.layerConstraintsandHierarchicLayoutData.sequenceConstraints. -
For expert uses cases (e.g. algorithm customization), the low-level helper
classes
LayoutGraphLayerConstraintsandLayoutGraphSequenceConstraintswere added.
-
The recommended way is to use properties
-
Removed the keys
HierarchicLayout.LAYER_CONSTRAINTS_MEMENTO_DP_KEYandHierarchicLayout.SEQUENCE_CONSTRAINTS_MEMENTO_DP_KEY. -
Class
TopLevelGroupToSwimlaneStagehas been removed from the library. -
The obsolete extension methods
createLayerConstraintFactoryandcreateSequenceConstraintFactoryhave been removed fromHierarchicLayout. To specify layer and sequence constraints, useLayoutDatainstead.
Incompatible Behavior Changes
-
The
HierarchicalLayoutnow considers node labels by default. -
The
HierarchicalLayoutnow places edge labels by default using an integrated labeling algorithm. -
Changed the default edge routing style of the
HierarchicalLayoutclass from Polyline to Orthogonal.
Tree Layout
Incompatible API Changes
-
The
TreeLayout.graphfield has been removed. For customizations in theTreeLayoutthe graph is available whatsoever and can if required be queried from the node/edge items.-
Method
TreeLayout.layoutRootnow has an additional parameter of typeLayoutGraphas its first argument.
-
Method
-
The
GridNodePlacer.automaticRowAssignmentproperty (now renamed toMultiLayerSubtreePlacer) was removed. The layers are now always automatically assigned if no layer indices are defined viaTreeLayoutData.multiLayerSubtreePlacerLayerIndices. -
Removed the
LayeredNodePlacer.idproperty (class was also renamed toLevelAlignedSubtreePlacer). The ID can still be provided via the constructor. Reading it later should never be necessary. -
Renamed
ConnectorDirectiontoSubtreeConnectorDirection, and the valuesNorthtoSubtreeConnectorDirection.UP,EasttoSubtreeConnectorDirection.RIGHT,SouthtoSubtreeConnectorDirection.DOWN, andWesttoSubtreeConnectorDirection.LEFT. -
Renamed the values of
ParentConnectorDirection:NorthtoParentConnectorDirection.UP,EasttoParentConnectorDirection.RIGHT,SouthtoParentConnectorDirection.DOWN, andWesttoParentConnectorDirection.LEFT. -
Renamed
IProcessortoISubtreePlacerProcessor. -
DelegatingNodePlacernow implementsISubtreePlacerinstead ofIFromSketchNodePlacer. -
BusNodePlacernow implementsISubtreePlacerinstead ofIFromSketchNodePlacer. -
Replaced
RotatableNodePlacerMatrixwith theSubtreeTransformenum and renamed constants:-
RotatableNodePlacerMatrix.DEFAULTtoSubtreeTransform.NONE. -
RotatableNodePlacerMatrix.MIR_HORtoSubtreeTransform.FLIP_Y. -
RotatableNodePlacerMatrix.MIR_VERTtoSubtreeTransform.FLIP_X. -
RotatableNodePlacerMatrix.ROT90toSubtreeTransform.ROTATE_LEFT. -
RotatableNodePlacerMatrix.ROT180toSubtreeTransform.ROTATE_180. -
RotatableNodePlacerMatrix.ROT270toSubtreeTransform.ROTATE_RIGHT. -
RotatableNodePlacerMatrix.MIR_VERT_ROT90toSubtreeTransform.ROTATE_RIGHT_FLIP_Y. -
RotatableNodePlacerMatrix.MIR_HOR_ROT90toSubtreeTransform.ROTATE_LEFT_FLIP_Y.
-
-
Renamed "NodePlacer" to "SubtreePlacer" in the following types and members:
-
Renamed the
DefaultNodePlacerclass toSingleLayerSubtreePlacer. -
Renamed the
DelegatingNodePlacerclass toSingleSplitSubtreePlacer. -
Renamed the
DoubleLineNodePlacerclass toDoubleLayerSubtreePlacer. -
Renamed the
FreeNodePlacerclass toFixedSubtreePlacer. -
Renamed the
GridNodePlacerclass toMultiLayerSubtreePlacer. -
Renamed the
GroupedNodePlacerclass toMultiSplitSubtreePlacer. The class now considers port grouping (useTreeLayoutData.ports) to define how child nodes are split. -
Renamed the
LayeredNodePlacerclass toLevelAlignedSubtreePlacer. -
Renamed the
TreeLayout.defaultNodePlacerproperty todefaultSubtreePlacer. -
Renamed the
TreeLayoutData.delegatingNodePlacerPrimaryNodesproperty tosingleSplitSubtreePlacerPrimaryNodes. -
Renamed the
TreeLayoutData.gridNodePlacerRowIndicesproperty tomultiLayerSubtreePlacerLayerIndices.
-
Renamed the
-
Renamed the property
RoutingStyle.PolylinetoSingleLayerSubtreePlacerRoutingStyle.STRAIGHT_LINE_TO_CHILD_CONNECTOR,RoutingStyle.FORKproperty toSingleLayerSubtreePlacerRoutingStyle.ORTHOGONAL, andRoutingStyle.FORK_AT_ROOTproperty toSingleLayerSubtreePlacerRoutingStyle.ORTHOGONAL_AT_ROOT. -
Added
SingleLayerSubtreePlacerRoutingStyle.POLYLINEproperty which leads to a polyline routing style. -
Removed the
TreeLayout.defaultLeafPlacerproperty as well asLeafNodePlacerclass. -
Removed the
SimpleNodePlacerclass; usedefaultSubtreePlacerclass instead. -
Replaced
DefaultNodePlacer.childPlacementproperty with the newSingleLayerSubtreePlacer.transformationproperty. The formerChildPlacement.HORIZONTAL_DOWNWARDvalue now maps toSubtreeTransform.NONE,ChildPlacement.HORIZONTAL_UPWARDtoSubtreeTransform.FLIP_Y,ChildPlacement.VERTICAL_TO_LEFTtoSubtreeTransform.ROTATE_RIGHT, andChildPlacement.VERTICAL_TO_RIGHTtoSubtreeTransform.ROTATE_LEFT_FLIP_Y. -
Renamed
RootNodeAlignment.CENTER_OVER_CHILDRENtoSubtreeRootAlignment.CENTER_OF_CHILDREN. -
Renamed
RootNodeAlignment.LEADINGtoSubtreeRootAlignment.LEFT,RootNodeAlignment.TRAILINGtoSubtreeRootAlignment.RIGHT,RootAlignment.LEADING_OFFSETtoSubtreeRootAlignment.LEADING, andRootAlignment.TRAILING_OFFSETtoSubtreeRootAlignment.TRAILING. -
Renamed
IPortAssignmenttoITreeLayoutPortAssigner. -
Renamed
DefaultPortAssignmenttoTreeLayoutPortAssigner. -
Renamed
TreeLayout.PORT_ASSIGNMENT_DP_KEYtoPORT_ASSIGNER_DATA_KEY. -
Renamed
TreeLayoutData.portAssignmentstoportAssigners. -
Removed the
NodePlacerBaseclass. ImplementISubtreePlacerinterface instead. -
Removed the method
PlaceSubtree(LayoutNode,ParentConnectorDirection) of former subclasses ofNodePlacerBaseclass. OverrideplaceSubtreemethod(IMapper<Node,SubtreeShape>,IMapper<Node,SubtreeShape>,LayoutGraph, Node) instead. -
Removed the
determineChildConnectormethod of former subclasses ofNodePlacerBaseclass. OverridedetermineChildConnectorsmethod instead. -
Removed the methods
getNodeShapeandgetSubtreeShapefrom former subclasses ofNodePlacerBaseclass. - Renamed all types, methods and properties containing "NodePlacer" to "SubtreePlacer".
-
Renamed
TreeLayout.multiParentAllowedtoallowMultiParent. -
Renamed
TreeReductionStage.multiParentAllowedtoallowMultiParent. -
The
TreeReductionStage.nonTreeEdgeLabelingAlgorithmproperty has been renamed tononTreeEdgeLabeling. -
Remove methods
getPortBorderGapandgetPortDistanceDeltafrom theDefaultPortAssignment(renamed toTreeLayoutPortAssigner) class. -
The
DefaultPortAssignment.borderGapToPortGapRatioproperty was renamed toborderToPortGapRatio. -
TreeLayoutPortAssignmentModevaluePortConstrainthas been removed. Port candidates are always considered if they are specified. -
TreeLayoutPortAssignmentModevaluesDISTRIBUTED_EAST,DISTRIBUTED_WEST,DISTRIBUTED_NORTH,DISTRIBUTED_SOUTHhave been replaced by valueDISTRIBUTED. The side can be specified by usingTreeLayoutData.ports. -
Tree.PortAssignmentMode.Nonehas been renamedTree.PortAssignmentMode.Center. -
TreeLayout.getPortAssignmentcan no longer be overridden. To specifyIPortAssignmentstrategies per node,TreeLayoutData.portAssignerscan be used. -
TreeLayout.getNodePlacercan no longer be overridden. To specifynodePlacerstrategies per node,TreeLayoutData.subtreePlacerscan be used. -
The following methods of
TreeLayouthave been removed:ReverseEdges.getRootsArray.-
getOutEdgeComparer-TreeLayoutData.childOrdercan be used instead. -
createNodeShape-modifyNodeShapecan be used instead to modify the shape. -
directTree-TreeLayoutData.treeRootcan be used to accomplish the same result.
-
DefaultNodePlacer.calculateParentConnectorhas been removed. Custom implementations can be inlined at the end ofplaceSubtree. -
SubtreeShape.addBoundsToShapeaccepts a singleRectparameter instead of its deconstructed values. -
SubtreeShape.assignValuesTohas been removed -createCopycan be used instead. -
Renamed
FillStyletoAspectRatioChildAlignmentPolicyandAspectRatioNodePlacer.fillStyletoChildAlignmentPolicy. -
The API of the node placer implementations has been simplified and improved. The
INodePlacerinterface 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.
-
The properties
TreeLayout.sourcePortConstraintDataAcceptorandTreeLayout.targetPortConstraintDataAcceptorhave been removed. -
The properties
TreeLayout.sourceGroupDataAcceptor
andTreeLayout.targetGroupDataAcceptorhave been removed. - The
TreeComponentLayoutclass has been removed. -
The factory
TreeReductionStage.createStraightLineRoutermethod has been removed. The standalone routerStraightLineEdgeRouterclass should be used instead when straight-line edges are required. -
The
AspectRatioTreeLayouthas been removed together withAspectRatioTreeLayoutData,RootPlacement, andSubtreeArrangement. Use theTreeLayoutwith theAspectRatioSubtreePlacerinstead. -
The
ClassicTreeLayouthas been removed together with the enumsLeafPlacement,EdgeRoutingStyle, andPortStyle. TheTreeLayoutcan be used instead. -
Renamed
TreeLayoutData.outEdgeComparerstoTreeLayoutData.childOrderand changed the types to Comparison function. -
Removed
TreeLayout.defaultOutEdgeComparer. UseTreeLayoutData.childOrderinstead. Also removedNodeOrderComparerclass. -
All layouts suitable for trees, such as
TreeLayout,RadialTreeLayout, now default to using theTreeReductionStageto temporarily remove non-tree edges from the graph during layout calculation. -
Replaced
TreeLayoutData.outEdgeComparersproperty with new, more powerfulchildOrderproperty.
Incompatible Behavior Changes
-
The
TreeLayoutnow considers node labels by default. -
The
TreeLayoutnow places edge labels by default using an integrated labeling algorithm. - Port candidates are always considered if they are specified.
Orthogonal Layout
Incompatible API Changes
-
Renamed
ChainLayoutStyletoOrthogonalLayoutChainSubstructureStyle. -
Renamed
CycleLayoutStyletoOrthogonalLayoutCycleSubstructureStyle. -
Renamed
TreeLayoutStyletoOrthogonalLayoutTreeSubstructureStyle. -
Renamed
EdgeLayoutDescriptortoOrthogonalLayoutEdgeDescriptor. -
Renamed
OrthogonalLayout.edgeLayoutDescriptortodefaultEdgeDescriptor. -
Renamed
OrthogonalLayout.EDGE_LAYOUT_DESCRIPTOR_DP_KEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
OrthogonalLayoutData.edgeLayoutDescriptorstoedgeDescriptors. -
The
LayoutStyleenum (belonging to theOrthogonalLayout) has been renamed toOrthogonalLayoutMode. Furthermore, the new values are Strict (former Default),FORCED_STRAIGHT_LINE(former Box) , and Relaxed (formerFIXED_MIXED). The former values Uniform,FIXED_BOX, and Mixed have been removed from the enum. -
The
OrthogonalLayoutproperties related to substructures have all been renamed to contain "substructure" in their name.chainStyle,chainSize,treeStyle,treeSize,treeOrientation,cycleStyle,cycleSizeare now calledOrthogonalLayoutChainSubstructureStyle,chainSubstructureSize,OrthogonalLayoutTreeSubstructureStyle,treeSubstructureSize,treeSubstructureOrientation,OrthogonalLayoutCycleSubstructureStyle,cycleSubstructureSize. -
The following properties have been removed from the
OrthogonalLayoutclass: Randomization,crossingReduction,edgeLengthReduction,optimizePerceivedBendsandfaceMaximization. Use the newqualityTimeRatioproperty instead. -
The
DirectedEdgesproperties ofOrthogonalLayoutDataandPartialLayoutDataare now both of typeItemMappingwith the nameedgeOrientationand support floating-point values to also specify edges oriented against the main layout direction. -
EdgeDirectednessDpKeyon all supportingILayoutAlgorithms have been combined into a global data keyLayoutKeys.EDGE_DIRECTEDNESS_DATA_KEY. -
PartialLayout.DIRECTED_EDGES_DP_KEYis renamed toEDGE_ORIENTATION_DATA_KEYand now also allows specifying edges should be routed against the main layout orientation. - Removed the
CompactOrthogonalLayoutclass.
Incompatible Behavior Changes
-
The
OrthogonalLayoutnow considers node labels by default. -
The
OrthogonalLayoutnow places edge labels by default using an integrated labeling algorithm.
Edge Router
Incompatible API Changes
-
The
monotonicPathRestrictionenum is now a flags enum and is calledMonotonicPathRestrictions. -
The
SelfLoopRouter.smartSelfLoopPlacementproperty 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, theSelfLoopRoutercan be applied in a separate post-processing step where only self-loops are present in the graph (useSubgraphLayoutStage). -
The
ParallelEdgeRouter.absJoinEndDistanceproperty has been renamed toabsoluteJoinEndDistance. -
The
ParallelEdgeRouter.relJoinEndDistanceproperty has been renamed torelativeJoinEndDistanceFactor, and its default value now is 0. -
The
ParallelEdgeRouter.lineDistanceproperty has been renamed toedgeDistance. -
The
SelfLoopRouter.lineDistanceproperty has been renamed toedgeDistance. -
The type of
intermediateRoutingPointsproperty has been changed fromIListtoIEnumerable. -
Renamed
ParallelEdgeRouter.ROUTED_PARALLEL_EDGES_DP_KEYtoROUTED_MULTI_EDGES_RESULT_DATA_KEY. -
Renamed
ParallelEdgeRouter.findAndHideParallelEdgestofindAndHideMultiEdges. -
Renamed
ParallelEdgeRouterData.routedParallelEdgestoroutedMultiEdgesResult. -
Renamed the
CurveEdgeLayoutDescriptor.minimumEdgeToEdgeDistanceproperty tominimumEdgeDistance. -
Renamed the
EdgeLayoutDescriptor.minimumEdgeToEdgeDistanceproperty (EdgeRouter) tominimumEdgeDistance. -
Renamed the
PenaltySettings.minimumEdgeToEdgeDistancePenaltyproperty toEdgeRouterCosts.minimumEdgeDistanceCost. -
EdgeRouter.gridhas been replaced byEdgeRouter.gridSpacing. - The class
Gridhas been removed. -
Renamed
EdgeLayoutDescriptortoEdgeRouterEdgeDescriptor. -
Renamed
CurveEdgeLayoutDescriptortoCurveRoutingEdgeDescriptor. -
Renamed
EdgeRouter.EDGE_LAYOUT_DESCRIPTOR_DP_KEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
EdgeRouter.defaultEdgeLayoutDescriptortodefaultEdgeDescriptor. -
Renamed
EdgeRouter.getEdgeLayoutDescriptortogetEdgeDescriptor. -
Renamed
EdgeRouterData.edgeLayoutDescriptorstoedgeDescriptors. -
Renamed
PathSearchContext.currentEdgeLayoutDescriptortocurrentEdgeDescriptor. -
Renamed
CurveRoutingStage.defaultEdgeLayoutDescriptortodefaultEdgeDescriptor. -
Renamed
CurveRoutingStage.CURVE_EDGE_LAYOUT_DESCRIPTOR_DP_KEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
CurveRoutingStageData.edgeLayoutDescriptorstoedgeDescriptors. -
Renamed
Interval.mintoInterval.minimum. -
Renamed
Interval.maxtoInterval.maximum. -
Renamed
OrthogonalInterval.mintoOrthogonalInterval.minimum. -
Renamed
OrthogonalInterval.maxtoOrthogonalInterval.maximum. -
Renamed
PenaltySettingstoEdgeRouterCosts.-
Renamed the related
EdgeLayoutDescriptor.penaltySettingsproperty toEdgeRouterCosts. -
Renamed all its properties to
XyzCostinstead ofXyzPenalty:sketchViolationPenaltytosketchViolationCost,edgeLengthPenaltytoedgeLengthCost,bendPenaltytobendCost,edgeCrossingPenaltytoedgeCrossingCost,adjacentEdgeCrossingPenaltytoadjacentEdgeCrossingCost,selfCrossingPenaltytoselfCrossingCost,nodeCrossingPenaltytonodeCrossingCost,portCrossingPenaltytoportCrossingCost,groupNodeCrossingPenaltytogroupNodeCrossingCost,nodeLabelCrossingPenaltytonodeLabelCrossingCost,edgeLabelCrossingPenaltytoedgeLabelCrossingCost,minimumNodeToEdgeDistancePenaltytominimumNodeToEdgeDistanceCost,minimumGroupNodeToEdgeDistancePenaltytominimumGroupNodeToEdgeDistanceCost,minimumEdgeToEdgeDistancePenaltytominimumEdgeDistanceCost,minimumNodeCornerDistancePenaltytominimumNodeCornerDistanceCost,minimumFirstLastSegmentLengthPenaltytominimumFirstLastSegmentLengthCost,bendsInNodeToEdgeDistancePenaltytobendsInNodeToEdgeDistanceCost,monotonyViolationPenaltytomonotonyViolationCost,partitionGridCellReentrancePenaltytolayoutGridCellReentranceCost,portViolationPenaltytoportViolationCost,invalidEdgeGroupingPenaltytoinvalidEdgeGroupingCost, andsingleSideSelfLoopPenaltytosingleSideSelfLoopCost.
-
Renamed the related
-
Renamed and moved data key
PartitionCellKeys.NODE_LABEL_CROSSING_COST_FACTORS_KEYtoEdgeRouter.NODE_LABEL_CROSSING_COST_FACTOR_DATA_KEY. -
Renamed and moved data key
PartitionCellKeys.EDGE_LABEL_CROSSING_COST_FACTORS_KEYtoEdgeRouter.EDGE_LABEL_CROSSING_COST_FACTOR_DATA_KEY. -
Property
EdgeRouterData.labelCrossingPenaltyFactorshas been replaced by the two new propertiesEdgeRouterData.nodeLabelCrossingCostFactorsandEdgeRouterData.edgeLabelCrossingCostFactors. -
The
SelfLoopRouter.layoutSelfLoopsmethod has been removed. To route the self-loop edges, theSelfLoopRouterclass should be applied to the graph. -
The
SelfLoopRouter.layoutStyleproperty has been renamed toSeriesParallelLayoutRoutingStyle. The respective enum type has been renamed toSelfLoopRoutingStyle. -
The
OrganicEdgeRouter.createNodeEnlargementStagemethod has been removed and is now replaced by the newallowMovingNodesproperty. -
The
OrganicEdgeRouter.edgeNodeOverlapAllowedproperty has been renamed toOrganicEdgeRouter.allowEdgeNodeOverlaps. -
The protected
EdgeRouter.createDefaultEdgeOrderComparermethod has been removed. UseEdgeRouterData.edgeProcessingComparatorinstead. -
Renamed
ObstacletoRoutingObstacle. - Renamed
PathtoPathSearchResult. -
Renamed
PathRequesttoPathSearchRequest. -
Refactored the API for customizing the
EdgeRouterclass.-
The classes/interfaces
PathSearch,PathSearchResult,CellSegmentInfo,EdgeInfo, Channel,ChannelBasedPathRouting,SegmentInfo,SegmentInfoBase,SegmentGroup,Alignment,DynamicObstacleDecomposition,IObstaclePartition,IPartition,GraphPartition,GraphPartitionExtensionAdapter,IDecompositionListener,IDynamicDecomposition,IEnterIntervalCalculatorandIGraphPartitionExtensionhave been removed. -
The
PartitionCell.createBorderIntervalmethod has been removed alongside with thePartitionCellBorderenum. -
The properties
EdgeCellInfo.enterSegmentGroup,EdgeCellInfo.exitSegmentGroupandEdgeCellInfo.cellSegmentInfoshave been removed. -
The properties
EdgeRouter.registeredPartitionExtensions,registeredPathSearchExtensionsand Partition have been removed, as well as methodscreateObstacleDecomposition,createPathSearch,createPathSearchContext,configurePathSearch,createPathRouting,createConfiguration,configureGraphPartitionandcleanUpGraphPartition. -
The properties
PathSearchContext.pathSearchandPathSearchContext.pathSearchResulthave been removed. -
Added new methods
EdgeRouter.addPathSearchExtensionandEdgeRouter.addPartitionExtension. -
Added
PartitionExtensionclass as replacement forIGraphPartitionExtension. -
Added new
IRouterPartitioninterface as replacement ofIObstaclePartitionandIPartition. -
The Partition property has been added to
PathSearchConfigurationclass. -
The
Path.lengthproperty has been renamed toPathSearchResult.cellEntranceCount.
-
The classes/interfaces
-
The
PolylineLayoutStageclass has been renamed toOctilinearRoutingStage. ItspreferredPolylineSegmentLengthproperty has been renamed topreferredOctilinearSegmentLength. -
The
EdgeRouter.ignoreInnerNodeLabelsproperty 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.IGNORE_GROUP_LABELS. -
The already obsolete properties
EdgeRouter.polylineRouting,EdgeRouter.preferredPolylineSegmentLengthandEdgeRouter.maximumPolylineSegmentRatiohave been removed. They are replaced by respective properties on theEdgeRouterEdgeDescriptorclass. -
Replaced
EdgeRouter.edgeComparerproperty of typeIComparerwithEdgeRouterData.edgeProcessingComparatorof type Comparison function. -
Class
PenaltySettingsandEdgeLayoutDescriptor.penaltySettingsproperty where renamed toEdgeRouterCostsandEdgeRouterEdgeDescriptor.edgeRouterCosts. -
The
BusRouterclass and all API members related to it have been removed. For bus-style edge routing, useEdgeRouterinstead. -
Method
ParallelEdgeRouter.layoutParallelEdgeswas renamed torouteEdges.
Incompatible Behavior Changes
-
The default of
ParallelEdgeRouter.relativeJoinEndDistanceFactorhas changed from 0.1 to 0. -
The
EdgeRouternow considers node labels by default. -
The
EdgeRouternow places edge labels by default using a generic labeling algorithm.
Labeling
Incompatible API Changes
-
Removed the
GraphModelManager.labelLayerPolicyproperty. Use the more specific propertiesnodeLabelLayerPolicy,edgeLabelLayerPolicyandportLabelLayerPolicyinstead. -
The
SandwichLabelModelhas been removed. It can be emulated using aCompositeLabelModelwith the top and bottom position of anExteriorNodeLabelModel. -
Made enums
LabelAngleOnRightSideRotationsandLabelAngleReferencesnon-flags enums. - Removed the
LabelAngleOnRightSideOffsetsenum. -
Changed the
PreferredPlacementDescriptor.angleOffsetOnRightSideenum property to theaddHalfRotationOnRightSidebool property. -
Removed the interfaces
INodeLabelLayoutandIEdgeLabelLayout. Labels of theLayoutGraphare instead represented by typesLayoutNodeLabelandLayoutEdgeLabel. -
Removed
LayoutGraph.getLabelLayout. Labels can instead be retrieved usingLayoutNode.labelsandLayoutEdge.labels. -
Removed the
ILabelLayoutFactoryclass. Labels can instead be created and removed usingLayoutGraph.addLabelandLayoutGraph.remove. -
Removed the interfaces
INodeLabelLayoutModel,IEdgeLabelLayoutModeland all implementations. To specify valid positions forGenericLabeling, the typesNodeLabelCandidatesandEdgeLabelCandidatesoffer methods for creating positions that correspond to the old model implementations. Candidates can be specified usingGenericLabelingData.nodeLabelCandidatesandGenericLabelingData.edgeLabelCandidates. -
Summarized layout algorithm properties such as
ConsiderNodeLabels,ConsiderEdgeLabels,integratedNodeLabeling,integratedEdgeLabeling, andNodeLabelingPolicyas two propertiesNodeLabelPlacementandEdgeLabelPlacement. -
Removed
LabelLayoutTranslator,LabelLayoutData,LabelLayoutKeysand related classes. The behavior ofLabelLayoutDatacan be recreated usingLayoutNodeLabel.absolutePlacementandLayoutEdgeLabel.absolutePlacement. -
Removed properties
removeNodeOverlaps,removeEdgeOverlapsandedgeGroupOverlapAllowedfromGenericLabeling. -
Introduced
GenericLabeling.qualityTimeRatioproperty providing the possibility of balancing runtime and quality. -
Added intersection information to
LabelCandidateclass, which provides means to compute profits and to mimic the behavior of the removed properties. -
Removed
MISLabelingBase.optimizationStrategy. UseGenericLabeling.defaultNodeLabelingCostsandGenericLabeling.defaultEdgeLabelingCostsinstead. Additionally individual costs can now be set for each label, usingGenericLabelingData.nodeLabelingCostsandGenericLabelingData.edgeLabelingCosts. -
Removed
LabelingBase.autoFlipping. Automatically flipping labels right-side up is handled by the view, e.g.SmartEdgeLabelModel.autoRotation. -
Removed the
IProfitModelinterface and propertiesLabelingBase.profitModelandMISLabelingBase.customProfitModelRatio. Custom weights for a label candidate can be set at creation of the candidate withNodeLabelCandidatesandEdgeLabelCandidates, or through a callback for each label usingGenericLabelingData.nodeLabelCandidateProcessorsandGenericLabelingData.edgeLabelCandidateProcessors. -
Removed the classes
MISLabelingBaseandLabelingBase. -
Removed the following protected methods from
GenericLabeling:createEdges,assignProfit,foundLabelOverlap,foundNodeOverlap,foundEdgeOverlap,foundHaloOverlap,foundPartitionGridLineOverlap,foundPartitionGridInsetOverlap,foundPartitionGridInteriorOverlap. -
Renamed
LabelSideReferences.ABSOLUTE_WITH_LEFT_IN_NORTHtoABSOLUTE_WITH_LEFT_ABOVE. -
Renamed
LabelSideReferences.ABSOLUTE_WITH_RIGHT_IN_NORTHtoABSOLUTE_WITH_RIGHT_ABOVE. -
Values of
DiscreteNodeLabelPositionsenum have been renamed.-
INTERNAL_MASKtoINSIDE. -
EIGHT_POS_MASKtoDiscreteNodeLabelPositions.OUTSIDE. -
SIDES_MASKtoSIDES. -
CORNER_MASKtoRectangleCorners. - Removed value
SANDWICH_MASK.
-
-
Values of
DiscreteNodeLabelPositionshave been renamed:-
DiscreteNodeLabelPositions.TOP,DiscreteNodeLabelPositions.TOP_LEFT, ... have been renamed toTOP_INSIDE,TOP_LEFT_INSIDE, ... -
DiscreteNodeLabelPositions.NORTH,DiscreteNodeLabelPositions.NORTH_WEST, ... have been renamed toDiscreteNodeLabelPositions.TOP,DiscreteNodeLabelPositions.TOP_LEFT, ...
-
-
Renamed
LabelCandidate.customProfitto Weight. -
Renamed
SliderModetoEdgeLabelSliderMode. -
The configuration
LabelingDataclass for theGenericLabelingalgorithm has been renamed toGenericLabelingDatato be more in line with otherLayoutDataimplementations. - Removed
DescriptorWrapperLabelModel. -
ILabelCandidateDescriptorand related interfaces have been removed. -
LayoutGraphAdapter: removedgetLabelCandidateDescriptorProviderandgetLabelCandidateDescriptor. -
MISLabelingBase.reduceAmbiguityis removed. Ambiguous label placements can instead be penalized usingLabelingCosts.ambiguousPlacementCost. -
The
PreferredPlacementDescriptorclass has been renamed toEdgeLabelPreferredPlacement.-
The
IEdgeLabelLayout.preferredPlacementDescriptorproperty has been removed. Instead, the preferred placement can be specified usingEdgeLabelPreferredPlacement.EDGE_LABEL_PREFERRED_PLACEMENT_DATA_KEY.
-
The
Organic Layout
Incompatible API Changes
-
The
OutputRestrictionclass and the associated properties have been renamed toShapeConstraint. -
OrganicConstraintDatano longer inherits fromLayoutData. -
Renamed
OrganicLayoutData.sourceGroupIdstosubstructureSourceGroupIds.OrganicLayoutnow usesOrganicLayout.SUBSTRUCTURE_SOURCE_GROUP_ID_DATA_KEYinstead ofLayoutKeys.SOURCE_EDGE_GROUP_ID_DATA_KEY. -
Renamed
OrganicLayoutData.targetGroupIdstosubstructureTargetGroupIds.OrganicLayoutnow usesOrganicLayout.SUBSTRUCTURE_TARGET_GROUP_ID_DATA_KEYinstead ofLayoutKeys.TARGET_EDGE_GROUP_ID_DATA_KEY. -
Renamed the
OrganicLayout.GROUP_NODE_MODE_DP_KEYproperty toGROUP_NODE_HANDLING_POLICY_DATA_KEY. -
OrganicLayoutTreeSubstructureStyle.BALLOONhas been renamed toRADIAL_TREE. -
The
OrganicLayoutnow configures theComponentLayoutby default, andsmartComponentLayoutwas removed. -
OrganicLayout.configureComponentLayoutanddisposeComponentLayoutwere removed. To configure theComponentLayout, replace the instance of theComponentLayoutin theLayoutStageStackwith a suitably configured instance. -
OrganicLayout.considerNodeSizeswas removed. TheOrganicLayoutnow always considers node sizes. -
Renamed
OrganicLayout.clusterAsGroupSubstructureAllowedtoallowClusterAsGroupSubstructure. -
Renamed
OrganicLayout.nodeEdgeOverlapAvoidedtoavoidNodeEdgeOverlap. -
Renamed
OrganicLayout.nodeOverlapsAllowedtoallowNodeOverlaps. -
Renamed
GroupNodeMode.NORMALtoGroupNodeHandlingPolicy.FREE. -
The
OrganicLayoutclass no longer offers valueOrganicLayoutClusteringPolicy.USER_DEFINED. Now, cluster IDs provided by users viaOrganicLayoutData.clusterIdsproperty or data keyOrganicLayout.CLUSTER_ID_DATA_KEYare always considered first. If none are defined, the specifiedOrganicLayout.clusteringPolicyis considered. -
Removed the
clusterNodesproperty fromOrganicLayout. It is replaced byOrganicLayoutClusteringPolicyproperty. To disable the clustering, specifyOrganicLayoutClusteringPolicy.NONE. To enable it choose one of the available other policies. -
Removed the
clusteringQualityproperty fromOrganicLayout. UsequalityTimeRatioinstead. -
The
ClassicOrganicLayoutclass has been removed. It is superseded by the more powerfulOrganicLayoutalgorithm that should be used instead. -
The classes
OrganicRemoveOverlapsStageandShuffleLayouthave been removed from the library. To solve the task of overlap removal, theRemoveOverlapsStageclass is still available and the style previously generated byOrganicRemoveOverlapsStagecan be triggered via the policyOverlapRemovalPolicy.PRESERVE_RELATIVE_LOCATIONS. -
Removed
OrganicLayoutConstraintFactoryandOrganicLayout.createConstraintFactory. UseOrganicLayoutData.constraintsinstead. -
OrganicConstraintData.addFloatingBoundingBoxnow acceptsSizeits deconstructed values. -
OrganicConstraintData.addFloatingBoundingBoxnow acceptsRectits deconstructed values. -
The
RecursiveShuffleLayoutclass has been removed from the API. -
The
OrganicPartitionGridLayoutStageclass has been removed.
Incompatible Behavior Changes
-
The default style of the
OrganicLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
OrganicLayoutnow considers node labels by default. -
The
OrganicLayoutnow places edge labels by default using a generic labeling algorithm. -
The
OrganicLayoutnow always considers node sizes.
Interactive Organic Layout
Incompatible API Changes
-
The
InteractiveOrganicLayoutalgorithm no longer implements theILayoutAlgorithminterface. -
The
InteractiveOrganicLayoutExecutionContexthas been removed. Call directlyInteractiveOrganicLayout.startLayoutto start the layout calculation. -
The
InteractiveOrganicLayout.stop method has been renamed toInteractiveOrganicLayout.stopLayout. -
The methods
InteractiveOrganicLayout.applyLayout,InteractiveOrganicLayout.stopAndWait,InteractiveOrganicLayout.cancelAndWaithave been removed. -
The
InteractiveOrganicLayoutDataclass has been added. It handles the initial settings per node and edge. -
The classes
InteractiveOrganicNodeHandleandInteractiveOrganicEdgeHandlehave been added. They handle the settings per node and edge while the algorithm runs. -
The properties, getters, and setters on
InteractiveOrganicLayoutthat concern settings for individual items have been moved toInteractiveOrganicLayoutDataor the handles as appropriate. -
The
InteractiveOrganicLayout.addStructureUpdatemethod has been removed. -
The methods
InteractiveOrganicLayout.commitPositionsandcommitPositionsSmoothlyhave been combined as theInteractiveOrganicLayoutData.updateNodeCentersmethod. -
The
InteractiveOrganicLayout.outputRestrictionproperty has been renamed toShapeConstraint. -
The
InteractiveOrganicLayout.preferredEdgeLengthproperty has been renamed todefaultPreferredEdgeLength. -
The
InteractiveOrganicLayout.syncStructuremethod has been removed.
Circular Layout
Incompatible API Changes
-
Renamed the
ExteriorEdgeLayoutDescriptor.edgeToEdgeDistanceproperty toCircularLayoutExteriorEdgeDescriptor.edgeDistance. -
Renamed
EdgeLayoutDescriptortoCircularLayoutEdgeDescriptor. -
Renamed
CircularLayout.defaultEdgeLayoutDescriptortoedgeDescriptor. -
Renamed
ExteriorEdgeLayoutDescriptortoCircularLayoutExteriorEdgeDescriptor. -
Renamed
CircularLayout.exteriorEdgeLayoutDescriptortoexteriorEdgeDescriptor. -
The
SingleCycleLayouthas been removed. TheCircularLayoutwithCircularLayoutPartitioningPolicyset toSINGLE_CYCLEcan be used instead. -
CircularLayout.singleCycleLayouthas been replaced byCircularLayout.partitionDescriptor. -
CircularLayout.defaultEdgeLayoutDescriptorhas been renamed toedgeDescriptor. -
CircularLayout.balloonLayouthas been renamed tobackboneLayout. -
The
CircularLayout.layoutStyleproperty has been renamed toCircularLayoutPartitioningPolicyto better reflect the fact that it controls how nodes are partitioned. The corresponding enum has also been renamed from toCircularLayoutPartitioningPolicy. -
Removed the enum value
CircularLayoutEdgeRoutingPolicy.MARKED_EXTERIOR. To manually select which edges should be routed externally, use theCircularLayoutData.exteriorEdgesproperty instead. -
Renamed
CircularLayout.layoutStyletoCircularLayout.partitioningPolicy. -
Renamed
LayoutStyletoCircularLayoutPartitioningPolicy. -
Removed the enum value
LayoutStyle.CUSTOM_GROUPS. If custom partitions are specified usingCircularLayoutData.partitions, they are respected by theCircularLayoutautomatically. -
The
INodeSequencerclass has been removed from the API. Use the newCircularLayoutData.nodeComparatorproperty to specify custom node orders.
Incompatible Behavior Changes
-
PartitionDescriptor.initialAngleis measured in degrees rather than radians. -
The default style of the
CircularLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
CircularLayoutnow considers node labels by default. -
The
CircularLayoutnow places edge labels by default using a generic labeling algorithm.
Radial Layout
Incompatible API Changes
-
Renamed the
RadialLayout.minimumNodeToNodeDistanceproperty tominimumNodeDistance. -
Renamed the
RadialLayout.minimumEdgeToEdgeDistanceproperty tominimumEdgeDistance. -
RadialLayoutNodeInfohas been renamed toRadialLayoutNodePlacementResult. -
Renamed
LayeringStrategytoRadialLayeringStrategy. -
Replaced
ItemMappingoutEdgeComparerswithChildOrderDatachildOrder. -
Removed the enum value
Radial.LayeringStrategy.UserDefined. Custom layers are now always used if defined viaRadialLayoutData.layerIdsproperty. -
Removed the enum value
CenterNodesPolicy.CUSTOM. Custom center nodes are now always used if defined viaRadialLayoutData.centerNodesproperty. -
The read/write
centerNodesDpKeyproperty from theRadialLayoutclass has been removed. It was replaced by the static read-only keyRadialLayout.CENTER_NODES_DATA_KEYthat must now be used instead to mark the custom center nodes. -
Replaced properties
RadialLayoutData.nodeComparablesandRadialLayoutData.outEdgeComparerswith new, more powerfulchildOrderproperty.
Incompatible Behavior Changes
-
The default style of the
RadialLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
RadialLayoutnow considers node labels by default. -
The
RadialLayoutnow places edge labels by default using a generic labeling algorithm. -
The
RadialLayoutNodePlacementResult.sectorStartproperty is now interpreted in clockwise direction. -
Custom layers are now always used if defined via
RadialLayoutData.layerIdsproperty. -
Custom center nodes are now always used if defined via
RadialLayoutData.centerNodesproperty.
Radial Tree Layout
Incompatible API Changes
-
Renamed
RootNodePolicytoRootSelectionPolicy. -
BalloonLayouthas been renamed toRadialTreeLayout, andBalloonLayoutDatahas been renamed toRadialTreeLayoutData. -
The following members have been removed from
BalloonLayout(nowRadialTreeLayout): The fieldgraph, theBalloonLayoutclass.NodeInfo, the methodsgetInfo,calculateChildArrangement,calculateAngles,determineRoot, andsortChildNodes, thefromSketchModeproperty (use the new enum valueFromSketchofChildOrderingPolicyinstead), and theInterleavedModeproperty (useRadialTreeLayoutData.interleavedNodesinstead). -
The following members of
BalloonLayout(nowRadialTreeLayout) have been renamed:preferredChildWedgehas been renamed topreferredChildSectorAngle,preferredRootWedgehas been renamed topreferredRootSectorAngle, and thegetPreferredChildWedgemethod has been renamed togetPreferredChildSectorAngle. - The
InterleavedModeenum has been removed. -
The enum value
InterleavedMode.MARKED_NODEShas been removed. To define specific parents for interleaved placed child nodes use theRadialTreeLayoutData.interleavedNodesproperty. -
The enum value
RootNodePolicy.SELECTED_ROOThas been removed. A custom root node is now always used if defined viaRadialTreeLayoutData.treeRootproperty. -
Replaced layout data
outEdgeComparerproperty withChildOrderDatachildOrder. -
Removed
BalloonLayout.comparer. UseRadialTreeLayoutData.childOrderinstead. -
Replaced
BalloonLayoutData.outEdgeComparerproperty with new, more powerfulchildOrderproperty (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 default style of the
RadialTreeLayout's (formerlyBalloonLayout's)ComponentLayoutis changed toPACKED_CIRCLE. -
The from-sketch option of
RadialTreeLayoutsorts like before but no longer takes precedence over orders specified with theRadialTreeLayoutDatapropertieschildOrderornodeTypes. -
The
RadialTreeLayoutnow considers node labels by default. -
The
RadialTreeLayoutnow places edge labels by default using an integrated labeling algorithm.
Radial Group Layout
Incompatible API Changes
-
Renamed
CactusGroupLayout.groupSizingPolicytoRadialGroupLayout.groupSizePolicy. -
The
CactusGroupLayouthas been renamed toRadialGroupLayout, and theCactusGroupLayoutDatahas been renamed toRadialGroupLayoutData. -
Property
preferredRootWedgehas been renamed topreferredRootSectorAngle. -
Replaced
CactusGroupLayout.nodeComparerproperty of typeIComparerwithRadialGroupLayoutData.childNodeComparatorof type Comparison function.
Incompatible Behavior Changes
-
The default style of the
RadialGroupLayout's (formerlyCactusGroupLayout's)ComponentLayoutis changed toPACKED_CIRCLE. -
The default of the
preferredRootSectorAngleproperty has been changed from 180 to 360. -
The
RadialGroupLayoutnow places edge labels by default using a generic labeling algorithm.
Series-parallel Layout
Incompatible API Changes
-
The combinations of the enums
ForkStyleandTreeLayoutPortAssignmentModehave been integrated into theTreeLayoutPortAssignmentModeenum, and theForkStyleenum has been removed. -
DefaultPortAssignment.forkStylehas been removed. -
Renamed
IPortAssignmenttoISeriesParallelLayoutPortAssigner. -
Renamed
DefaultPortAssignmenttoSeriesParallelLayoutPortAssigner. -
Renamed
SeriesParallelLayout.PORT_ASSIGNMENT_DP_KEYtoPORT_ASSIGNER_DATA_KEY. -
Renamed
SeriesParallelLayoutData.portAssignmentstoportAssigners. -
Renamed the
SeriesParallelLayout.verticalAlignmentproperty toparallelSubgraphAlignment. -
Renamed the
SeriesParallelLayout.minimumNodeToNodeDistanceproperty tominimumNodeDistance. -
Renamed the
SeriesParallelLayout.minimumEdgeToEdgeDistanceproperty tominimumEdgeDistance. -
Renamed
EdgeLayoutDescriptortoSeriesParallelLayoutEdgeDescriptor. -
Renamed
SeriesParallelLayout.defaultEdgeLayoutDescriptortodefaultEdgeDescriptor. -
Renamed
SeriesParallelLayout.EDGE_LAYOUT_DESCRIPTOR_DP_KEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
SeriesParallelLayoutData.edgeLayoutDescriptorstoedgeDescriptors. -
The
generalGraphHandlingproperty was removed.SeriesParallelLayoutnow handles general graphs by default. -
The
DefaultPortAssignment.borderGapToPortGapRatioproperty was renamed toborderToPortGapRatio. -
Remove methods
getPortBorderGapandgetPortDistanceDeltafrom theDefaultPortAssignmentclass. -
The
SeriesParallelLayout.nonSeriesParallelEdgeLabelingAlgorithmproperty has been renamed tononSeriesParallelEdgeLabeling. -
Removed
SeriesParallelLayout.defaultOutEdgeComparer. UseSeriesParallelLayoutData.childOrderinstead. Also removedDefaultOutEdgeComparerclass. -
Replaced
SeriesParallelLayoutDataproperty .outEdgeComparerswith new, more powerfulchildOrderproperty.
Incompatible Behavior Changes
-
The
SeriesParallelLayoutnow considers node labels by default. -
The
SeriesParallelLayoutnow places edge labels by default using an integrated labeling algorithm. -
SeriesParallelLayoutnow handles general graphs by default.
Compact Disk Layout
Incompatible Behavior Changes
-
The
CompactDiskLayoutnow considers node labels by default. -
The
CompactDiskLayoutnow places edge labels by default using a generic labeling algorithm.
Multi-page Layout
Incompatible API Changes
-
The
MultiPageLayout.createProxyReferenceNodesproperty has been renamed touseProxyReferenceNodes. -
The
EdgeBundleModesenum and the associated properties have been renamed toMultiEdgeConnectorPolicy. The enum values have been renamed toSEPARATE,SHARE_FOR_SAME_DIRECTIONandSHARE, respectively. The correspondingEdgeDataKeyhas been renamed toMULTI_EDGE_CONNECTOR_ID_DATA_KEY(previouslyEDGE_TYPE_DP_KEY). -
Renamed
GroupingPolicytoMultiPageGroupingPolicy. -
The public API of the
MultiPageLayoutclass has been changed.-
The
ILayoutCallbackinterface has been removed. The respectiveMultiPageLayout.layoutCallbackproperty is now an Action delegate instead. Furthermore,MultiPageLayout.calculateLayoutmethod has been removed, meaning the layout can and should only be started like all other algorithms (e.g. via theLayoutExecutororIGraph.applyLayout). -
The
IElementFactoryinterface and theDefaultElementFactoryclass have been removed. The replacement isMultiPageElementFactoryclass which can be accessed and modified usingMultiPageLayout.elementFactoryproperty. -
The
MultiPageLayout.createElementFactorymethod has been removed. The factory can be get and set usingMultiPageLayout.elementFactoryproperty. -
The
IElementInfoManagerinterface has been removed. -
The
LayoutContextclass of theMultiPageLayouthas been renamed toMultiPageLayoutContextand its properties Graph and Layout have been removed. -
The
INodeInfo,IEdgeInfo,INodeLabelInfo,IEdgeLabelInfointerfaces related toMultiPageLayouthave 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,routeRestoredEdgesandapplyIncrementalLayouthave been removed.
-
The
-
MultiPageLayoutResult.getPageandpageCounthave been replaced bypageGraphs. -
MultiPageLayoutDatahandles the ID mapping automatically. Consequently, the explicit mappingsnodeIds,edgeIds,nodeLabelIds, andedgeLabelIdshave been removed. Original graph items can be obtained by callingMultiPageLayoutData.getOriginalItem. -
Renamed
NodeTypetoMultiPageNodeTypeand its valueNormaltoMultiPageNodeType.REGULAR. -
Renamed
EdgeTypetoMultiPageEdgeTypeand its valueNormaltoMultiPageEdgeType.REGULAR. -
The
EdgeBundleModesenum has been renamed toMultiEdgeConnectorPolicyand converted from a flags enum to a regular enum. To manually select which multi-edges should be distinguished, use theMultiPageLayoutData.multiEdgeConnectorIdsproperty. -
The properties
MultiPageLayout.edgeBundleModeMask,MultiPageLayout.EDGE_TYPE_DP_KEY, andMultiPageLayoutData.edgeTypeshave been renamed toMultiPageLayout.multiEdgeConnectorPolicy,MultiPageLayout.MULTI_EDGE_CONNECTOR_ID_DATA_KEY, andMultiPageLayoutData.multiEdgeConnectorIds.
Partial Layout
Incompatible API Changes
-
Renamed
LayoutOrientationtoPartialLayoutOrientation. -
The
PartialLayout.layoutSubgraphmethod has been removed. -
The callback
configureEdgeRoutermethod has been removed from classesPartialLayoutandClearAreaLayout. The router instance can be specified via thePartialLayout.edgeRouterandClearAreaLayout.edgeRouterproperties so that an additional configuration callback is not necessary. -
Removed the enum value
ComponentAssignmentStrategy.CUSTOMIZED. Custom components are now always used if defined withPartialLayoutData.componentIds,ClearAreaLayoutData.componentIdsorFillAreaLayoutData.componentIdsrespectively.
Incompatible Behavior Changes
-
Custom components are now always used if defined with
PartialLayoutData.componentIds.
Tabular Layout
Incompatible API Changes
-
Renamed
NodeLayoutDescriptortoTabularLayoutNodeDescriptor. -
Renamed
TabularLayout.defaultNodeLayoutDescriptortodefaultNodeDescriptor. -
Renamed
TabularLayout.NODE_LAYOUT_DESCRIPTOR_DP_KEYtoNODE_DESCRIPTOR_DATA_KEY. -
Renamed
TabularLayoutData.nodeLayoutDescriptorstonodeDescriptors. -
Renamed
TabularLayoutPolicytoTabularLayoutMode. -
Replaced
TabularLayout.nodeComparerproperty of typeIComparerwithTabularLayoutData.freeNodeComparatorof type Comparison function. -
The
TabularLayoutclass now features its own data key (LAYOUT_GRID_CELL_DESCRIPTOR_RESULT_DATA_KEY) where it will publish cell IDs of nodes that it explicitly assigned to the cells. Previously it reused the common data keyPartitionGrid.PARTITION_CELL_ID_DP_KEY.
Incompatible Behavior Changes
-
The
TabularLayoutnow considers node labels by default. -
The
TabularLayoutnow places edge labels by default using a generic labeling algorithm.
Component Layout
Incompatible API Changes
-
The
ComponentArrangementStylesenum has been renamed toComponentArrangementStyle, as it is no longer a Flags-Enum.- Removed
ComponentArrangementStyles.MASK. -
Replaced
ComponentArrangementStyles.MODIFIER_NO_OVERLAPwithTRY_KEEP_CENTERS. -
Replaced
ComponentArrangementStyles.MODIFIER_AS_ISwithComponentLayout.fromSketchMode.
- Removed
-
Renamed
ComponentLayout.calculateBoundstocalculateComponentBounds. -
Renamed
ComponentLayout.setOrigintosetComponentLocation. -
The
IsolatedGroupComponentLayoutclass has been removed. -
Renamed
ComponentArrangementStyles.NONEtoComponentArrangementStyle.KEEP_CENTERS. -
Removed the
componentArrangementproperty fromComponentLayout; use the newComponentArrangementStyle.NONEinstead to avoid arranging components. - Removed
ComponentLayout.arrangeFieldsmethod. -
Simplified parameter lists of methods
ComponentLayout.arrangeComponentsandComponentLayout.setOriginto now accept instances of Component class. -
If
ComponentLayoutis used as a pre-processing step to apply a layout algorithm on multiple connected components, thestopDurationof that layout is divided appropriately over all components, instead of being applied once per component.
Incompatible Behavior Changes
-
ComponentArrangementStyle.PACKED_CIRCLEandComponentArrangementStyle.PACKED_RECTANGLEnow consider the convex hulls of components to determine overlaps.
Tree Map Layout
Incompatible API Changes
-
Renamed
TilingPolicytoTilingStrategyandTreeMapLayout.tilingPolicytoTreeMapLayout.tilingStrategy. -
Replaced
TreeMapLayout.nodeComparerproperty of typeIComparerwithTreeMapLayoutData.childNodeComparatorof type Comparison function. - Removed the
NodeWeightComparerclass.
Recursive Group Layout
Incompatible API Changes
-
RecursiveGroupLayout.NULL_LAYOUTis renamed toRecursiveGroupLayout.FIX_CONTENT_LAYOUT. -
FixGroupLayoutStageis removed and its functionality is replaced byRecursiveGroupLayoutusingRecursiveGroupLayout.FIX_GROUP_LAYOUTfor all groups. -
The
RecursiveGroupLayoutclass now ignores empty group nodes by default (seeconsiderEmptyGroupsproperty). -
The signature of
ILayoutGroupBoundsCalculator.calculateBoundsmethod was changed. The given children are now of typeIListEnumerable.<Node> -
The
GroupBoundsCalculatorimplementation now keeps the center of empty group nodes ifconsiderEmptyGroupsis enabled. -
Method
GroupBoundsCalculator.calculateBoundsnow 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
-
PartitionGridis renamed toLayoutGrid. This also affects the related classesPartitionGridData,GenericPartitionGridStage, andGenericPartitionGridStageData. -
Renamed
ColumnDescriptortoLayoutGridColumn&RowDescriptortoLayoutGridRow. -
Renamed
PartitionCellIdtoLayoutGridCellDescriptor. -
Renamed inset properties on classes
LayoutGridColumn(formerlyColumnDescriptor) andLayoutGridRow(formerlyRowDescriptor) to now be called padding (e.g.,leftPaddinginstead ofleftInset). -
Removed helper class
SwimlanesandSwimlaneRepresentative. - Removed the
SwimlanesModeenum. -
The methods
PartitionGrid.prepareOrientationChangeandPartitionGrid.finalizeOrientationChangehave been removed. -
Removed properties
originalPositionandoriginalWidthfromLayoutGridColumnclass (formerlyColumnDescriptor). Use propertiesLayoutGridColumn.position(formerlycomputedPosition) orLayoutGridColumn.width(formerlycomputedWidth). -
Removed properties
originalPositionandoriginalHeightfromLayoutGridRowclass (formerlyRowDescriptor). Use propertiesLayoutGridRow.position(formerlycomputedPosition) orLayoutGridRow.height(formerlycomputedHeight). -
The
SwimlaneDescriptorclass has been removed from the API. UseLayoutGridclass (formerly calledPartitionGrid) instead, which is able to model one-dimensional and two-dimensional grids. -
The
PartitionGridLayoutStageclass has been removed. It is not necessary to manually add this stage, sinceHierarchicalLayoutcan supportLayoutGridout-of-the-box. - Renamed all types, methods and properties containing "CellId" to "CellDescriptor".
-
Removed properties
optimizeRowOrderandoptimizeColumnOrderfromPartitionGridDataclass. -
Removed the data key
PartitionGrid.PARTITION_GRID_DP_KEY. The keyLayoutGrid.LAYOUT_GRID_CELL_DESCRIPTOR_DATA_KEYis now the only data key which can be used to specify layout grids. -
Removed data key
RecursiveGroupLayout.GROUP_NODE_PARTITION_GRID_DP_KEY. The keyLayoutGrid.LAYOUT_GRID_CELL_DESCRIPTOR_DATA_KEYis now the only data key which can be used to specify layout grids.
Other Layouts
Incompatible API Changes
-
Renamed
CurveFittingLayoutStagetoCurveFittingStage. -
Renamed
FixNodeLayoutStagetoLayoutAnchoringStageandFixNodeLayoutDatatoLayoutAnchoringStageData. In addition:-
Renamed
FixPointPolicytoLayoutAnchoringPolicy. -
Renamed
FixNodeLayoutStage.FIXED_NODE_DP_KEYtoNODE_ANCHORING_POLICY_DATA_KEY. -
Renamed
calculateFixPointtocalculateAnchorPoint. -
Removed
FixNodeLayoutData.fixedNodes. Graph elements to anchor the graph on can be specified by setting the respectiveAnchoringPoliciesusingLayoutAnchoringStageData.
-
Renamed
- Removed the
InterEdgeRoutingStyleenum.
Algorithms
Incompatible API Changes
-
IntersectionInfohas been renamed toIntersection. -
Renamed
ParallelEdges.findParallelEdgestoLayoutGraphAlgorithms.findMultiEdges. -
Removed the
BfsDirectionenum. UseTraversalDirectioninstead. -
The
TreeAnalyzerclass has been removed. Use the more convenient and powerfulTreeAnalysisclass instead. -
Removed the Intersections class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
IntersectionAlgorithmclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the
NetworkFlowsclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead (e.g.MaximumFlow). -
Removed the
NodeOrdersclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead (e.g.topologicalNodeOrder). -
Removed the
GraphConnectivityclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the
IndependentSetsclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. - The Triangulator algorithm class has been removed.
-
Removed the Substructures class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Trees class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Bipartitions class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Cycles class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
ParallelEdgesclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the Transitivity class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Centrality class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
ShortestPathsclass. Use corresponding methods ofLayoutGraphAlgorithmsclass instead (e.g.ShortestPath). -
Removed the Groups class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Renamed the Dendrogram class to
HierarchicalClusteringDendrogram. -
Removed the Bfs class. Use
LayoutGraphAlgorithms.bfsinstead. -
Removed the Dfs class. Use
LayoutGraphAlgorithms.dfsinstead. -
Renamed
ComponenttoConnectedComponent. -
The
SpanningTreesclass has been removed. To compute a minimum spanning tree, useLayoutGraphAlgorithms.minimumSpanningTreemethod. -
The
RankAssignmentsclass has been removed in favor of the singleLayoutGraphAlgorithms.simplexRankAssignmentmethod that offers access to the rank assignment algorithm. -
The
GraphCheckerclass has been removed and most of its methods are now available onLayoutGraphAlgorithms. -
The
NodeAggregationclass has been renamed toLayoutGraphNodeAggregation, emphasizing that this class is intended for users working with theLayoutGraphAPI only.-
Furthermore, its member
NODE_TYPE_DP_KEYhas been removed. The replacement is keyLayoutKeys.NODE_TYPE_DATA_KEY. -
Also, its member
NODE_CENTER_DP_KEYhas been removed. Node centers are now directly read from theLayoutGraphinstance which must contain the coordinates of nodes if useful results should be generated.
-
Furthermore, its member
-
Removed the enum value
EUCLIDEAN_SQUAREDfromDistanceMetricenum. Use enum value Euclidean instead which now calculates with squared values. -
Removed the
DistanceMetricenum ofKMeansClusteringclass. UseKMeansDistanceMetricenum instead. -
Removed the
aggregationPolicyenum ofNodeAggregationclass. UseaggregationPolicyenum instead. -
Removed the utility class
Sortingthat 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.
Analysis
Incompatible API Changes
-
The
NodeAggregation.nodeTypeHandlingproperty has been renamed toNodeTypePolicy. -
The
NodeAggregationNodeTypeHandlingPolicyenum has been renamed toNodeTypePolicy. -
Renamed
AggregationInfotoNodeAggregationInfo. -
Renamed
AggregationInfo.parentAggregationtoparentNodeAggregation. -
Renamed
NodeAggregation.AggregationPolicytoNodeAggregationPolicy. -
Renamed
NodeAggregation.aggregationtoaggregationPolicy. -
Renamed
DistanceMetrictoKMeansDistanceMetric. -
Renamed
GraphStructureAnalyzer.hasMultipleEdgestohasMultiEdges. -
Renamed
GraphStructureAnalyzer.getMultipleEdgestogetMultiEdges. -
Replaced enum
LinkagewithHierarchicalClusteringLinkage. -
Renamed
SubstructuretoSubstructureItems. -
Renamed
ComponenttoConnectedComponent.
Collections
Incompatible API Changes
- The
YList.elementAtmethod was removed. -
Renamed
ItemMapping.delegatetomapperFunction. - Renamed
ItemCollection.delegateto predicate. -
Renamed
IUndoUnit.createDelegateUnittofromHandler. -
Renamed
IAnimation.fromDelegatetofromHandler. -
Renamed
IMapper.fromDelegatetofromHandler. -
The
elementAtmethod on theIEnumerableinterface was removed. Use theatmethod, instead. -
The
skipmethod on theIEnumerableinterface is now calleddropand no longer has athisArgparameter to match the counterpart in the ECMAScript Iterator Helpers stage 3 proposal. -
The
skipWhilemethod on theIEnumerableinterface is now calleddropWhileand no longer has athisArgparameter. -
The
distinct,groupBy, andsummethods on theIEnumerableinterface no longer have athisArgparameter. -
The
listclass constructor no longer has athisArgparameter. -
The
firstandlastmethods on theIEnumerableinterface no longer accept a predicate function. UsefindandfindLastinstead. -
The predicate function of the
findandfindLastmethods on theIEnumerableinterface is no longer optional. -
The parameter of the
includesmethod on theIEnumerableinterface is no longer nullable. -
The
orderBymethod of theIEnumerableinterface is now calledtoSorted. ThekeySelectorparameter was removed to match the signature ofArray.toSorted. -
The
orderByDescendingmethod has been removed theIEnumerableinterface. -
The
sortmethod has been removed from classYList. -
The
sortmethod with theIComparerparameter has been removed from classList.<T> -
Renamed
ICursor.prevtoICursor.previous. -
Renamed
ListCell.succtoListCell.next. -
Renamed
ListCell.predtoListCell.previous. -
Removed the
isEmptymethod fromYListclass. TestYList.sizeproperty for 0 instead. -
Removed the methods
succCellandpredCellfromYListclass. Use new propertiesListCell.nextandListCell.previousinstead. -
Removed the methods
cyclicSucc,cyclicPred,containsAllandretainAllfromYListclass. -
Removed the methods Succ and Pred from
ListCellclass. Use new properties Next and Previous instead. -
Removed the Peek method from
YListclass. Use First property instead.
Incompatible Behavior Changes
-
The
first,lastandfindLastmethods on theIEnumerableinterface now returnnullinstead of throwing when no element was found. -
The
atmethod on theIEnumerableinterface now returnsnullinstead ofundefinedwhen out of range.
Geometry
Incompatible API Changes
-
The
GeomUtilitiesclass has been renamed toGeometryUtilities. - Implicit and explicit conversion operators between yFiles geometry types and the platform geometry types have been removed.
-
All
intersectsmethods of theGeneralPathclass are now calledpathIntersects. -
The
mayIntersectClipmethod of theGeneralPathclass is now calledpathMayIntersectClip. -
All
areaContainsmethods of theGeneralPathclass now have an optionalflatteningToleranceparameter. -
The
isEmptymethod of theGeneralPathclass was removed. Use theisVisiblemethod or thesizeproperty, instead. -
The
GetBoundsoverload of theGeneralPathclass that returns the approximate bounds for Bézier segments is now calledgetApproximateBounds. -
The copy constructors on the
Rect,Point, andSizeclasses were removed. Use thetoRect,toPoint, ortoSizemethods respectively instead. -
Renamed the
GeomUtilities.findRayIntersectionmethod togetSegmentRayIntersection. -
Renamed the
GeomUtilities.findEllipseLineIntersectionmethod togetEllipseLineIntersection. -
Moved
Geom.collinearmethod toGeometryUtilitiesclass and renamed toareCollinear. -
Moved
Geom.calcConvexHullmethod toGeometryUtilitiesclass and renamed togetConvexHull. -
Moved the
Geom.calcIntersectionmethod toGeometryUtilitiesclass and renamed togetLineLineIntersection. -
Removed the
Geom.projectionmethod. UsePoint.getProjectionOnSegmentmethod instead. -
Removed the methods
distanceToLineSegmentof Geom class. UsePoint.distanceToSegmentmethod instead. -
The
IRectangleinterface no longer implementsIPoint. You can get the top-left corner of a rectangle with itstopLeftmethod. For usages of the dynamic behavior ofIPoint, like in a customIPositionHandler, we recommend to let theIPositionHandlerimplementIPoint, too. -
The
IMutableRectangleinterface no longer implementsIMutablePoint. When working with theMutableRectangleclass, use itsLocationproperty to get a dynamic point of the location. -
Renamed the
LineSegment.xOffsetproperty toyIntercept. - Made
LineSegmentclass sealed. -
Renamed the
LineSegment.isInXIntervallmethod toLineSegment.isInXIntervalandLineSegment.isInYIntervallmethod toLineSegment.isInYInterval.
yFiles for HTML 2.6.0.5
This 5th bugfix release for yFiles for HTML 2.6 corrects some errors of the previous release, mainly in the layout part. There are no incompatible API changes.
Bug Fixes
Graph and Styles
-
When using the
EdgeSegmentLabelModelandSmartEdgeLabelModelclasses, label placement at source and target nodes is now correct when an index is specified that is less than zero or greater than the number of bends of the edge. -
The
EdgeSegmentLabelModelclass now calculates valid label locations for selfloop paths with one port at the side of the node. -
The intersection calculation for
RectangleNodeStylehas been corrected for some previously failed instances that caused edges to end in midair or disappear. - Bend handles are now always displayed correctly when rendering with WebGL.
- With folding, changes to ports of an edge whose source or target node is hidden are no longer reverted when the node is subsequently collapsing and expanding.
Interaction
-
Overloading
GraphInputMode.findItemswithout the context parameter now finds the items correctly.
View-Layout-Bridge
-
Exceptions thrown by the
IGraph.applyLayoutmethod are now properly re-thrown (instead of causing an unhandled promise rejection) and can be caught by a catch block.
Hierarchical Layout
-
The
HierarchicLayoutclass no longer assigns superfluous space to group nodes if there are grouped edges. -
The
HierarchicLayoutclass no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints. -
The
HierarchicLayoutclass no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer. -
The
HierarchicLayoutclass no longer produces superfluous crossings for tabular group nodes with fixed children order. -
The
HierarchicLayoutnow 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 theLayoutGraphinstance when running the layout algorithm directly on the graph instance without using a copy. -
The
HierarchicLayoutclass no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints. -
The
HierarchicLayoutclass no longer produces superfluous crossings for some graphs with group nodes in incremental layout mode. -
The
HierarchicLayoutclass no longer produces very long edge segments for some input graphs containing groups with node halos and polyline edge routing. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass no longer misplaces port labels at the connector nodes of integrated subcomponents. -
The
HierarchicLayoutclass no longer produces intertwined edge routes with many superfluous crossings and bends for some cases with sequence constraintsplaceAtHeadorplaceAtTail. The problem mainly occurred with graphs with groups orPartitionGridand incompatible sequence constraints.
Edge Router
-
The
EdgeRouterclass 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.
Other Layouts and Algorithms
-
The
OrganicLayoutclass now supports specified minimum group node sizes with more feature combinations. Previously, the minimum group node size was sometimes violated. -
The
AspectRatioSubtreePlacerclass no longer ignores the specifiedAspectRatioSubtreePlacer.childAlignmentPolicyfor some specific setups (e.g., if all children are leaves and have the same size). -
The
ClearAreaLayoutclass no longer produces violations of thePartitionGridif theClearAreaStrategyis set toLOCALorLOCAL_UNIFORM. -
The
Intersectionsclass does not disposeFilteredGraphWrapperinstances 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 intonullfields and properties, generating exceptions that were non-trivial to understand.
yFiles for HTML 2.6.0.4
This 4th bugfix release for yFiles for HTML 2.6 corrects a small number of errors, and includes a new source code demo. There are no incompatible API changes.
Bugfixes
Graph, graph component, interaction
-
Calling the
CanvasComponent.zoomTomethod now properly repaints the component if the component's viewport has changed. -
Grids rendered with HTML Canvas now respect the alpha value of the
color of the
GridVisualCreator.strokeproperty. - In WebGL2 rendering mode, edge segments are no longer missing in the visualization if a smoothing length is set and the path contains duplicate bends or collinear bends.
-
The
GraphClipboardclass now properly respects itsParentNodeDetectionmode for sub-trees. -
The
GraphClipboard.parentNodeDetectionproperty can now useRootas fallback if no valid parent is found for theSELECTIONorPREVIOUS_PARENTmodes. -
The
EdgeSegmentLabelModelclass now calculates valid label locations for paths with duplicate bends, i.e., paths where two or more consecutive bends have the same location. -
Exporting to SVG with the
SvgExportclass no longer throws an error if an invalid or unsupported CSS rule is encountered. This could have happened especially on iOS devices. -
The
SvgExport.collectDocumentStylesmethod now collects styles from both the DOM and the Shadow DOM.
Layout
-
The
HierarchicLayoutclass no longer generates superfluous crossings for some edges with alternative paths that are incident to group nodes (seeHierarchicLayoutData.alternativeEdgePaths). -
The
HierarchicLayoutalgorithm no longer requires a long runtime for some larger, grouped graphs with layering constraints and non-recursive layering. -
The
HierarchicLayoutalgorithm no longer requires a long runtime for some larger graphs with layering constraints when a maximum duration is specified. -
The
HierarchicLayoutclass no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode. -
The
TreeReductionStage,CircularLayout,EdgeBundlingStage, andRadialLayoutclasses no longer produce results with many superfluous, collinear bends for bundled edges. -
The
CircularLayoutclass no longer produces strange routes for some bundled edges. -
The
GenericLabelingclass no longer produces non-optimal label placements for some rare setups of graphs with node halos. -
The
GenericLabelingclass 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. -
MultiPageLayoutalgorithm will adhere to page size specifications that previously could cause the maximum page size to be exceeded.
Notable demo improvements
- The new Basic Demo replaces the Basic Module Loading Demo as a simple starting point for your own project and for experimenting with the yFiles API.
- The Vue template node style is now based on Vue 3.
yFiles for HTML 2.6.0.3
This 3rd bugfix release for yFiles for HTML 2.6 corrects a small number of errors, and includes a new source code demo. There are no incompatible API changes.
Bugfixes
Visual Studio Code no longer suggests auto-imports that incorrectly import from
yfiles/*, but only from yfiles. This is achieved by a slight
improvement of the typesVersion property in the
package.json file.
WebGL2 rendering mode
-
The
WebGL2ArcEdgeStyleclass now draws the arc with the correctheightin some edge cases. Previously, the visualization was incorrect if the given height was less than 0.5 and thefixedHeightproperty was set tofalse, or if the given height was greater than 255 and thefixedHeightproperty is set totrue. -
The
WebGL2BridgeEdgeStyleclass now draws the bridge on the correct side if the givenheightis greater than 255. -
WebGL2 handle hit testing now correctly considers the value of the
GraphComponent.hitTestRadiusproperty. -
WebGL2 handles now correctly register hits when a
projectionother than the identity projection is applied to theGraphComponent. -
Deleting a selected edge with bends that uses the
WebGL2PolylineEdgeStyleno longer leaves rendering artifacts of the target port handles the graph component.
Other features
-
With
ArcEdgeStyle, the 3 center positions of theNinePositionEdgeLabelModelare now in the right places. Previously they were often way off. - The default visualization for selected ports is now displayed correctly.
-
The
NodeStyleStripeStyleAdapterclass now correctly updates the visualization when itsnodeStyleproperty is changed. -
The problem of excessive memory consumption in the analysis
algorithm
Pathswhen setting a large number of start and end nodes has been fixed. -
If labels are specified through the
LabelingData.affectedLabelsproperty but theLabelingData.affectedLabels.dpKeyproperty is not set, the key set to theLabelingBase.affectedLabelsDpKeyproperty is used.
Notable demo improvements
-
When editing demo code in Visual Studio Code, auto-import is now much more
convenient to use. In addition to suggesting importing from plain
yfilesinstead ofyfiles/*, it no longer suggests importing from the yFiles UMD modules.To achieve this, some of the demos that used the yFiles UMD modules were removed. These showed outdated technologies anyway. You can still find their source code in the GitHub demo repository with the
v2.6.0.2tag. - The new Home Automation Demo is an example of a tool for visually programming a home automation network.
- BPMN DI file import now correctly handles lane sets in a subprocess node.
yFiles for HTML 2.6.0.2
This 2nd bugfix release for yFiles for HTML 2.6 corrects a small number of errors.
Bugfixes
WebGL2 rendering mode
-
In this rendering mode, certain interactions no longer result in
exceptions when using a
FilteredGraphWrapperwith a folded graph as the complete graph. -
SVG visuals no longer disappear when using
WebGL2GraphModelManagerwith render modeWebGL2GraphModelManagerRenderMode.SVGand a graph item style that changes the instance of the SVG visual in itsupdateVisualmethod. - In this rendering mode, the shadow effect of self-loops and arcs is now an actual shadow, not a wide ambient light. Also, when zooming out, the effects of all edge types now disappear in the same way, in sync with the effects on nodes.
- Browsers no longer complain about certain WebGL vertex attributes being supplied without a bound buffer under certain conditions.
Radial layout
-
The
RadialLayoutclass no longer throws an exception if the layout algorithm is executed too many times from the same instance.
yFiles for HTML 2.6.0.1
The 1st bugfix release for yFiles for HTML 2.6. Compared to version 2.6, it includes several error corrections and a minor incompatible change.
Incompatible change
-
When WebGL2 handles are used in SVG render mode and the
tree-shaking step of the build tool removes the
view-webglmodule, a meaningful error is now thrown. Previously, the handle functionality would just silently break. Add the lineClass.ensure(WebGL2GraphModelManager)to prevent the removal of the module and thus the error.
Bugfixes
View and Styles
-
The
ArrowEdgeStyle's bounds now tightly enclose the rendered shape. Before, they were too large. -
The
StretchStripeLabelModelclass no longer causes incorrect handling of insets. -
ViewportAnimations now are properly cleaned up oncancel. -
Uninstalling the
WebGL2GraphModelManagerclass during an animation no longer causes an exception. - Removing highlighted edges from their graph no longer causes an exception.
-
Changing the
GraphComponent.inputModeproperty while the context menu is open no longer results in an exception. -
The
GroupNodeStyleclass no longer renders a hairline in place of the tab when using astrokein combination withtabWidth0. -
The
ShapeNodeStyleRendererclass now always uses the protectedgetFillandgetStrokemethods for all shapes instead of falling back to the respective style properties for some shapes. -
The indicator style decorators now correctly render elements
provided as
SVGDefsElement. For example, the arrows of theIndicatorEdgeStyleDecoratorare now rendered. -
The
RadialGradientclass now properly respects itsgradientOriginproperty. -
Fixed a memory leak in the
GraphHighlightIndicatorManagerclass that occurred when removing highlighted model items from their graph. - Fixed a potential memory leak that could occur when switching between WebGL2 and SVG render modes.
GraphML
-
During GraphML writing, the
IWriteEvents.DataWritingevent is now dispatched correctly after the writing process instead of before. - Labels whose text start with an opening brace are now correctly serialized to GraphML.
-
Fixed GraphML serialization and deserialization for certain configurations
of the
GroupNodeStyleandRectangleNodeStyleclasses.
Layout
-
The
CircularLayoutclass no longer throws an exception if its propertystarSubstructureStyleis set toCircularLayoutStarSubstructureStyle.RADIALand the whole input graph is a star. -
The
OrganicLayoutclass no longer produces edge overlaps when its propertychainRecognitionis enabled. -
The new protected
LayoutExecutorAsync.graphComponentproperty replaces the incorrectly namedLayoutExecutorAsync.graphControlproperty, which is now deprecated and will be removed in the next major version.
yFiles for HTML 2.6
Major new features
- More supportive source code demos
-
We modernized and improved the implementation of several demos to both make relevant code easier to re-use in your own project and to make it easier to add your own sample data. This includes the large "showcase" demos and more. This is an ongoing effort, and we'll modernize more demos in the coming releases.
Also, the dev server for the yFiles source code demos is now based on Vite. This has many advantages, for example hot module reloading (HMR), automatic compilation of TypeScript code, and errors are displayed in Vite's error overlay with clickable stacktrace.
In addition, there is large number of other notable demo improvements.
- New tutorials
-
We have greatly improved the concept of our tutorials. The respective content is now more focused on a specific topic, which is explained step by step. The user interface now offers more space for the explanatory text, and the related code snippets are embedded directly into the text. At the same time, each step is still a small executable demo that can be experimented with.
For each graph item type, there is now a separate tutorial that presents the implementation of a custom style for that item type based on the corresponding base style class: Node Style Implementation Tutorial, Edge Style Implementation Tutorial, Label Style Implementation Tutorial, and Port Style Implementation Tutorial
The new Graph Builder Tutorial guides you through configuring
GraphBuilderto conveniently transfer business data into a graph that you can display, manage and explore.Basic Features Tutorial is the new more appropriate name of the previous Getting Started Tutorial. Its content has been thoroughly revised, too.
The previous Application Features Tutorial and Layout Features Tutorial are no longer referred to as 'tutorials', as these are rather single source code oriented demos instead of coherent tutorials.
- Extended WebGL2 rendering mode
-
There are many new features, improvements and bugfixes for the WebGL2 rendering mode, most notably:
A new beacon animation and a new halo effect are available for WebGL2 selection, highlight, and focus styles. The former is provided by the new
WebGL2BeaconNodeIndicatorStyleclass while the latter can be enabled with the newWebGL2IndicatorType.HALOenum value. Both effects can be seen in the WebGL2 Animations Demo.The
WebGL2DefaultLabelStyleclass now supports text wrapping, vertical text alignment, and right-to-left text direction.Scaled WebGL2 handles now get a full pixel size for sharp rendering. WebGL2 bend handles and port relocation handles are now updated during move gestures. The
HandleInputModeclass now support rendering in the WebGL2 rendering mode.The
WebGL2GraphModelManager.renderModeproperty can be used to quickly switch between SVG and WebGL2 rendering, and is now used in the Large Graphs Demo.The new
WebGL2GraphModelManager.ShadersCompilingandWebGL2GraphModelManager.ShadersCompiledevents are fired when asynchronous compilation of WebGL2 shaders has started and has finished, respectively. In combination with shader pre-compilation, this can be used to make the graph component visible only after all shaders are available. This is shown in the new WebGL2 Pre-compilation Demo. - Constraint organic layout and more
-
The
OrganicLayoutclass now supports different types of constraints that restrict the placement of the graph's nodes that are specified with the newOrganicLayoutData.constraintsproperty.Such constraints can be used to implement various requirements, as the following new demos show: Metabolic Pathways Demo, Boundary Labeling Demo, Height Profile Demo, and Organic Layout with Constraints Demo.
In addition, organic layout now supports:
-
Integrated edge labeling which can be enabled with property
OrganicLayout.integratedEdgeLabeling(Organic Layout with Edge Labeling Demo) -
Drawing edges such that they point to the main layout direction, specified with the new
OrganicLayoutData.edgeOrientationsproperty -
Individual minimum lengths of edges that can be specified with the new
OrganicLayoutData.minimumEdgeLengthsproperty.
-
Integrated edge labeling which can be enabled with property
- Compact tabular layout
-
The
TabularLayoutclass now supports the calculation of node arrangements that lead to a low overall edge length. This feature can be enabled with the new propertyconsiderEdges.The new Compact Tabular Layout Demo shows how to configure the tabular layout to produce compact drawings.
- New alignment layout stage
-
The new
AlignmentStageclass 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
AlignmentStageDataclass allows specifying custom data considered during the layout calculation.This new feature is shown in the new Node Alignment Demo and Hierarchic Layout with Node Alignment Demo.
- New
HTMLVisualclass -
yFiles for HTML now supports HTML-based visuals. This makes implementing custom node styles with complex CSS-based layouts, lots of text, or input elements much easier than SVG-based visuals.
Demos that use this new visual are HTML Controls Demo, HTML Label Style Demo, and Data Table Demo. In addition, the new demos that show how to use UI framework components as node styles in a React, Vue, and Angular app use this visual.
- CSS-styling for graph items
-
Most built-in styles for graph items now have a
cssClassproperty which specifies theclassattribute of the created SVG elements. This makes styling graph items with CSS instead of the properties of the style class a lot easier. It also enables CSS transitions and animations without the need for custom code. The new CSS Item Style Demo shows this feature in action.The new
Fill.currentColorandStroke.currentColorconstants represent theCSS currentcolorvalue and work especially well with CSS styling. - 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.minimumContentAreaSizeproperty simplifies enforcing a minimum size for the content area a group node. -
GroupNodeStyleoffers 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.renderTransparentContentAreaproperty controls whether a semi-transparent value for thecontentAreaFillproperty works as expected by showing what's behind the group node.
All these improvements are also available on the
WebGL2GroupNodeStyleclass for the WebGL2 rendering mode. -
If
New features
View and Styles
- The WebGL2-based selection, highlight, and focus rendering managers can now be used together with SVG-based graph rendering. Any combination of SVG- and WebGL2-based implementations is supported.
-
The
GraphModelManager.labelLayerPolicyproperty, which defines whether labels should be rendered at their owner or in a separate layer, has been split into the separate propertiesnodeLabelLayerPolicy,edgeLabelLayerPolicy, andportLabelLayerPolicyto support different policies for node, edge, and port labels. -
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, andGraphHighlightIndicatorManagerclasses that can be set as corresponding managers on theGraphComponent. This removes the need for usingNodeStyleDecorationInstaller, etc. -
To render items in a zoom-invariant fashion, their style can be wrapped in one of the new
IndicatorNodeStyleDecorator,IndicatorEdgeStyleDecorator,IndicatorLabelStyleDecorator, orIndicatorPortStyleDecoratorclasses. The main use case for these decorators is using item styles as selection, focus or highlight indicators. -
The new
GraphComponent.SelectionModelChangedevent is raised when the model managing the selection is changed itself, not when the selected items change. -
The new
TextRenderSupport.invalidateTextMeasurementCachemethod can be used to reset measure mode detection for a single font or all fonts.
Layout
-
The
PreferredPlacementDescriptorclass now offers two new static factory methodsfromModelandfromParameter, to createPreferredPlacementDescriptorinstances fromILabelModelandILabelModelParameterinstances, respectively. -
The
CircularLayoutclass now offers the possibility to define star substructures. ItsstarSubstructureStyleproperty specifies the style of star substructures and itsstarSubstructureSizeproperty specifies their minimum size (structures of smaller size are not handled as a star substructure). Furthermore, itsstarSubstructureTypeSeparationproperty specifies whether star substructures should be separated by the node type. The new Circular Substructures Demo shows this feature.The new
CircularLayoutData.edgeDirectednessproperty specifies how the direction of an edge is considered by the detection of star-substructures. -
The
RadialLayoutclass 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.nodeTypesproperty. -
The
RadialLayoutclass 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.outEdgeComparersproperty. It is especially suitable for tree-like input graphs. For specifying a single global order for all nodes, for example, alphabetically, the newRadialLayoutData.nodeComparablesproperty is a more convenient option. -
The
OrganicLayoutclass 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 or circle. This new feature can be enabled with thechainRecognitionandcircleRecognitionproperties. -
Data registered with
GenericLayoutDatais now automatically transferred to a Worker when usingLayoutExecutorAsyncWorker. -
The
HierarchicLayoutclass now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled with theHierarchicLayout.recursiveGroupLayeringproperty. Previously, such constraints were ignored in that case.
Improvements
General
-
All yFiles modules can now be loaded in environments with incomplete SVG implementation, such as
jsdom, without causing exceptions. It is also possible to create a new
GraphComponentin these environments, although many operations on theGraphComponentwill still fail. - License checking is now more careful when testing on non-browser environments and detects them more reliably.
-
Obsolete compatibility files for old yFiles versions have been removed.
Graph and collections
-
The
EdgePathLabelModelandEdgeSegmentLabelModelclasses have been improved to provide better placements with edge-cases where the path is too short for the label or degenerates completely. -
The
GroupNodeLabelModelclass no longer triggers an error when used with or set to a node that does not useGroupNodeStyle.GroupNodeLabelModelis 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 toGroupNodeStyleafter the label model is set toGroupNodeLabelModel. -
The
Listclass now implements theIListEnumerableinterface. This allows usingListinstances where anIListEnumerableis expected, e.g., assigning the instance returned by theIEdge.bends.toListmethod to theSimpleEdge.bendsproperty. -
The types of the
IEnumerable.groupByandIEnumerable.frommethods or now properly inferred from their parameters. Similarly, theList.frommethod can now infer the type argument of the returned list even if nomapFunctionargument was passed. -
The
Exceptionclass no longer re-declares thecauseproperty, but just inherits it fromError, to make sure that the types don't clash. This has been a problem for TypeScript 4.6 through 4.8. -
Functions that are method parameters now have meaningful parameters names and descriptions for
their own parameters. In particular, this applies to the methods of the
IEnumerableclass.
GraphBuilder
-
The
NodeCreator,EdgeCreator, andLabelCreatorclasses can now be used without aGraphBuilder. This enables developers to apply styles and labels from a data object in cases where aGraphBuilderis not suitable for graph creation. -
A
NodeSourcenow allows for recursive definition of child nodes in a grouping hierarchy. The new methodsaddChildNodesSourceandcreateChildNodesSourceallow for defining a source to fetch child node items from a node data item. -
A
NodeSourcenow allows for implicit definition of parent nodes in a grouping hierarchy. The new methodsaddParentNodesSourceandcreateParentNodesSourceallow for defining a source to fetch a parent node item from a node data item. -
The
getUpdatedStylemethod of theNodeCreator,EdgeCreator, andLabelCreatorclasses now uses the default style from the graph as fallback if the style provider is not set. -
The
LabelCreator.getUpdatedLayoutParametermethod now uses the default layout parameter from the graph as fallback if the layout parameter provider is not set. - The TypeScript types for the graph builders and their sources and creators have been made more precise. Many parameters and providers now support strings, objects, or arrays which can be converted into their actual type.
View and Styles
-
All base style classes now have an optional generic type parameter. The type defines the exact type of the visual, making it easier to properly implement custom styles with comprehensive IDE type-checking. In addition, for the
SvgVisualand the newHtmlVisualclasses, there are now factory methods that help with the type-safe creation of the visual along with a type-safe storage of tag data for the purpose of caching rendering data. See the new custom style tutorial on how to use the new type safety.The
IRenderContext.setDisposeCallbackmethod has now a type parameter for the type of theVisualit handles. -
Bends in edges that use
ArcEdgeStyle,ArrowEdgeStyle, orBridgeEdgeStyleare no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they lie in the selection rectangle. - Changing the height of an arc or bridge edge via its handle is now undoable.
-
The
MarkupLabelStyleclass is now faster when the shown text does not contain HTML, and it can now correctly render<sub>and<sup>elements in Firefox.. - The rendering performance of the
ShapeNodeStyleclass has been improved. -
Initial text measurement when adding labels with the
DefaultLabelStyleorMarkupLabelStyleclasses is now faster. - Text measurement no longer sometimes mistakenly uses a slower method, even though this is not necessary.
- Improved SVG rendering performance when embedded in a framework with extensive CSS resets (e.g., Vuetify, Material UI, ...).
-
The rendering order of nodes in the
GraphOverviewComponenthas been improved to be more in sync with the rendering order in the correspondingGraphComponent. -
The
GraphOverviewComponentclass now uses itscontentGroupinstead of therootGroupto add the visualization of its graph content. This makes it easier to customize the overview, for example, by adding a background visual.
WebGL2 rendering mode
-
The
WebGL2DefaultLabelStyleclass now uses the actual label layout to render the labels at the same positions asDefaultLabelStyle, especially with label models that adjust the label size likeInteriorStretchLabelModelandGroupNodeLabelModel. - WebGL2 labels are now rendered in batches to ensure browser responsiveness when lots of labels must be rendered.
-
The
GraphOverviewComponentclass now supports rendering in WebGL2 using suitable WebGL2 item styles for the nodes and edges. Similarly, theGridVisualCreatorclass now support rendering in WebGL2, too. -
Automatic conversion of a
NodeStyleLabelStyleAdapterinstance to a WebGL2 style now yields a closer matching visualization. - The shader for polyline edges compiles faster when only a subset of visual features like dashed, effect, or smooth bends are enabled.
- The fallback shader for polyline edges now respects bends.
-
Several style-related methods of the
WebGL2GraphModelManagerclass have now better types. -
The
WebGL2Strokeclass now supports type conversion from theStrokeclass. -
WebGL2PolylineEdgeStylenow renders polyline edges with smooth bends without artifacts on Android devices that do not have enoughmediumpprecision. These edges will be rendered without smoothing, though.
Interaction
-
The
ItemDroppedInputMode.DragDroppedevent is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
The
MoveInputMode,MoveLabelInputMode, andHandleInputModesub-modes of theGraphEditorInputModeclass no longer have a pre-setSnapContextinstance. Instead, they get theirSnapContextinstance from theInputModeContext. That way, setting theGraphEditorInputMode.snapContextproperty will affect all sub-modes unless a customSnapContextis set to them. -
The new protected
CreateEdgeInputMode.createDummyBendmethod can be overridden to customize bends added during edge creation. The new protectedCreateEdgeInputMode.dummySourceNodePortproperty provides the temporary port used during edge creation and simplifies overriding thecreateDummyEdgemethod. -
The
PortRelocationHandle.createDummyEdgemethod is now virtual and can be overridden. -
The gesture to start edge creation while dragging inside the source node can now be customized
with the new
CreateEdgeInputMode.sourceNodeDraggingFinishedRecognizerproperty. - To improve the usability of resize handle for small nodes, their rendering order has been adjusted.
- To improve the usability of pen input devices, yFiles is more tolerant of small movements during pressing (similar to touch).
-
The
HoveredItemChangedEventArgs.itemproperty is now properly annotated as nullable.
Layout
- For oriented rectangles the intersection test no longer allocates unnecessary memory and no longer creates unnecessary objects, which improves its allocation performance.
-
The
TreeLayoutclass 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 value type of
IncrementalHintItemMappingConvertibleis nowobjectinstead ofanyand matches the return type of the factory methods ofIIncrementalHintsFactory. This means the union type ofHierarchicLayoutData.incrementalHintsno longer containsany.
Bugfixes
Graph
-
The
EdgePathLabelModel.findBestParametermethod now creates correct parameters for locations close to bends. -
NinePositionsEdgeLabelModelcenter 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. -
GroupNodeLabelModelno longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle. -
The
findBestParametermethods ofEdgePathLabelModel,EdgeSegmentLabelModel, andSmartEdgeLabelModelnow create correct parameters for label boxes that overlap the edge's source or target node. -
GroupingSupport's methodsenlargeGroupNodeandenlargeAllGroupNodesno longer create empty undo units if nothing has changed. -
Passing an
IEnumerableas data toGraphBuilder,TreeBuilder, orAdjacencyGraphBuildernow behaves correctly in environments withoutSymbol, such as Internet Explorer. -
Fixed a bug in
LabelCreatorwhich caused settingpreferredSizeBindingsto result either in nothing or an error.
View and Styles
-
GroupNodeStyle's collapse and 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. -
The
GroupNodeStyleclass now shows the icon in a way that renders correctly in non-browser SVG renderers. -
The
DefaultLabelStyleclass now adds an ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape. - Bezier edges no longer turn into polyline paths under rare circumstances.
-
The
ArrowEdgeStyleclass now correctly determines its visibility with thicknesses greater than 13. -
The
IArrowtype converter no longer produces arrows of incorrect size when strings are given that contain only the arrow color in hex and the arrow type, omitting the scale parameter. -
CSS 4 generic font-family names are no longer quoted erroneously when passed to the
Fontconstructor (or used in font conversions). -
The drop shadows created with the
ShadowNodeStyleDecoratorclass are no longer cut off for small node sizes. -
The drop shadow of the
GroupNodeStyleclass is now correctly displayed in the top left part if the corner radius is greater than 16. -
Animated viewport changes of a
GraphComponentno longer cause strange behavior when values for maximum or minimum zoom are set and are also violated by the viewport change. - Layout animation performance has been improved for edges with many bends.
Interaction
- Self-loops no longer disappear when resizing nodes while orthogonal editing is enabled.
-
MoveViewportInputMode's inertia feature is now less easy to trigger when the mouse or touch pointer has stopped moving for some time before releasing the mouse or touch pointer. -
Starting a
CanvasComponentorGraphComponentviewport animation now properly stops a runningMoveViewportInputModeinertia 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.
SmartEdgeLabelModelnow properly supports the original position snap line.- Pinch-zooming no longer jitters when dragging one or more touch points beyond the canvas borders.
-
The
NavigationInputMode.expandGroup,NavigationInputMode.enterGroupmethods, and theICommand.EXPAND_GROUPandICommand.ENTER_GROUPcommands do not create empty undo units anymore if nothing has changed. -
The
NavigationInputMode.exitGroupmethod and theICommand.EXIT_GROUPcommand now create undo units if the bounds of the exited group node were adjusted. -
Fixed a bug in
HighlightIndicatorManagerthat could result in missing or surplus highlight visualizations when changing theGraphComponent.highlightIndicatorManagerproperty. -
Fixed pixelated rendering of handles when a
HandleInputMode.renderModeother thanRenderModes.SVGwas used in combination with aGraphComponent.theme.scalelarger than 1.0. -
The
Workarounds.touchstartPreventDefaultproperty now is only enabled by default on iOS devices. Before, it has been enabled on all touch devices, preventing thecontextmenuevent from being dispatched on certain non-iOS browsers and devices. -
Fixed snapping overwrite with
CTRLmodifier in Firefox on macOS caused by bogus mouse events on these clients.
WebGL2 rendering mode
- WebGL2 rendering mode no longer tries to update the label texture position in the texture atlas if no texture is assigned.
- WebGL2 rendering of edges is now updated correctly when they are reconnected to different ports.
- Layout morph animations with WebGL2 rendering started immediately at app startup now correctly morph the graph.
- The displayed label text is now correctly updated in rendering mode when the label text changes.
- Group node styles are now correctly converted to expanded WebGL2 group node styles.
- WebGL2 rendering no longer breaks if a graph with group nodes is replaced with a graph that does not contain group nodes.
- WebGL2 rendering no longer throws an error when the graph instance is replaced while a label is selected.
-
The
IconLabelStyleclass can now be auto-converted to aWebGL2IconLabelStyleclass without throwing an error. Note however that in this case, the WebGL2 style will render only the label text, not the icon.
Layout
-
For hierarchical layouts, rare combinations of
PortCandidatesinPortCandidateSetsno longer result in exceptions. - In organic layouts, fixed nodes no longer move in any case when also a group node is marked as fixed.
-
The
OrthogonalLayoutclass no longer throws an exception for some input graphs with tree substructures when thetreeStyleproperty is set to a value different fromTreeLayoutStyle.NONE. -
The
EdgeRouterclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
EdgeRouterclass no longer produces self-crossing routes of edges with labels if itsintegratedEdgeLabelingproperty is enabled. -
The
EdgeRouterclass 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. -
The
ClearAreaLayoutclass no longer produces results where the specified area is not cleared for some input graphs when itsclearAreaStrategyproperty is set toClearAreaStrategy.PRESERVE_SHAPESorClearAreaStrategy.PRESERVE_SHAPES_UNIFORM. -
The
PartialLayoutclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
PartialLayoutclass now correctly places disconnected components for cases where a layout orientation is specified, and itscomponentAssignmentStrategyproperty is notComponentAssignmentStrategy.SINGLE. Previously, such components were sometimes placed far away from the remaining graph elements. -
The
ShortestPathsclass now correctly calculates the k-shortest paths of graphs. Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.
Notable demo improvements
In addition to the demos for new yFiles features, the extensive demo modernization, and the new tutorials, all listed above, there have been numerous improvements of demo source code. The most notable ones are listed below. To check out the new demos in the demo overview, filter it to the version "v2.6.0.0".
- We modernized the existing demos for testing frameworks, and added several new ones, namely Jest, Jest Puppeteer, Cypress, Playwright, Selenium Webdriver, Vitest, and WebDriverIO.
- Several new demos show how to use UI framework components as node styles in a React, Vue, and Angular app.
- The new WebGL2 Label Fading Demo shows how to create a level-of-detail behavior by fading graph items in WebGL2.
- The new Neighborhood Circles Demo shows the neighborhood of selected nodes arranged on concentric circles. The concentric arrangement highlights how close the connection between a selected node and a neighbor node is.
- Two new demos show the integration of yFiles in Next.js and SolidJS apps, respectively.
- The React Demo is now based on Vite instead of create-react, and the new React Class Components Demo shows a hooks-only approach in contrast to the class component-based approach of the existing demo.
-
The
Vue Demo is now based on
create-vueand thus uses Vue 3, TypeScript, and Vite. - As part of the demo modernization, demos now make use of modern ECMAScript features when appropriate, and consequently, we dropped support for Internet Explorer for the demos. Note that the yFiles for HTML library itself is still compatible with Internet Explorer 9-11.
- We removed some obsolete demos from the yFiles package, but the last version of their source code is still available in the release 2.5.0.4 of the yfiles-for-html-demos GitHub repo.
- All demos will now be part of the Layout and Viewer yFiles packages. With a viewer-only library, you still won't be able to run a demo that uses the layout part of the API, and vice versa, but you can now easily browse the source code of such demos in your IDE.
- We have changed the category/directory of some demos to improve discoverability. For example, 'complete' has now the more descriptive name 'showcase', and some of its demos moved to other categories like Layout and Styles.
Incompatible Changes
See the Migration Guide for more details and advice on migrating.
Incompatible API Changes
-
The
CactusGroupLayout'sdefaultNodeComparatorproperty has been renamed todefaultNodeComparer. -
The
StarSubstructureStyleenum has been renamed toOrganicLayoutStarSubstructureStylesince there is now also aCircularLayoutStarSubstructureStylewith different values. -
The
GraphModelManager.labelLayerPolicyproperty has been marked as deprecated and will be removed in a future release. Use the more specific propertiesnodeLabelLayerPolicy,edgeLabelLayerPolicy, andportLabelLayerPolicyinstead. -
The
TreeNodeSourceandAdjacencyNodesSourceclasses no longer inherit fromNodeSource. Consequently, theTreeBuilder.setDatamethod now only acceptsTreeNodesSourceinstances instead ofNodesSourceinstances as itsnodesSourceparameter. -
The
HoveredItemChangedEventArgsclass is no longer a subclass of the unrelatedItemEventArgsclass. Nevertheless, it still has the same members as before. -
The type of the
nodeStyleproperties of theWebGL2SelectionIndicatorManager,WebGL2HighlightIndicatorManager, andWebGL2FocusIndicatorManagerclasses changed fromWebGL2NodeIndicatorStyletoWebGL2NodeIndicatorStyle | WebGL2BeaconNodeIndicatorStyle. -
The
YObject.referenceEqualsmethod has been removed. We don't expect anyone to have used this method, and it can simply be replaced with the===operator.
Incompatible behavior changes
-
When
IEnumerable.orderByandIEnumerable.orderByDescendingare called without a comparison function, they now sort numbers by their numerical values. Before, they were sorted by their string values. -
The
ItemDroppedInputMode.dragDroppedevent 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, orBridgeEdgeStyleare no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they are in the selection rectangle. This is because these styles either consider bends as control points or do not consider them at all. -
The
MoveInputMode,MoveLabelInputMode, andHandleInputModesub-modes ofGraphEditorInputModeno longer have a pre-setsnapContext. Instead, they take theSnapContextinstance from the input mode context. That way, changing theGraphEditorInputMode.snapContextproperty will also affect these sub-modes. -
EdgePathLabelModelandEdgeSegmentLabelModelhave been modified to yield better results when the path is not long enough for the label or even completely invisible due to overlapping nodes. This leads to greater visual stability in such cases, but results in slightly different placements in these edge cases. -
Adding a label with
GroupNodeLabelModelto a node that does not useGroupNodeStyleor setting aGroupNodeLabelModel-created parameter for a label whose owner node does not useGroupNodeStyleno longer throws an error claiming "The parameter does not support this kind of label.". -
For
GroupNodeStyleandWebGL2GroupNodeStyle, if the 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
TextRenderSupport.addTextmethod now consistently returns a string containing line breaks for wrapped texts. -
The
EdgeRouterclass now ignores inner node labels by default, see propertyignoreInnerNodeLabels. Previously, this property was disabled by default. -
The
layout-radialmodule now depends on thelayout-treemodule. Since you typically import fromyfilesand not an individual module, this doesn't affect your source code. However, build tools that do tree shaking will now include thelayout-treemodule together with thelayout-radialmodule.
yFiles for HTML 2.5.0.4
This is the 4th bugfix release for yFiles for HTML 2.5. This version brings several error corrections.
Bugfixes
Graph and styles
- When folding is enabled, undoing label removal or re-doing label creation will no longer throw an error.
-
Corrected
NinePositionsEdgeLabelModel's center placements above and below the edge. Before the fix, the labels were not always in the middle of the path, and they seemed to jump around when the path changed. -
The
GroupNodeLabelModelclass no longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle. -
With the
GraphBuilderclass, updating an existing edge whose (new) source or target nodes cannot be resolved now removes the edge from the graph. -
Fixed potential memory leaks in the
GraphBuilder,AdjacencyGraphBuilder, andTreeBuilderclasses. -
The
IconLabelStyle.updateVisualmethod now properly updates the visual if the style'siconis changed.
WebGL 2
- Group node styles are now correctly converted to expanded WebGL2 group node styles.
- WebGL2 rendering no longer breaks if a graph with group nodes is replaced with a graph that does not contain group nodes.
- WebGL2 rendering no longer throws an error if the graph instance is replaced while a label is selected.
-
WebGl2 rendering no longer shows warnings about
GL_INVALID_OPERATIONin the browser's console if polyline edges are selected.
Layout
-
The
EdgeRouterclass 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. -
A circular layout with
LayoutStyle.BCC_ISOLATEDcan no longer get into an infinite loop for inputs where a component consists only of articulation points. -
The
GenericLabelingclass 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.
yFiles for HTML 2.5.0.3
This is the 3rd bugfix release for yFiles for HTML 2.5. This version brings a minor incompatible change, some improvements of the Dev UX, several error corrections, and some demo improvements.
Minor incompatible change
The value of the DefaultLayerSequencer.maximumDuration property is now
unrestricted. Previously, it was restricted to 10 seconds. This class is used by the
HierarchicLayout class, which still adheres to its own maximum duration.
Therefore, we do not expect this change to have any negative practical impact.
Improvements
- We replaced all usages of "direct eval" with "indirect eval". This should avoid problems when the code is optimized by build tools like esbuild.
- In the TypeScript type definitions, the documentation of option object properties now correctly references the corresponding member documentation, which usually contains more information about this API.
Bugfixes
General
- The custom formatters for the browser's dev tools can now be used again. In a previous version, we accidentally broke their registration code.
Hierarchical Layout
-
The
HierarchicLayoutclass no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode -
For input graphs with a
PartitionGridstructure, theHierarchicLayoutclass now correctly considers the layering produced by itsfromScratchLayererif it is already compatible with the specified grid structure. -
The results of the
DefaultLayerSequencerclass are now deterministic by default, since it no longer aborts the calculation after 10s. For this, itsmaximumDurationvalue is now unrestricted.
Organic Layout
-
The
OrganicLayoutclass now satisfies itsdeterministicproperty for more often, even if the maximum duration is restricted. Note, however, that non-deterministic behavior is still possible when restricting the duration. -
The
OrganicLayoutclass no longer violates the specified minimum node distance for separated radial substructures. -
The
OrganicLayoutclass no longer produces broken routes of self-loops at group nodes if thescopeis not equal toOrganicLayoutScope.ALL.
Orthogonal Layout
-
The
OrthogonalLayoutclass no longer generates overlaps between edge segments (of a parallel edge) and edge labels of other edges for some rare scenarios. -
The
OrthogonalLayoutclass 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.
Edge Router
-
The
EdgeRouterclass now correctly considers the maximum duration and theAbortHandlerwhen the octilinear routing style is chosen. Previously, it could happen that the algorithm kept on running even though the time was up. -
The
EdgeRouterclass no longer throws an exception for some rare cases with collinear bends.
Other Layouts
- Improved the initialization time and memory consumption of layout animations.
-
The new
CactusGroupLayoutData.nodeComparerproperty specifies the comparison function used to sort a parent node's child nodes. -
The
SingleCycleLayoutclass no longer produces violations of the specified minimum node distance. -
The
ClearAreaLayoutclass no longer produces results where the specified area is not cleared for some input graphs itsclearAreaStrategyproperty is set toClearAreaStrategy.PRESERVE_SHAPESorClearAreaStrategy.PRESERVE_SHAPES_UNIFORM. -
The
PolylineLayoutStageclass now correctly considers a registeredAbortHandlerinstance so that it is possible to terminate early. Previously, the stage ignored theAbortHandler.
New demos and notable demo improvements
- The new Subdivide Edges Demo shows a custom interaction that lets users insert a node into an edge by dropping it onto its path.
- The new Parcel Demo shows how to integrate the yFiles library in a Parcel project.
- The Angular CLI Demo now shows how to run more yFiles features "outside of Angular". This can drastically improve performance, especially of layout calculations.
- The HTML Label Style Demo now shows styles which better support interaction. The visualizations now include scrollable areas and clickable links.
yFiles for HTML 2.5.0.2
This is the 2nd bugfix release for yFiles for HTML 2.5. This version brings several error corrections, including all fixes from version 2.4.0.7, and new demos.
Exceptionally, this bugfix release also contains an incompatible change related to the new shape text wrapping feature. Since this feature was only introduced in 2.5 and the change improves the vast majority of use cases, we decided to implement it in this release instead of waiting for 2.6.
Incompatible change
-
The default value of the
DefaultLabelStyle.textWrappingShapeproperty is nowTextWrappingShape.RECTANGLE. The previous defaultTextWrappingShape.LABEL_SHAPEresulted in unexpected and inconsistent rendering behavior for labels whose style only differed in theDefaultLabelStyle.shapeproperty.
Bugfixes
Graph and View
-
With
DefaultLabelStyleand itstextWrappingShapeproperty set torectangle) the results of the preferred size calculation are now more compact and more consistent between the different available label shapes. In particular, the height is now the same for all shapes, and as a result, labels whose style just differ in shape now get the same height by default.Consequently, the default value of the
DefaultLabelStyle.textWrappingShapeproperty is nowTextWrappingShape.RECTANGLEinstead ofTextWrappingShape.LABEL_SHAPE. -
Viewport animations no longer suddenly stop when the current
CanvasComponent.zoomvalue approaches the values of theminimumZoomormaximumZoomproperties. -
Using
HierarchicNestingPolicy.GROUP_NODES,LabelLayerPolicy.AT_OWNERand undo support together in aGraphComponentno longer results in an error. -
The
CanvasComponent.cleanUpmethod now removes all internal event listeners from thedivelement. Version 2.5 introduced a new listener that was not properly removed, resulting in a potential memory leak or unexpected behavior. -
The promise returned by the
SvgExport.exportSvgAsyncmethod is now fulfilled, even when the graph contains styles with an SVG<image>element whosehrefattribute is either empty or not present at all. Previously, the promise remained forever in pending state in this case. -
The TypeScript type definitions now specify the
DashStyle.dashesproperty as nullable instead of not-null, since this was always the intended state. In fact, theDashStyle.SOLIDsingleton always usednulldashes. -
The
NodeEventArgs.parentproperty of theFilteredGraphWrapper.NodeRemovedevent no longer provides groups that are only present in the complete graph but not in the filtered graph itself.
Interaction
- Pinch-zooming with two fingers now works a lot more reliably when the frame rate is low due to complex and large graphs.
-
All UI components now listen for the
pointercancelevent ofpendevices and handle it likelostpointercaptureevents. Thus, if such an event occurs, theCanvasComponent.MouseLostCaptureevent is now fired, and active input modes properly clean up their internal state. In version 2.5, we already added this for devices oftouchpointer type. - If the graph component's internal event processing has entered an invalid state due to incomplete native mouse events, it will now recover in more cases and explicitly abort the ongoing user interaction.
- When the "Tap to click" setting is enabled for the trackpad under macOS, a tap on the trackpad is now actually reliably recognized as a click. Previously, many of these taps were ignored, since the browser often doesn't provide sane native events in this case.
- Touch move events are now guaranteed to be raised up to the location where a touch up event happens.
-
After pasting, a closed group node within another closed group now
stays closed. Previously, it was open due to a bug in the
GraphClipboardclass.
WebGL2
-
The
SvgExportclass now works correctly with WebGL2 rendering mode. It now makes sure that parallel shader compilation is disabled, and waits until the actual shaders are compiled to use them for rendering into the exported element. -
The promises returned by the
IAnimation.startandIAnimation.stopmethods are now fulfilled even when the animation is not associated with any graph item. Also, these promises are now fulfilled when the correspondingWebGL2GraphModelManageris removed from itsGraphComponent. Previously, such promises remained forever in pending state.
Layout
-
The
HierarchicLayoutclass now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled. Previously, such constraints were ignored in that case. -
The
OrthogonalLayoutclass now correctly considers the specified minimum group node sizes. Previously, the minimum sizes were always enlarged by the groups' insets. Actually, the minimum size should include the insets. -
The
GenericLabelingclass no longer produces superfluous label overlaps if one of itsremoveNodeOverlapsorremoveEdgeOverlapsproperties is enabled. -
The
TabularLayoutclass 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
IsolatedGroupComponentLayoutclass no longer produces unnecessarily large group nodes if the specifiedgridSpacingis zero.
New demos
- The new Company Ownership Chart Demo allows you to interactively explore the ownership of companies and their management relationships.
- In the new Deep Zoom Demo you can seamlessly zoom into the contents of deeply nested group nodes, similar to "deep zoom" for images.
- The new React JSX Component Node Style Demo presents a versatile and easily customizable template node style based on JSX and React.
- The new Lit Template Node Style Demo presents a versatile and easily customizable template node style based on the Lit templating framework.
- The Simple Arrow Style Demo shows the implementation of a basic custom arrow visualization for edges.
- The new Non-ribbon Chord Diagram Demo shows how to create a chord diagram that emphasizes the connections between nodes.
- In addition, we have made improvements and fixed bugs in several other demos. Particularly noteworthy are the improvements of the Tree of Life Demo.
yFiles for HTML 2.5.0.1
This is the 1st bugfix release for yFiles for HTML 2.5. This version brings no incompatible API changes.
Bugfixes
Interaction
-
The
HandleInputMode.handleIsHitTouchmethod now correctly uses the value of theCanvasComponent.hitTestRadiusTouchproperty instead of the value of theCanvasComponent.hitTestRadiusproperty for its calculations. As a result, dragging handles during touch input should be much easier. -
An instance of the
HandleInputModeclass is no longercanceledif a handle is removed during its owndragFinishedcall. This fixes some very rare exceptions under complicated circumstances. -
The new
columnValidBeginCursor,columnResizeCursor,rowValidBeginCursor, androwResizeCursorproperties of theResizeStripeInputModeclass now have reasonable default values, namelyCursor.COL_RESIZEandCursor.ROW_RESIZE, respectively. These are also the cursors that were used by default for column and row editing in yFiles for HTML 2.4. -
The new workaround flag
Workarounds.ff1729465can be enabled to skipEvent.preventDefaultcalls on touch events. It is enabled by default in Firefox to allow multitouch gestures there. Otherwise, yFiles would callEvent.preventDefaulton the primary touch event, preventing any secondary touch events in Firefox, too. See Firefox bug 1729465 for details.
View
-
Cloning an
ITableinstance now properly clones all the table's internal state. Previously, changing a cloned table's insets could result in the cloned table's stripes not updating their geometry. -
The
MarkupLabelStyleclass is now properly excluded from obfuscation such that reading and writing GraphML files with items that use this style works without errors.
WebGL2
-
The
WebGL2GraphModelManagerclass no longer throws aTypeErrorwhen switching from WebGL2 to SVG rendering. Previously, many circumstances could trigger such an error. -
Enabling the
Workarounds.precompileWebGLSelectionShadersproperty no longer results inTypeErrors. - The simple and fallback highlight indicators now support elliptical shapes in addition to rectangular shapes, such that these initial visualizations match more closely the actual indicator visualizations.
-
The
WebGL2Animator.cleanUpmethod no longer completely resets the animation to the start state. As a consequence, aWebGL2Animationthat is run with theAnimatorclass now again stays in its final state, as it was the case in yFiles for HTML 2.4. This is notable for animations like fade and scale. -
Edges with the
WebGL2ArcEdgeStyleclass are now also rendered if their height is close to 0. Similarly, edges with theWebGL2BridgeEdgeStyleclass and a height close to 0 now show shadows and ambient lights correctly. -
Using the
WebGL2ArcEdgeStyleclass with a dashed line no longer causes an exception. - Fixed a bug that sometimes used the wrong WebGL2 styles when WebGL2 rendering is used together with Folding.
Demo improvements
-
BPMN Editor Demo:
EventPortStylesdo not share internal state after cloning anymore. Thus, changing the properties of one instance will no longer affect other instances, too.
yFiles for HTML 2.5
Major new features
- New styles for graph items
-
The
RectangleNodeStyleclass 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 Rectangle Node Style Demo presents this style.The new
GroupNodeStyleclass 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 Group Node Style Demo shows some of the possibilities of this style. The implementation of this style is in the new module filestyles-group.The new
ArrowNodeStyleclass 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. You can interactively explore the settings of this style in the new Arrow Node Style Demo.Similarly, the new
ArrowEdgeStyleclass 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 new Arrow Edge Style Demo presents the options of this style.The
DefaultLabelStyleclass now supports different common background shapes. The new Default Label Style Demo shows these shapes and other settings of this style.The
ShapeNodeStyleclass now supports three additional shapes:ShapeNodeShape.HEXAGON2(a six-sided polygon with tips at top and bottom),ShapeNodeShape.STAR5_UP(a five-pointed star with one tip pointing upwards), andShapeNodeShape.PILL(a stadium shape with the shorter sides rounded). The new Shape Node Style Demo shows the main features of this style.The new
BridgeEdgeStyleclass 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
DefaultLabelStylenow wraps the text inside a given shape instead of just the rectangular label bounds. TheTextWrappingShapeenum provides the predefined shapes, and includes for example pill, ellipse, and hexagon. The newDefaultLabelStyle.textWrappingPaddingproperty defines the padding between the chosen shape and the text.If the predefined shapes don't fit your needs, you can override the
DefaultLabelStyleRenderer.getPathForTextWrappingShapemethod to return any custom convex path asGeneralPathinstead.In a related improvement, an optional
GeneralPathparameter has been added to theTextRenderSupport.addTextmethod that defines a convex shape in which the text will be placed.The Label Text Wrapping Demo now also shows how to wrap text labels inside non-rectangular shapes like triangles, ellipsis or hexagons.
- New styling options in WebGL2 rendering
-
The following new styling options bring the configurability of WebGL2 rendering almost on par with the built-in styling features of the SVG rendering mode.
The new
WebGL2GroupNodeStyleclass is a dedicated WebGL2 style for group nodes with the same features as the newGroupNodeStyleclass. The new Group Node Style Demo presents this style.The
WebGL2DefaultLabelStyleandWebGL2IconLabelStyleclasses now support rotated text.The new
WebGL2PolylineEdgeStyle.smoothingLengthproperty allows rendering edge paths with smooth, rounded bends in WebGL2 mode.The styling of the selection, the highlight, and the focus indicators can now be customized in various ways, similar to the styling of graph items, with the various new
styleproperties of theWebGL2SelectionIndicatorManager,WebGL2HighlightIndicatorManager, andWebGL2FocusIndicatorManagerclasses.The
WebGL2Strokeclass now supports dashed and dotted lines, thus all graph item styles and all indicator styles can use such lines. In particular, all WebGL2 edge styles can now draw dashed edge paths. The newdashStyleproperty of strokes specifies the dash pattern, and its newlineCapproperty specifies the style of the line and dash caps.The reworked WebGL2 Styles Demo and the new WebGL2 Selection Styling Demo allow you to interactively explore the new possibilities.
- More powerful animations for WebGL2 rendering
-
New animations complement the existing fade, pulse and shake animations, namely:
- A scaling animations allow you to grow or shrink graph items.
- A beacon animation adds a beacon-like ripple effect to nodes.
- A halo animation makes a solid halo appear around a node.
- All dashed strokes of the graph item styles and the indicator styles (like the selection style) can be moved in an animated way.
All animations are shown in the extended WebGL2 Animations Demo.
Like before, an animation is created with its factory method at the
WebGL2GraphModelManagerclass, but the API of these methods was refined to be more consistent and flexible. All factory methods now have atimingparameter of typeWebGL2AnimationTimingto specify the duration, easing, iteration count, and direction of an animation. For easing, all typical easing functions are now available, namely ease, ease-in, ease-out, ease-in-out, linear, and step. Last but not least, WebGL2 animations can now be zoom-invariant for zoom values below 1.The
WebGL2Animationclass has new methods to directlystart,stop, andresetthe animation, removing the need to control them with anAnimator. The latter is still useful for running multiple animations in sync. - Compact disk layout
-
The new
CompactDiskLayoutclass 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
CompactDiskLayoutDataallows to specify custom data considered during the layout calculation.This layout is used in the Layout Styles Demo, Compact Disk Groups Demo, and Node Types Demo.
- Cactus group layout
-
The new
CactusGroupLayoutclass 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
CactusGroupLayoutDataallows to specify custom data considered during the layout calculation. The implementation of the layout is in the new module filelayout-cactus.The Large Graph Aggregation Demos and the Cactus Group Layout Demo use this layout.
- Modern look for handles, selection, scrollbars, etc.
-
The new
Themeclass provides an easy way to customize state and interaction visualizations like handles or selection. A theme is set to theCanvasComponent.themeproperty. Its settings apply to all supported elements, but it's still possible to override the theme on a per-element basis with the existing APIs.In detail, a theme specifies a
ThemeVariant, that defines the overall look, and primary, secondary, and background colors. Available variants areCLASSIC, that applies the current styling, and the newSIMPLE_SQUAREandSIMPLE_ROUNDvariants. These two use a more simplified styling with either rectangular or round shapes. ATheme.scalevalue can be set to increase the size of handles, port candidates and selected bends.In addition, the scrollbars now have an optional new modern style and behavior similar to the current look of macOS, Windows 11, and mobile operating systems. If enabled, scrollbars appear only when needed and fade out after a small delay unless users interact with it. This can be enabled with the new
ScrollBarVisibility.AS_NEEDED_DYNAMICconstant.Most demos make use of the new simple-round theme and of the modern scrollbars. In the new Theming Demo, you can explore the effect of the options on the available variants, and the new Theming Tutorial shows how to set a theme in code.
- Developer experience
-
By default, the TypeScript type declaration files work now as well in Visual Studio Code as they already did in WebStorm. Previously, yFiles for HTML came with different versions of these files for each IDE and users of Visual Studio Code could switch to types that worked better for them by running an extra script. This is no longer necessary due to the usage of a common syntax format.
New Features
View and Interaction
-
The
IPortLocationModelParameterinterface now provides static helper methods to convert the built-inIPortLocationModelParameterimplementations into key-value pairs. It also supports creatingIPortLocationModelParameterinstances from these key-value pairs. -
Similarly, the
ILabelModelParameterinterface now provides static helper methods which can convert the built-inILabelModelParameterimplementations into key-value pairs. It also supports creatingILabelModelParameterinstances from these key-value pairs. -
The new property
CanvasComponent.mouseWheelZoomEventRecognizercan be used to set the modifier for distinguishing between mouse wheel scrolling and zooming. -
The new
getNodesRevealedAfterExpand,getEdgesChangedAfterExpand, andgetEdgesChangedAfterCollapsemethods ofFoldingManagercan be used to retrieve information about folding states used when a specified group node is expanded or collapsed. - Holding down the scrollbar buttons will now scroll continuously in that direction. The same applies to keeping the scrollbar track pressed.
-
The
ImageNodeStyleclass now supports a numericaspectRatioproperty with which a specific aspect ratio of the rendered image can be set. In addition, the new async staticImageNodeStyle.getAspectRatiomethod can be used to determine the aspect ratio of an image. -
Handles can now react to mouse clicks and touch tap events. The
handleClickmethod has been added to theIHandleinterface and is called whenHandleInputMode.clickedRecognizerorHandleInputMode.clickedRecognizerTouchwas triggered on a targeted handle. To customize the general handle click handling, theClickedevent can be listened to or theHandleInputMode.handleClickmethod can be overridden.
WebGL2
-
The new
effectproperty on the WebGL2 edge styles (WebGL2PolylineEdgeStyle,WebGL2ArcEdgeStyle,WebGL2BridgeEdgeStyle) and WebGL2 label styles (WebGL2DefaultLabelStyle,WebGL2IconLabelStyle) specifies shadows or ambient lights around edges or labels, respectively. - The WebGL2 style of a new or restored graph item is now automatically set or restored by undo, paste, fold, and filter as it would be with a normal style. Previously, such a new item got a WebGL2 style converted from the normal style, and a manually set WebGL2 style would be lost.
-
The rendering order of graph item types in WebGL2 mode can now be
specified by reordering the corresponding canvas object groups of the
WebGL2GraphModelManagerclass. - To improve the time to the first paint, each complex WebGL2 program is accompanied by a simplified version that is fast to compile. On systems that support parallel program compilation in the background, these programs are loaded first and used for a first simplified rendering. Then an actual program is ready, it instantly replaces its simplified version. On systems without parallel compilation, this would just block the browser even longer, and therefore, these simplified programs are not used.
Organic Layout
-
The
OrganicLayoutclass now offers the possibility to define a group substructure scope, see thegroupSubstructureScopeproperty. 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
OrganicLayout.clusterAsGroupStructureAllowedproperty allows to specify whether detected clusters (see theclusteringPolicyproperty) are taken into account as group substructures. -
The
OrganicLayoutclass now offers two newChainSubstructureStylescalledDISKandDISK_NESTEDthat lead to a compact disk-like layout for chains. -
The
OrganicLayoutclass now offers the possibility to define tree substructures (stars, chains, cycles, and parallel structures are already supported). TheOrganicLayout.treeSubstructureStyleproperty allows to specify the style of tree substructures and theOrganicLayout.treeSubstructureSizeproperty specifies their minimum size (structures of smaller size are not handled as a tree substructure).
Radial Layout
-
The
RadialLayoutclass now supports a new layering strategy that produces a circular dendrogram drawing. -
The
RadialLayoutclass 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
RadialLayoutnow 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.
Other layouts
-
The
HierarchicLayoutclass now supports so-called tabular group nodes. The children of such groups are arranged in a compact tabular fashion, for example, like a single column table for layout orientation left-to-right. TheHierarchicLayoutData.tabularGroupsproperty allows to mark groups as "tabular" and theHierarchicLayoutData.tabularGroupChildComparersproperty allows to specify a custom order for the children.The new Tabular Groups Demo shows this new feature of the hierarchic layout.
-
The
BalloonLayoutclass 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.nodeTypesproperty.In the Node Types Demo,
BalloonLayout, andCompactDiskLayout, are new layouting options. -
The
CircularLayoutnow 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
CircularLayoutclass now supports curved edge routing within and between circles.
Analysis
-
The new
RankAssignmentanalysis algorithm class solves the rank assignment problem on an acyclic graph using the simplex method. -
The new
Intersectionsanalysis class finds intersections and overlaps between graph items, featuring flexible configuration options to find only specific intersections. The respectiveIntersectionAlgorithmclass provides the functionality also for theLayoutGraphAPI, but offers less convenience.The new Intersection Detection Demo shows how to use this analysis features to detect and highlight different types of intersections/overlaps between graph items.
Improvements
General
-
Convertible properties and parameters of type
IEnumerablenow also accept generator functions. - License validation now correctly handles web workers loaded from Blob URLs. Previously, this scenario has been erroneously classified as running from the file system.
-
All enumerations in the library now have a static
frommethod that allows to convert valid strings to the respective enumeration constant. -
The
Exception.innerExceptionproperty has been renamed tocauseto conform to recent additions of the ECMAScript spec. -
The version of the yFiles npm packages now uses build metadata to indicate which
variant of yFiles it is. Namely, the build metadata specifies whether it's an
evaluation version (
eval), whether it includes development mode information (dev), and whether it consists of only theviewerorlayoutparts of the API. Some of these were previously included in the pre-release part of the version string which was semantically not correct. -
It's now possible to have two independent yFiles instances, even in development
mode, since no global
yfilesobject is created any more by this mode by default. The new global functionyfilesDebug(ID? : string | Element)is the new way to call the previousyfiles.debug(ID)function. - The API documentation provided with the TypeScript type declaration files has been improved to provide better readability in IDE help panels. Also, the properties of configuration options now provide proper documentation in the help panels.
- In the yFiles download packages, the library is now included as tgz npm packages, in both the normal and the development mode variant. This eliminates the need to assemble these packages at first startup, which sometimes caused problems.
Collections
-
The new
IEnumerable.atmethod provides a similar API for retrieving elements by index as the new native JavaScript Array method of the same name. -
The parameters of the
IEnumerable.groupBymethod are now similar to the recentTC39proposal for theArray.groupfunction. Note that for compatibility reasons with previous yFiles versions, its return value is still the same. -
The new
IEnumerable.findLastandIEnumerable.findLastIndexmethods provide a similar API for finding elements in an enumeration starting from the back as the new native JavaScriptArraymethods of the same name.
Graph
-
GraphBuilder,TreeBuilder, andAdjacencyGraphBuildernow offer 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(onlyGraphBuilder),getEdgeForItem(onlyGraphBuilder), andgetDataItem(IEdge). -
The
nodeparameter of theIGraph.setIsGroupNodeis now correctly annotated as not-null, since the documentation always stated that this method throws an error if the node isnull. -
The different
GraphBuildersnow also accept generator functions as nodes and edges source.
View
-
All UI components now listen for the
pointercancelevent and handle it likelostpointercaptureevents. Thus, if such an event occurs, theCanvasComponent.TouchLostCaptureevent is now fired and active input modes properly clean up their internal state. -
GraphClipboardnow respects thepasteDeltaproperty value when pasting items without owner (e.g. edges without selected source or target node). -
ModelManagerand its derived classesHighlightIndicatorManager,SelectionIndicatorManager, andFocusIndicatorManagernow haveinstallanduninstallmethods for properly allocating and freeing resources when setting or removing a manager to aCanvasComponent. -
GraphModelManager: the propertiesnodeManager,edgeManager,portManager,edgeLabelManager,nodeLabelManager,portLabelManager, andprovideUserObjectOnMainCanvasObjecthave been made public. -
The look and feel of WebGL handles can now be customized using
the
themeproperty of theCanvasComponent. -
GraphOverviewComponentwithrenderModeset toCANVASorWEB_GLno longer draws nodes and edges that are hidden viaVoidNodeStyleandVoidEdgeStyle. -
The
CanvasComponentclass now repaints more efficiently during animations if more than oneAnimatoror theWebGL2Animation.startmethod is used. -
SvgExportnow has an option to specify a background color for the exported SVG image. -
CanvasComponent.fitContentandGraphComponent.fitGraphBoundsnow both have a synchronous non-animated overload that does not have to beawaited. -
The
freezemethod of theFill,Stroke,DashStyle, andGradientStopclasses now returns the frozen object itself, reducing boilerplate code for single-use instances that should be frozen for performance reasons.
Styles
-
Nodes rendered with the
ShapeNodeStylenow respect their actual outline shape when selected with theLassoSelectionInputMode. -
DefaultLabelStyle's performance for single-line labels with wrapping enabled that actually do not need to be wrapped as well as updating the label visualization after a change has been improved. - 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.
Interaction
-
Input modes now listen for the
Touch2DLostCaptureevent of the associated component, so that this event can be correctly detected in the 'recognizer' properties of an input mode. -
A
sizeConstraintProviderproperty was added toNodeReshapeHandleProviderandNodeReshapeHandlerHandlethat is queried during node resize gestures if no explicitminimumSize,maximumSizeorminimumEnclosedAreaare set. - The input modes don't perform hit tests upon auto-repeated key down events for modifier keys anymore.
- The behavior of the inertia during touch inputs has been improved. As part of this improvement, synthetic mouse wheel events fired by Safari during pin gestures are now ignored.
-
The new
MoveViewportInputMode.allowSinglePointerMovementproperty can be used to disable moving the viewport with a single touch pointer. Disabling this property is especially useful for apps that allow editing since then, other gestures like moving items or creating edges can be configured to start without a long press. - Cursor property changes of active input modes are now immediately reflected in the mouse cursor. Previously, the mouse cursor might have been updated only after the next mouse event.
-
The new
MoveInputMode.validBeginCursorproperty offers the possibility to use different cursors for signaling a valid position for beginning a move operation and actually moving items. -
The
ResizeStripeInputModeclass 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
ResizeStripeInputModeclass 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
validBeginRecognizerandvalidBeginCursorproperties have been added toLassoSelectionInputMode,MarqueeSelectionInputModeandMoveViewportInputMode. ThevalidBeginRecognizercan be used to indicate whether the selection respectively move viewport gesture may begin in which case thevalidBeginCursoris used. -
The property
MouseHoverInputMode.validHoverLocationCursorhas been added that is used when thevalidHoverLocationHitTestablereturnstruefor a location. -
The property
ContextMenuInputMode.validMenuLocationCursorhas been added that is used when theValidMenuLocationHitTestablereturnstruefor a location. -
IReparentHandler.isValidParentis now also called withnullas new parent during the drag gesture if no real parent node has been tested for the location. -
Keyboard navigation with
NavigationInputModenow always considers the current item to navigate from, regardless of the value of thenavigableItemsproperty. -
The
GraphClipboardnow raises the eventsElementsCutting,ElementsCopying,ElementsPasting, andElementsDuplicatingat the very beginning of thecut,copy,paste, andduplicatemethods. -
GraphEditorInputModenow raises theSelectionGroupingandSelectionGroupedevents at the start and end of thegroupSelectionmethod. Similarly, theSelectionUngroupingandSelectionUngroupedevents are raised at the start and end of theUngroupSelectionmethod. -
The new
CreateEdgeInputMode.sourceNodeDraggingCursorproperty 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'shoverCursorproperty now take effect immediately if the mouse pointer is currently hovering over an item. -
The
TextEditorInputModeclass now releases the mutex before raising theTextEditedevent. -
CreateEdgeInputModenow allows for asynchronous edge creation. TheedgeCreatorcallback as well as thecreateEdgemethod may now return aPromisethat resolves with the asynchronously created edge. -
GraphEditorInputModenow allows for asynchronous node creation. TheNodeCreatorcallback as well as theCreateNodemethod may now return aPromisethat resolves with the asynchronously created node. -
A
Tooltipwith a customtoolTipParentElementis not wrapped unexpectedly anymore when overflowing the tooltip parent element. -
ReparentStripeHandlercan now be initialized with option arguments to more conveniently initialize instance properties at creation. -
The touch pan gesture can now be configured to start with two
fingers instead of one, using the
MoveViewportInputMode.startWithTwoPointersproperty. - The snap lines indicating that a node will be resized to the same width or height than another one now keep a bit more distance to their node so that they are better recognizable.
-
The
MoveViewportInputMode.Uninstallmethod is now virtual and can be overridden in derived classes.
WebGL2
- WebGL2 animations can now loop indefinitely.
-
WebGL2IconNodeStyle,WebGL2DefaultLabelStyle,WebGL2IconLabelStylenow support two rendering hints to resolve blurriness of text and icon labels on large zoom values, namely using blurriness or sharpened edges. - The scaling of WebGL2 arrows has been adjusted to produce reasonable arrow sizes for thick edges.
-
Non-selfloop edges with
WebGL2ArcEdgeStyleare now drawn smoothly without kinks. -
The
WebGL2GraphModelManager.getWebGL2LabelStylemethod may now return an instance of either aWebGL2DefaultLabelStyleor, new, aWebGL2IconLabelStyle. Although the default implementation does not return instances ofWebGL2IconLabelStyle, a custom implementation might want to do this.
TypeScript
-
The
ILookup.lookupmethod now infers its return type from the given parameter. -
TextRenderSupport.addTextnow advertises the proper type for itstargetElementparameter in the typings and not just the documentation. -
The
License.valueproperty has now the more specific typeRecord<string, unknown>instead ofobject.
Hierarchic Layout
-
The
HierarchicLayoutclass now allows to combine theSimplexNodePlacer.straightenEdgesandSimplexNodePlacer.barycenterModeproperties. Previously, edge straightening was not supported in barycenter mode. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass 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
PartitionGridstructure, theHierarchicLayoutclass now correctly considers the layering produced by thefromScratchLayererif it is already compatible with the specified grid structure. Previously, for such cases, the algorithm may have calculated an entirely different layer assignment. -
The
HierarchicLayoutclass now considers the flow direction to place the ports of port groups when combined with direct group content edges. -
The
HierarchicLayoutclass comes with an improved support for subcomponent layouts (seeHierarchicLayoutData.subcomponents). Defining subcomponents now works by assigning instances of the newSubcomponentDescriptorclass 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.ALWAYS_INTEGRATEDorSubcomponentPlacementPolicy.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
HierarchicLayoutclass now uses a more compact layer placement for graphs with edge labels between layers. -
The
HierarchicLayoutclass now requires fewer bends for some inputs with grouped edges and port constraints or port candidates.
Edge Router
-
The
EdgeRouterclass now produces better results for some setups with monotonic path restrictions and edges with vertically/horizontally overlapping endpoints. -
The
EdgeRouterclass 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.portCrossingPenaltyallows to specify the cost of such crossings. -
The
EdgeRouterclass now supports buses that include self-loops (see theBusDescriptorclass). Previously, self-loops have been ignored.
Other layouts
-
Several layout algorithms have been improved in performance in
certain situations, including
HierarchicLayoutandEdgeRouter. The improvement is most noticeable in certain settings for larger, complex graphs. -
The
OrganicLayoutclass 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
OrganicLayoutclass now allows to specify custom node clusters by setting theclusteringPolicyproperty toClusteringPolicy.USER_DEFINED. The custom cluster IDs have to be specified by means of theOrganicLayoutData.clusterIdsproperty. -
Root Alignment in
GenericTreeLayoutcan also factor in the port position to straighten out an edge. -
The
TreeLayoutclass now also supports integrated edge labeling for configurations that use aLayeredNodePlacer. -
The
CircularLayoutclass 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
CircularLayoutclass has received a faster algorithm for calculating edge bundles. - The generic labeling algorithm has an additional preset to avoid overlaps of labels and the partition grid.
-
The
TemporaryGroupNodeInsertionStageclass now automatically marks inserted group nodes with anIDataProviderregistered to the input graph with the keyINSERTED_GROUP_NODE_DP_KEY. -
The
TemporaryGroupNodeInsertionStageclass now also supports specifying hierarchically nested temporary groups. Therefore, the newTemporaryGroupDescriptorclass has been added.
Analysis
-
The
TraversalDirectionenumeration used by theNeighborhoodandBfsalgorithms has been extended. The enum valueUNDIRECTEDhas been added that ignores the edge direction and corresponds semantically with the previous valueBOTH. The meaning ofBOTHhas been adjusted to indeed return the union of theSUCCESSORand thePREDECESSORresults. To keep the default behavior of theNeighborhoodandBfsalgorithms, the default value of theirTraversalDirectionproperty has been changed fromBOTHtoUNDIRECTED. -
The
GraphStructureAnalyzerclass now supports operating on a subset of the graph. -
The new
subgraphNodesandsubgraphEdgesproperties on theReachabilityclass allow to define a subset of nodes/edges the algorithm should operate on.
Bugfixes
General
-
In Viewer and Layout yFiles packages, the UMD library now
correctly specifies the
view.jsand, respectively, thelayout.jsfile asmainentry point in itspackage.jsonfile.
Graph
-
The
keyparameter of theInputHandlerBase.setValuemethod is now annotated correctly as nullable. The key may benullwhen the model item used as the key is created after its data has been parsed. -
Label bindings which don't provide label data, or
null, no longer add empty labels. Instead, no label will be added. -
Enumerating the
Mapper.entriesproperty no longer throws an exception.
View
-
PortRelocationHandle.visualizationcan now be set toVisualization.GHOSTwithout throwing an exception. -
Changing the
ICanvasObject.groupproperty no longer triggers unnecessary recreation of the visuals anymore. -
A tooltip which is displayed at a given location by calling the
MouseHoverInputMode.showmethod is no longer immediately hidden after each mouse move. It now respects themouseHoverSizeproperty. -
Calling
IFoldingView.collapseon a normal (i.e. non-group) node no longer creates anUndoUnitor a view state (which included an unexpected call toIFolderNodeConverter.initializeFolderNodeeven though the result would have never been used). Now callingIFoldingView.collapseon a normal node does nothing. - The automatic flipping behavior of labels now also works with projections that distort the labels.
-
Grid snap results now correctly use the resource registered under
SnapLine.SNAP_LINE_STROKE_KEY.
Styles
-
TableNodeStylenow allows the table background style to access the table node's tag. - Text rendering no longer causes the text to not be rendered in rare circumstances when no text trimming and no clipping were used.
Interaction
-
The
GraphEditorInputMode.adjustContentRectmethod now only updates theCanvasComponent.contentRectproperty once per call. Previously there have been circumstances where the property would have been updated twice unnecessarily. -
TableEditorInputModeno longer changes theGraphComponent'sselectionproperty unnecessarily whenGraphComponent'sgraphproperty is changed. -
Multiple
DropInputModeinstances now correctly consider their respective priorities. -
UndoEngineno longer adds an empty undo unit for an aborted operation in certain rare cases. - Same-size snaplines now use the same default color as the other snaplines.
WebGL2
- Single character labels, and other very small labels, are now rendered with the correct vertical alignment. Previously, they were rendered too low.
- WebGL2 effects should become invisible while zooming when they become so small that they are barely visible. This now happens at the appropriate zoom levels instead of much too early.
-
The
WebGL2IconNodeStylenow correctly centers the icon. -
FilteredGraphWrappernow correctly updates WebGL2 visibilities on predicate changes. - Various sporadic problems with WebGL2 rendering mode on macOS have been fixed.
Layout
-
The
HierarchicLayoutclass now correctly considers the specified halos of group nodes when there is a partition grid defined. -
The
SimplexNodePlacerclass of the hierarchic layout no longer throws an error due to a number overflow for very, very wide layouts. -
The
OrganicLayoutclass now correctly considers the specifiedPartitionGridif substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored. -
The
OrthogonalLayoutclass now correctly handles input graphs with parallel edges if thepreferParallelRoutesproperty is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
EdgeRouterclass 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 thanTOP_TO_BOTTOM. -
The
EdgeRouterclass now correctly handles direct content edges that are incident to group nodes withPortCandidateSets. -
The
EdgeRouterclass now correctly considers octilinear segments when using theSEGMENTS_AS_NEEDEDorPATH_AS_NEEDEDRoutingPolicyenumeration value. -
The
ClearAreaLayoutclass now correctly considers the initial partition grid assignment of the nodes. -
TableLayoutConfiguratornow treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception.
Incompatible changes
Also see the Migration Guide in the documentation for more details and advice on migrating.
General
Incompatible API Changes
-
Due to the new
installanduninstallmethods of theModelManagerclass, the following APIs have been changed:-
The
CanvasComponentconstructor parameter has been removed. Instead, you can call the newInstallmethod with theCanvasComponentas parameter. Similarly, theCanvasComponentconstructor parameters of the derived classes have been removed, too. -
The protected methods
ModelManager.installandModelManager.uninstallhave been renamed toinstallItemanduninstallItem. -
The protected methods
ModelManager.addandModelManager.removehave been renamed toaddItemandremoveItem.
In a related change, the optional
SelectionModelandModelparameters ofHighlightIndicatorManagerandSelectionIndicatorManagerhave been removed from the constructors, too. Instead, you can set the corresponding properties directly. -
The
-
The
IHandleinterface has a new methodhandleClick. This method must be implemented by custom handle implementations. -
The return value of the
CreateEdgeInputMode.createEdgemethod and of the function which can be set asedgeCreatorhas been changed toIEdge | Promise<IEdge|null> |null.Similarly, the return value of the function which can be set as
GraphEditorInputMode.nodeCreatorhas been changed toINode | Promise<INode|null> |null. -
The
NavigationInputMode.adjustGroupNodeLocationmethod has now an additional parameterexpandedSizethat specifies the size of the group node when it is expanded. -
The
LabelCreator.addLabelmethod can returnnullif no label is added. -
The
LabelCreator.updateLabelmethod now returns a boolean value:trueif the label has been updated,falseif the label should be removed. -
The protected
ImageNodeStyleRenderer.getPreserveAspectRatiomethod has been removed in favor of the newgetAspectRatiomethod. -
The animation API of the
WebGL2GraphModelManagerclass has been refined to be more consistent and flexible. All animation factory methods now have atimingparameter of typeWebGL2AnimationTimingto specify duration, iterations, easing, and direction of an animation. -
The
ILookup.lookupmethod is now generic and infers its return type from the given parameter. TypeScript implementations of that method must be adapted accordingly. Nothing changes for JavaScript. -
The
WebGL2NodeEffectenum was renamed toWebGL2Effectsince it can now be used for effects of nodes, edges, and labels. -
The
createNodeEffectFadeAnimationandcreateNodeEffectPulseAnimationmethods ofWebGL2GraphModelManagerwere renamed tocreateEffectPulseAnimationandcreateEffectFadeAnimation. -
The
Fill.freeze,Stroke.freeze,DashStyle.freeze, andGradientStop.freezemethods now return their respective containing type. -
The
Exception.innerExceptionproperty has been renamed tocauseto conform to recent additions of the ECMAScript spec. -
The
nodeparameter of theIGraph.setIsGroupNodemethod is now correctly annotated as not nullable. The documentation already stated that this method throws an error if the node isnull. -
The
License.valueproperty has now the more specific typeRecord<string, unknown>instead ofobject. -
The protected
GraphEditorInputMode.shouldClickCreateNodemethod has now been removed. It was only added accidentally, had no effect and its removal had already been announced. -
The
NodeAggregation.multiThreadingAllowedandNodeAggregationAlgorithm.multiThreadingAllowedproperties have been removed since they had no effect.
Incompatible API changes in the Layout part
-
The
HierarchicLayoutData.subComponentsproperty has been replaced by the newHierarchicLayoutData.subcomponentsproperty with a different signature. The new property uses instances of the newSubcomponentDescriptorclass to define subcomponents, and the layout algorithm responsible for a component is now specified via the newSubcomponentDescriptor.layoutAlgorithmproperty.Similarly, the data provider keys
HierarchicLayout.SUB_COMPONENT_ID_DP_KEYandHierarchicLayout.SUB_COMPONENT_LAYOUT_ALGORITHM_DP_KEYhave been replaced by the new keyHierarchicLayout.SUBCOMPONENT_DESCRIPTOR_DP_KEYthat assigns instances of the newSubcomponentDescriptorclass to nodes. -
The
TemporaryGroupNodeInsertionData.componentsproperty has been replaced by thetemporaryGroupsproperty of typeTemporaryGroupDescriptor, which now specifies groups and the applied recursive group layout algorithm.Similarly, the data provider key
TemporaryGroupNodeInsertionStage.COMPONENT_LAYOUT_ALGORITHM_DP_KEYwas removed and the name of the keyTemporaryGroupNodeInsertionStage.COMPONENT_ID_DP_KEYhas been changed toTEMPORARY_GROUP_DESCRIPTOR_DP_KEY. -
The
directionparameter of theBfsAlgorithm.getLayersmethod now uses the newBfsDirectionenum instead of theTraversalDirectionenum.TraversalDirectiongot a new member that doesn't apply to this method, andBfsDirectionreflects the options previously available. Note that this is expert API and you typically would use theBfsclass, instead. -
The type of the
EdgeCellInfo.cellSegmentInfosproperty has been changed fromYListtoCellSegmentInfo[]. -
The following affects only the legacy UMD variant of the library:
The
NodeLabelingPolicyenum has been moved from the namespaceyfiles.treetoyfiles.layout. The reason is that the policy is now not only supported byBalloonLayoutbut also byCircularLayout,RadialLayoutandCactusGroupLayout. -
The
DataProviderAdapter.definedmethod has been removed since it had no effect.
Incompatible behavior changes
-
The semantic of the
TraversalDirection.BOTHenum value used by theNeighborhoodandBfsalgorithms has been changed and does not ignore the direction anymore, but now returns a union of theSUCCESSORand thePREDECESSORresults instead. The old behavior can be restored by using the newTraversalDirection.UNDIRECTEDenum value. Consequently, the default value of theTraversalDirectionproperty of both theNeighborhoodand theBfsalgorithm has been changed fromBOTHtoUNDIRECTED. -
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.textProviderreturnsnull. -
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.requeryHandlesmethod 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
HandleInputModeclass doesn't initialize a handle drag as soon as the handle is pressed, anymore. Instead, it waits until thedraggedRecognizerordraggedRecognizerTouchis triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting therequestMutexOnPressproperty tofalse. -
In WebGL2 rendering mode, handles and selection indicators no
longer adopt styling specified with CSS classes. Instead, more comprehensive
styling options are available with the new
Themeclass and thestyleproperties of theWebGL2SelectionIndicatorManager,WebGL2HighlightIndicatorManager, andWebGL2FocusIndicatorManagerclasses. -
The
WebGL2GraphModelManager.getWebGL2LabelStylemethod may now also return an instance ofWebGL2IconLabelStyle(but the default implementation does not). -
Formatting text with the
TextWrapping.WORD_ELLIPSISoption still wraps at word boundaries, but now trims character by character to better match the CSStext-overflowbehavior and make more efficient use of the remaining space. -
The lists returned by the
GraphPartition.getCells,DynamicObstacleDecomposition.getCellsandDynamicObstacleDecomposition.getObstaclesmethods are no longer unmodifiable.
Deprecations
-
The
BevelNodeStyle,ShinyPlateNodeStyle, andPanelNodeStyleclasses 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 newGroupNodeStyleclass. -
The
IEnumerable.firstOrDefaultandlastOrDefaultmethods are now marked as deprecated since they duplicate thefindandfindLastmethods, and the latter have the same name as the corresponding methods of the native JavaScriptArray.
New demos and noteworthy demo improvements
To check out the new demos in the demo overview, filter it to the version "v2.5.0.0".
Besides the demos for new features that are mentioned above, we added the following demos:
- Several new demos show how to customize the graph builders to support ports. The new Port-aware Graph Builder Demo, Port-aware Adjacency Graph Builder Demo, and Port-aware Tree Builder Demo, now provide modified builder configurations which can be easily adjusted for various needs.
- The new Tree of Life Demo shows an interactive radial dendrogram visualization for the so-called Tree of Life.
- The Organic Substructures Demo got UI options for the new tree and group substructure feature, and corresponding sample graphs. Also, there is now an option for the new disk style of chain substructures.
- The new Valid Begin Cursors Demo shows how to configure different input modes, so that different cursors indicate which gesture is valid to start at that location.
-
The
Z-order Demos
ZOrderSupportclass does not use custom overrides ofGraphEditorInputMode,GraphModelManager, andGraphMLIOHandleranymore. That way, using theZOrderSupportclass in other applications that already use a customGraphEditorInputModeorGraphModelManageris now easier. -
The
AggregationGraphWrappernow provides a faster alternative to separate all aggregations in the graph with the newseparateToOriginalItemsmethod. This class is used by the Large Graph Aggregation Demo and the Interactive Aggregation Demo. - The Dojo and WMR demos are no longer part of the yFiles package because the maintenance overhead was very high considering the rather low popularity of these frameworks. You can still find these demos in the GitHub history if you are interested.
yFiles for HTML 2.4.0.7
This is the 7th bugfix release for yFiles for HTML 2.4. This version brings error corrections, including performance improvements for the WebGL2 rendering mode. There are no incompatible API changes.
Bugfixes
General
-
In Viewer and Layout yFiles packages, the UMD library now
correctly specifies the
view.jsand, respectively, thelayout.jsfile asmainentry point in itspackage.jsonfile.
View and Interaction
- In version 2.4.0.6, WebGL2 rendering became a lot slower due to unnecessary many calls into a slow WebGL API in order to guard against lost WebGL contexts. The number of calls has now been reduced to a minimum and previous performance could be restored.
- In WebGL2 rendering, evaluation CSS styling of the selection indicators and the handles now happens only once, always. Previously, if no such styling was defined, yFiles constantly re-checked whether such style information was added, which had a measurable performance impact.
-
The
NodeEventArgs.parentproperty of theFilteredGraphWrapper.NodeRemovedevent no longer provides groups that are only present in the complete graph but not in the filtered graph itself. -
After pasting, a closed group node within another closed group
now stays closed. Previously, it was open due to a bug in the
GraphClipboardclass. -
Enumerating the
Mapper.entriesproperty no longer throws an exception. -
Cloning an
ITableinstance now properly clones all the table's internal state. Previously, changing a cloned table's insets could result in the cloned table's stripes not updating their geometry. -
The
TableEditorInputModeclass no longer changes theGraphComponent.selectionproperty unnecessarily when theGraphComponent.graphproperty is changed.
Hierarchic Layout
-
The
SimplexNodePlacerclass of the hierarchic layout no longer throws an error due to a number overflow for very, very wide layouts. -
The
HierarchicLayoutclass now correctly considers the specified halos of group nodes when there is a partition grid defined. -
The
HierarchicLayoutclass no longer produces misplaced edge labels for some rare cases with grouped edges. -
The
HierarchicLayoutclass 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.
Other Layouts
-
The
OrthogonalLayoutclass now correctly considers the specified minimum group node sizes. Previously, the minimum sizes were always enlarged by the groups' insets. Actually, the minimum size should include the insets. -
The
OrthogonalLayoutclass now correctly handles input graphs with parallel edges if itspreferParallelRoutesproperty is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
GenericLabelingclass no longer produces superfluous label overlaps if one of itsremoveNodeOverlapsorremoveEdgeOverlapsproperties is enabled. -
The
OrganicLayoutclass now correctly considers the specifiedPartitionGridif substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored. -
The
ClearAreaLayoutclass now correctly considers the initial partition grid assignment of nodes. -
The
EdgeRouterclass now correctly handles direct content edges that are incident to group nodes withPortCandidateSets. -
The
TableLayoutConfiguratorclass now treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception. -
The
TabularLayoutclass 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
IsolatedGroupComponentLayoutclass no longer produces unnecessarily large group nodes if the specifiedgridSpacingvalue is zero.
yFiles for HTML 2.4.0.6
This is the 6th bugfix release for yFiles for HTML 2.4. This version brings error corrections and no incompatible API changes.
Bugfixes
Graph
-
The
FilteredGraphWrapperclass now fires the correct events when filtering out port labels. Previously, the events contained incorrect owner information. -
The
CompositeUndoUnit.undoNameproperty now indeed sets the undo name, not the redo name.
Interaction
-
HandleInputModeis no longer canceled if a handle is removed during its ownDragFinishedcall. This fixes some very rare exceptions under complicated circumstances. -
In
CreateEdgeInputMode, toggling the direction of an orthogonal edge segment now works correctly when the mouse is over a potential target. - Tooltips with nested content are no longer closed immediately when opened below the cursor.
View
-
Fixed a potential memory leak that could occur when changing the
GraphComponent.graphModelManagerproperty. -
The
CanvasComponent.zoomToAnimatedmethod now works correctly when aprojectionis used. This has previously been reported as fixed, but was not. -
The
GridVisualCreatorclass now properly recovers from WebGL context losses when it is in WebGL rendering mode.
Styles
- The built-in styles with rounded corners now have the correct outline shape for all calculations.
- Edges with Bezier paths can now also be animated to non-Bezier paths.
-
Edge cropping now works as expected when using the
BezierEdgeStyleclass and the terminating nodes have styles that don't provide an outline in theirIShapeGeometryimplementation.
WebGL2 Rendering Mode
- We added a workaround to the code for the rendering of polyline edges in WebGL2 mode that prevents the Angular build optimizer from breaking it. Before, using an "optimized" build caused exceptions at runtime.
- In WebGL2 rendering mode, labels in layout animations are now moved to the correct end positions. Previously, it could happen that the labels got stuck at a different position or simply jumped to the correct position at the end of the animation.
-
The
CanvasComponent.fitContentandGraphCanvasComponent.fitGraphBoundsmethods now correctly center the graph when using WebGL2 rendering. -
Exceptions are no longer thrown during layout animations with the combination of
WebGL2 rendering, edges with bends, and the
FilteredGraphWrapperclass. - In WebGL2 rendering mode, elements selected in code before rendering the first frame are now correctly displayed as selected.
- When using WebGL2 rendering mode in Firefox, self-loop edges and their selections are now always visible. Previously, self-loops, or the selection of self-loops, often failed to render initially until they were interacted with or were animated.
- In WebGL2 rendering mode, polygonal edges no longer end in midair. Previously, under rare circumstances, when edges were removed from a large graph and only a few were reinserted later, it could happen that some of them did not visually connect with the target node.
- The WebGL2 rendering mode now correctly detects when the browser discards its rendering contexts and continues rendering correctly. Context loss can occur for various reasons, such as too many other tabs in the browser also using WebGL rendering or a bug in the graphics driver.
- In WebGL2 rendering mode, edges from a group to one of its children and self-loops are now rendered with the correct path.
Hierarchic Layout
-
The
HierarchicLayoutclass 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
HierarchicLayoutclass now correctly routes grouped edges, where previously there could be overlaps of nodes and edges in some rare cases. -
The
HierarchicLayoutclass now properly satisfiesPortCandidatesdefined for same-layer edges at nodes where other edges with (rather large) source/target port labels additionally exist. -
The
HierarchicLayoutclass now produces a correct edge grouping structure for short edges having the same source and target group ID. -
The
HierarchicLayoutclass no longer throws an exception when the edge directedness feature is used in conjunction with enabled backloop routing. -
The
HierarchicLayoutclass no longer produces overlaps between (large) external node labels and unrelated edges. -
The
HierarchicLayoutclass no longer creates unnecessary spacing between subcomponents and other elements. This previously happened in some cases due to edge labels or node labels being present. In consequence, these cases are now more compact. -
The
HierarchicLayoutclass no longer produces overlaps between subcomponent elements and edges that are not part of the component.
Organic Layout
-
The
OrganicLayoutclass now produces correct results if auto-clustering is enabled (i.e., itsclusteringPolicyproperty is notNONE) and thegroupNodeModeproperty is set toFIX_BOUNDSorFIX_CONTENTS. -
The
OrganicLayoutclass now correctly considers fix-contents and fix-bounds groups if the substructure detection is enabled. -
The
OrganicLayoutclass now correctly handles nodes with several neighbors of degree one. Previously, such inputs could cause arrangement artifacts if thestarSubstructureStyleisNONE. -
The
OrganicLayoutclass now correctly detects chain substructures if there are nodes of different types.
Circular Layout
-
The
CircularLayoutclass 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
CircularLayoutclass no longer produces node overlaps if theSingleCycleLayout.minimumNodeDistanceproperty is set to zero.
Other Layouts
-
The
PartialLayoutclass now correctly routes the edges if itsallowMovingFixedElementsproperty is enabled. Previously, in some rare cases, this setting could cause broken edge routes. -
The
ClearAreaLayoutclass now correctly routes the edges if itsedgeRoutingStrategyproperty is set toSTRAIGHTLINE. Previously, in some rare cases, this setting could cause broken edge routes. -
The
EdgeRouterclass no longer produces artifacts if there are edges with curved routing style and labels, and the integrated edge labeling is disabled. -
The
TabularLayoutclass 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. -
The
TableLayoutConfiguratorclass no longer sets a wrongoriginalPositionproperty forRowDescriptorsandColumnDescriptorswhen table insets are used. -
The graph's
undoEngineno longer gets corrupted after an exception in a layout algorithm was raised and caught. -
Canceling multiple
LayoutExecutorAsyncinstances running at the same time no longer leads to incorrect layout results.
yFiles for HTML 2.4.0.5
This is the 5th bugfix release for yFiles for HTML 2.4. This version brings error corrections, a new demo, and no incompatible API changes.
Bugfixes
View
-
Measuring text with
TextMeasurePolicy.SVGis now much faster, as it no longer triggers many unnecessary recalculations of the page layout. Note that yFiles uses theCANVASpolicy by default, which was already fast and still is. However, if the result of theCANVASpolicy differs greatly from that of the SVG policy, yFiles automatically switches to the latter. -
The SVGs created with the
SvgExportclass now correctly show visuals of WebGL- and Canvas-based styles if a projection is set. Previously, such visuals were not visible in the SVG, and as a consequence, were missing in derived formats such as bitmap images or printouts. -
The
CanvasComponent.ensureVisiblemethod no longer double-applies thecontentMarginsif animations are disabled for it. The same error also causedensureVisibleto be animated even when animations were disabled. -
The
FIT_CONTENTandFIT_GRAPH_BOUNDScommands no longer ignore the value of theCanvasComponent.animatedViewportChangesproperty. -
The
MouseHoverInputMode.adjustToolTipLocationmethod is now called when a tooltip is opened, as it was always intended to be. -
With WebGL2 rendering, edges with bends were not rendered in recent versions of Chrome and Chromium-based browsers on Windows (version 97.0.4692.99 and higher). This is due to a newly introduced error in the hardware accelerated 3D rendering via Direct3D in Chromium's ANGLE implementation.
This version of yFiles includes a workaround for this bug. In addition, we have been working with the Chromium team to identify the root cause of the issue so that the original problem will be fixed soon, possibly in the next Chrome bugfix release.
Hierarchic Layout
-
The
HierarchicLayoutclass now adheres more closely to its maximum duration and itsAbortHandlerwhen the propertySimplexNodePlacer.bendReductionis enabled. -
The
HierarchicLayoutclass now correctly processes input graphs with sub-components and curved edge routing style. Previously, such setups may have caused an exception. -
The
HierarchicLayoutclass now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled for some cases where it previously did not yield a uniform port distribution. -
The
HierarchicLayoutclass now correctly considers thePreferredPlacementDescriptorof 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
HierarchicLayoutclass no longer produces superfluous port overlaps if there are edges with strong port constraints. -
The
HierarchicLayoutclass now considers the direction of aPortCandidatecorrectly for layout orientations other thanTOP_TO_BOTTOM. This also improves the optimization results withPortCandidateSetsthat allow multiple directions to connect to nodes. -
The
HierarchicLayoutclass now correctly handles grouped input graphs if node compaction is enabled. Previously, the algorithm sometimes produced less compact results for such inputs.
New Demo
- The new Magnifying Glass demo includes a specialized input mode that displays a floating lens that magnifies the cursor's surroundings.
yFiles for HTML 2.4.0.4
This is the 4th bugfix release for yFiles for HTML 2.4. This version brings error corrections, but no incompatible API changes.
In addition, there are lots of new demos, and while our old demos weren't ugly, it was time for a change. The new look combines harmonious colors, round shapes with clear borders, and even better readability.
Last but not least, we updated the user interface of our API documentation and Developer's Guide for better usability and readability, and a more pleasant design. At the same time, we ironed out some quirks in the content.
Bugfixes
General
-
The TypeScript types of the
delegate.combine,remove, andremoveAllmethods now allow bothnullandundefinedarguments, as the implementation already did.
Graph
-
The
ITable.StripeChangedevent now reports the correct parent when re-parenting will be undone or redone. -
The
GraphBuilder,TreeBuilder, andAdjacencyGraphBuilderclasses no longer throw exceptions when theirupdateGraphmethod is called after the graph has been modified.
View
- There is no longer a console warning about adding a non-passive event listener. The originating event listener was added in version 2.4.0.3 as part of the workaround for touch interaction on iOS and is now correctly registered as active. In a related change, this workaround is now only active on touch devices.
-
Calling the
CanvasComponent.cleanUpmethod no longer removes change listeners on commands for otherCanvasComponents. - Non-essential CSS rules for the tooltip are now part of the stylesheet instead of being defined as the element's style (namely z-index, line-height, box-sizing) . This makes it easier to overwrite them with custom CSS rules.
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
NavigationInputModeclass. -
Collapsing and expanding a group no longer makes its parent groups larger with each
operation. This error occurred only when the
view-editormodule was not loaded.
Layout
-
The
LayoutExecutorAsyncconstructors now ignorenullandundefinedvalues in the givenlayoutDescriptorinstead of throwing aTypeError. -
The
HierarchicLayoutDataclass now creates the correct constraints again when using theLayerConstraintsData.nodeComparablesproperty. The behavior was wrong since yFiles for HTML 2.4. -
The
HierarchicLayoutclass now correctly considers the specified port groups for edges. Previously, such groups were not always considered properly if there are either critical edges or propertySimplexNodePlacer.straightenEdgesis enabled. -
The
HierarchicLayoutclass now correctly considers the specified critical edge priorities if the input graph contains grouped edges. -
The
HierarchicLayoutclass now adheres more closely to its maximum duration and itsabortHandler. -
The
HierarchicLayoutclass now correctly considers input graphs with group nodes and aPartitionGrid. Previously, in some rare cases, such inputs may have caused overlapping group nodes. -
The
OrganicLayoutandClassicOrganicLayoutclasses no longer cause undesired layout side effects when a mapper is registered with keyRecursiveGroupLayout.GroupNodeLayoutDpKeyor when data is provided via theRecursiveGroupLayoutData.groupNodeLayoutsproperty. Previously, the layout algorithms registered there could be applied to nodes that should actually be kept fix by the organic layout. -
The
OrganicLayoutclass no longer throws an exception when running on a graph with a partition grid, group nodes and the IDs of the group nodes are defined using a provider that cannot handlenullas argument to its {{get}} method. -
The
CircularLayoutclass no longer produces node label overlaps when itsplaceChildrenOnCommonRadiusproperty is disabled. -
The
EdgeRouterclass no longer generates unnecessary detours in the routes when it is configured withMonotonicPathRestriction.BOTH. -
The
ClearAreaLayoutclass now correctly considers node labels. Previously, there could be results where node labels intersected with the specified area to be cleared.
New Demos
- Graph Wizard for FlowChart Diagrams
-
The Graph Wizard for FlowChart Demo shows a convenient and fast way to interactively create flowchart diagrams. Many common tasks are easily available as single actions with both a context toolbar and shortcut keys. One example of such an action is adding the next step to a node and entering labels for both the new node itself and its link.
- Critical Path Analysis (CPA) Demo
-
The Critical Path Analysis Demo shows how to perform critical path analysis in project management with yFiles. It combines yFiles's analysis algorithms to detect critical paths with its auto-layout to arrange the diagram in a suitable way.
- Layout Features Demos
-
This new demos are intended for developers who want to learn how to use a specific feature of a yFiles layout algorithm in source code. Therefore, these demos focus on this configuration code and provide only minimal interaction nor other feature.
- Toolkit and Loading Demos
-
The yFiles demos for Vue.js are now available in TypeScript, and in versions for both Vue 2 and Vue 3.
The Preact Demo integrates yFiles in a Preact app. It uses the "No build tools route" of the preact setup for simplicity. A custom template node style uses data binding to keep the visualization in sync with the data.
The Svelte Demo integrates yFiles with the Svelte framework. It features a custom node style with data binding, asynchronous layout calculation in a web worker, a development setup with hot module reloading, and more.
The Vite Demo integrates yFiles with the Vite framework. Among others, it makes use of Vite's hot module replacement and features an auto-layout that is calculated in a web worker.
The WMR Loading Demo shows how to load yFiles with WMR as a loader for efficient web development and easy builds.
The Web Dev Server Demo shows how to conveniently develop with yFiles for HTML using the buildless Web Dev Server by "Modern Web".
The Snowpack Demo integrates yFiles in a Snowpack project. This demo support Snowpack's hot module replacement.
- Demos for Diagram Types
-
The Tag Cloud Demo creates tag clouds with circular and rectangular bounds with the help of yFiles's auto-layout.
The Chord Diagram Demo shows how to create a chord diagram that emphasizes the magnitude of connections between nodes.
The Arc Diagram Demo shows how to arrange and visualize a graph as an Arc Diagram.
- Style Demos
-
The Isometric Bar Chart Node Style Demo shows how a diagram can be augmented with isometric bars providing additional information about the nodes.
The List Node Demo shows nodes which consist of re-arrangeable rows with associated edges. This means that when a row is moved, its edges are moved as well.
The String Template Node Style Demo presents a versatile and customizable template node style.
The Directed Edge Label Style Demo shows label styles displaying arrows that always point to the source or target port.
The Composite Node Style Demo shows how to combine node visualizations from several styles.
- Interaction Demos
-
The Drag from Component Demo shows how to drag elements from the canvas to elements outside the canvas.
The Graph Drag and Drop Demo shows drag and drop of graphs consisting of multiple items.
The Custom Drag and Drop Demo shows how to change the color of nodes and edges using drag and drop operations.
The Deferred Cut Clipboard Demo shows how to implement a clipboard that grays out elements when they are cut and only removes them completely when they are pasted. This behavior is similar to that of Windows Explorer.
The Marquee Node Creation Demo shows how to customize the MarqueeSelectionInputMode class to create new nodes. In other words, users can click-and-drag with the mouse to create a new node of the desired size.
The Arrange Objects Demo shows simple operations for aligning and distributing nodes.
The Restricted Editing Demo shows how to restrict interactive editing when using the
GraphEditorInputModeclass.The Button Input Mode Demo shows how to use a custom input mode for adding temporary buttons for model items.
Other Notable Demo Improvement
- The React Demo now makes use of functional components.
-
The Angular Demo now depends on Angular
~12.2.7since an error in versions before 12.2.4 broke the yFiles library. - The Overview Component Tutorial shows how to add said component to an app.
- Demos with tables now show how to properly configure undo for tables. Previously, re-ordering stripes was not properly undone during undo.
yFiles for HTML 2.4.0.3
This is the third bugfix release for yFiles for HTML 2.4 which brings some error corrections.
In addition, a new version of the yFiles for HTML Optimizer is available on npm. The optimizer now supports the obfuscation of babel's safe public class fields output and comes with a TypeScript type declaration file that provides code completion in webpack config files.
Bugfixes
-
Two problems with touch interaction in iOS and iPadOS devices have been corrected.
- Double taps work now correctly, again.
- A long press no longer selects some random text in the page.
-
The
ParallelEdgeRouterclass now produces correct parallel routes if its propertyjoinEndsis enabled. -
The
LayoutExecutorAsyncWorker.processmethod no longer throws a cryptic error if a hierarchic layout with layer constraints or sequence constraints should be calculated but thelayout-hierarchicmodule is not yet loaded, e.g. because lazy loading is used. - In the TypeScript type declarations, parameters of type enum are no longer advertised as being type convertible in places where they are not. Previously, using a string as argument in these places compiled without problems but the argument value had no effect.
Notable Demo Improvement
-
In the
Large Graph Aggregation Demo and
the Interactive Aggregation Demo,
a problem with the
AggregationGraphWrapperclass has been corrected. In detail, thesourceNodeandtargetNodeproperties of theAggregationEdgeclass are now correctly initialized.
yFiles for HTML 2.4.0.2
This is the second bugfix release for yFiles for HTML 2.4. There are 2 error corrections and some demo improvements.
Bugfixes
- With WebGL2 rendering, group nodes at certain levels of nesting no longer disappear if they are collapsed.
-
The
EdgeRouterclass now stops much more quickly when themaximumDurationis exceeded or the algorithm should stop due toAbortHandler. Previously the search for a path kept on running for a long time.
New Demos and Notable Demo Improvements
- The new Simple Highlight Decorator and Complex Highlight Decorator demos show how to highlight graph items in a simple and a more complex use case, respectively.
- The demos that calculate an automatic layout in a Web Worker now show correctly how to handle exceptions that are thrown during the layout calculation.
yFiles for HTML 2.4.0.1
This is the first bugfix release for yFiles for HTML 2.4. In addition to the usual error corrections, there are some demo improvements.
This release reverts an unintended incompatible change in yFiles for HTML 2.4.
Bugfixes
Graph, View, and Interaction
- Smooth zooming is now performed correctly on more input devices.
- Smooth zooming now works in Internet Explorer 11.
- Mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
- Fixed a possible error when the graph was altered while label editing was in progress.
-
Fixed a bug which caused the
FilteredGraphWrapper.getParentmethod to return parent nodes which are hidden by the filter. This bug could have caused errors in aFoldingViewif aFilteredGraphWrapperwas the master graph. -
The clipboard now doesn't copy labels or ports if they are not selected and their owner's
IClipboardHelperforbids copying the owner.
Layout
-
The
HierarchicLayoutDataclass no longer incorrectly assigns same-layer constraints to nodes for which theLayerConstraintsData.nodeComparablesproperty provides comparables of equal value. The incorrect behavior was only introduced with yFiles for HTML 2.4. -
Automatic type conversion now works correctly again for the
LayerConstraintData.nodeComparables,SequenceConstraintData.itemComparables, andClearAreaLayoutData.componentIdsproperties. While the type declarations still reflected the possible conversion, this crashed at runtime. -
The
HierarchicLayoutclass 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
PartialLayout.allowMovingFixedElementsmethod now works correctly and throws an error if thelayout-areamodule is missing. -
The
RadialLayoutclass is now much faster if the input graph is a very large tree structure. -
The
OrganicLayoutandClassicOrganicLayoutclasses no longer produce an internal integer overflow that may lead to an early exit and, thus, poor layout results for very large input graphs.
Type Declarations
-
The TypeScript declaration files (
.d.tsfiles) no longer specify not applicable types for some properties of option objects.
Most Notable Demo Improvements
-
The demos for React and React with TypeScript no longer throw an error during
npm installsince they now correctly declare theirfs-extradependency. - In the webpack demos, live reloading now works as expected.
yFiles for HTML 2.4
Major New Features
- WebGL 2.0-based rendering mode
-
The new
WebGL2GraphModelManagerallows for leveraging WebGL 2.0 for the GPU-accelerated rendering, editing, and animation of very large graphs. The rendering path comes with an extra set of style implementations for nodes, edges, and labels. The style implementations come with built-in hardware accelerated animations and interactivity, allowing smooth editing and animation for several hundred thousand elements even on mid-range graphics card adapters. The new infrastructure lends itself especially well for large graph visualizations and can be toggled on/off to support the full yFiles extensibility and editing fidelity, when required. The infrastructure is bundled as an extra bundle that will be automatically removed by tree-shaking tool-chains, when not required.WebGL2Visualis a new base class implementation for visuals that want to use WebGL 2.0 for the rendering of custom visuals, which is now supported in addition and in parallel to WebGL 1.0, HTML5 Canvas, and SVG by the rendering pipeline.The features and possibilities of this new rendering mode are shown in the following new demos: Large Graphs Demo, Large Collapsible Tree Demo, WebGL2 Styles Demo, WebGL2 Icon Node Demo, WebGL2 Animations Demo, and Rendering Optimizations Demo.
- Web Worker
-
The new pair of classes
LayoutExecutorAsyncandLayoutExecutorAsyncWorkermake it very easy to add multi-threaded layout and algorithm execution to your web applications. Using a similar API as the existingLayoutExecutorclass, work can be offloaded off the main-thread and performed on one or more Web Workers or external processes (other browser tabs, browser instances, or even Node.js servers) in parallel without blocking user interactions or animations on the main thread.New demos show how to add Web Worker-based layouts, and existing examples for the major third party framework examples like Vue.js, React, Angular, Webpack, Node.js, and Rollup.js have been updated to show the new approach.
- Smooth 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
CanvasComponent.animatedViewportChangesproperty, and customized with the new protected methodCanvasComponent.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
HierarchicLayoutclass, 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
TreeLayoutandClassicTreeLayoutclasses 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.nodeTypesproperty.The
OrganicLayoutclass now allows to define node types via the newOrganicLayoutData.nodeTypesproperty. 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 propertiesparallelSubstructureTypeSeparationandstarSubstructureTypeSeparation. 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
OrthogonalLayoutclass now allows to define node types via the newOrthogonalLayoutData.nodeTypesproperty. 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
CircularLayoutclass is now able to separate nodes that are on the same cycle with respect to their node type. For this, the newNodeTypeAwareSequencerclass can be set asNodeSequenceron theCircularLayout.singleCycleLayout. Node types are specified via theCircularLayoutData.nodeTypesproperty.In the
ComponentLayoutclass, 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.nodeTypesproperty to define types.The node types feature is shown in the new Node Types Demo and the new Organic Substructures Demo.
- Edge Routing Only if Needed
-
Optionally, the
EdgeRouter,ChannelEdgeRouterandBusRouterclasses 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.routingPolicyandBusRouterBusDescriptor.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.PATH_AS_NEEDED: 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.SEGMENTS_AS_NEEDED: 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 theEdgeRouterclass.
The new penalty property
PenaltySettings.sketchViolationPenaltysupported by theEdgeRouterclass defines the cost for a deviation from the original edge path if the new routing policy property is set toSEGMENTS_AS_NEEDED.This feature is shown in the new Interactive Edge Routing Demo.
-
- More Precise TypeScript Type Declarations
-
The TypeScript type declarations for yFiles for HTML are now more precises for a lot of yFiles API members. JavaScript projects will benefit from these improvements, too, since the IDEs' code completion for JavaScript projects is based on these files, too. Some notable improvements are:
- New TypeScript definition files for TypeScript 4.3 and higher allow for a more exact documentation of properties whose getter and setter have different types. This is especially useful for setters that support type conversion.
- The type declarations of the UMD module have been changed to a slightly different format that works a lot better with modern TypeScript.
-
Members that are
readonlyorprotectedare now documented as such. - A lot more features which are supported by the class framework are now reflected in the type declarations. This includes, e.g., more supported parameter types, inherited properties of option objects, or support for options objects.
- More improvements are listed below.
- Improved TypeScript Support
-
All source code demos and code snippets in the documentation are now available in both JavaScript and TypeScript.
yFiles now comes with type definition files for all versions of TypeScript since 3.1. This is made possible by including different typing files with the
typesVersionproperty ofpackage.jsonsuch that you automatically use the file that matches your TypeScript version. - yFiles Dev Suite
-
Last but not least, the yFiles Dev Suite is now available. It provides a graphical interface that facilitates working with a yFiles for HTML package:
- Integration with my.yworks.com for a simplified evaluation process and direct communication with the yWorks support team.
- Create your own yFiles app with just a few clicks.
- Browse and adapt the plethora of demo applications, manage your changes through integrated diffing, and spawn your own projects from one of the samples as a starting point.
New Features
Graph, View, and Interaction
-
All required CSS rules are now created in code, removing the need to include the
yfiles.cssfile. In addition, styling that is mandatory is now added as inline style to prevent accidental omission or overwriting. This behavior can be disabled with theWorkarounds.loadDefaultCSSproperty, and the CSS fileyfiles.cssis still part of the lib directory of the yFiles package. -
The graph and tree builders now support bindings for bend locations. This is implemented by
new bend-related members of the
EdgeCreatorclass. -
The new
EdgePathPortLocationModelfor 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. -
The new
MouseHoverInputMode.toolTipParentElementproperty defines the element in the DOM to which tooltips are added. -
The new
HandleInputMode.QueryClosestHandleevent can be used to provide the closest handle for a certain query location. -
The new
GraphComponent.noFocusMouseWheelRecognizerproperty can be used to implement a differing mouse wheel behavior when theGraphComponentis not focused.
Layout and Algorithms
-
The new
GenericLayoutDataclass is a generic implementation ofLayoutDatathat allows passing arbitrary data to layout stages. As a consequence, theLayoutData.apply,ItemCollection.provideMapperandItemMapping.provideMappermethods were removed. -
The new
LayoutExecutor.sequentialExecutionproperty controls whether an instance ofLayoutExecutorshould wait for other instances to finish before executing a layout. -
The
OrganicLayoutclass offers the newclusteringPolicyproperty, 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
OrganicLayoutandClassicOrganicLayoutclasses support the new scopeMAINLY_SUBSET_GEOMETRIC. 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 scopeMAINLY_SUBSETis similar, but it does determine the closeness of other nodes by using the graph structure instead of the current geometry (i.e. location). -
The
PartialLayoutclass offers a new propertyallowMovingFixedElementsto 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 new
TreeAnalysisalgorithm offers a convenient way of analyzing tree structures and querying tree-related properties (e.g. leaf nodes, parent-child relations and more). -
The new
ParallelEdgesAlgorithm.findParallelEdgesmethod allows to find all sets of parallel edges contained in a given graph or incident to a specific node. -
The new
SelfLoopRouterDataclass specifies custom data for theSelfLoopRouterclass. In more details, it allows to define which self-loop edges should be routed and which should keep their current path. -
The new
PortPlacementStageDataclass specifies custom data for thePortPlacementStageclass. 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
SubgraphLayoutclass now supports defining which edges must be included or excluded in the subgraph. Previously, only nodes could be specified. The newSubgraphLayoutDataclass offers thesubgraphNodesandsubgraphEdgesproperties to conveniently define the nodes and edges that should form the subgraph the core layout runs on.
Improvements
General
-
The
yfiles.debug()function now adds all yFiles types to the globalyfilesobject for a better debugging experience. -
The
JSmodules variant of the yFiles npm package now correctly advertises its modules asmodulesinstead ofcommonjs. - Most parts of the layout and graph algorithms API are now annotated with nullability information. As always, this information is reflected in the API documentation and the TypeScript type declarations.
-
The following types can now be initialized with option arguments to more conveniently
initialize instance properties at creation:
SvgExport,ViewportLimiter,NodeCreator,LabelCreator, andEdgeCreator.
Graph and Collections
-
The
DefaultFolderNodeConverterandFoldingEdgeConverterBaseclasses now haveportLabelStyleandportLabelLayoutParameterproperties to control the style and label layout parameter of copied port labels. -
The methods
IEnumerable.lastandIEnumerable.lastOrDefaultnow have an optional parameterpredicatethat can be used to decide which items may be returned. -
The new
NodeInsetsProviderclass is anINodeInsetsProviderthat returns the same insets for each node. -
Insetsinstances can now be converted from arrays of length 1 and from objects that only contain some of thetop,left,right,bottom,horizontal, orverticalproperties.
View
-
The
CanvasComponent.ensureVisiblemethod now has an additional parameter to specify insets to keep around what to make visible in the viewport. -
The
CanvasComponent.ensureVisiblemethod 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. -
The
CanvasComponent.ensureVisible,CanvasComponent.fitContent, andGraphComponent.fitGraphBoundsmethods now return aPromisethat completes when the view port adjustment has been finished. -
The
CanvasComponent.ensureVisiblemethod now respects margins defined by theCanvasComponent.contentMarginsproperty. TheensureVisiblemethod is called for example by keyboard navigation. -
The
ZOOMcommand now respects margins defined by theCanvasComponent.contentMarginsproperty when executed with a rectangle as parameter. -
The
ZOOM_TO_CURRENT_ITEMcommand now respects the margins defined in theCanvasComponent.contentMarginsproperty. -
All of the following features no longer block user interaction: the viewport animations for
CanvasComponent.ensureVisible, executing scroll commands when theCanvasComponent.animateScrollCommandsproperty is enabled, and executing an animatedZOOM_TO_CURRENT_ITEMcommand. -
The
CanvasComponent.fitContentandGraphComponent.fitGraphBoundsmethods now have an optional parameter that allows changing the viewport in an animated fashion. -
The
ViewportLimiter.limitViewportmethod now has an optional parameter that enforces theViewportLimitingPolicy.STRICTpolicy. -
The
ViewportLimiterclass now always centers the viewport if itshonorBothDimensionsproperty is disabled. -
The new
installanduninstallmethods of theGraphModelManagerclass simplify exchanging the manager used by aGraphComponent. They are called when setting/removing aGraphModelManagerasGraphComponent.graphModelManagerand should also be called when combining aGraphModelManagerwith aCanvasComponent. -
Setting the various descriptor properties of the
GraphModelManagerclass no longer causes updates for every installed item if the descriptor hasn't actually changed. -
A graph component now utilizes the native
ResizeObserverAPI if it is available and theGraphComponent.sizeChangedDetectionproperty is set toSizeChangedDetectionMode.SENSOR. This results in a more robust detection of size changes. -
The new static
IAnimation.createDelaymethod 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 staticIAnimation.createDelayedAnimationmethod delays a provided animation. -
The
SvgExportclass works better with the new Projections feature by being able to define an arbitrary list of points as well as the projection that should be used for export or printing. The export chooses the exported area in a way that all these points are enclosed in a rectangular area which is axis-parallel to the output coordinates under the given projection.The
PrintingSupportclass provided as demo source code now correctly handles projections as well. Similar toSvgExport, a set of points can be provided to construct an axis-aligned bounding box to print. -
The new canvas object descriptor
ICanvasObjectDescriptor.ALWAYS_DIRTY_VISUALprevents stale rendering states forWebGL2Visualsand otherHtmlCanvasVisuals. -
The following WebGL uniforms are now available in a
WebGLProgram:u_yf_worldToWebGL,u_yf_viewToWebGL,u_yf_intermediateToView,u_yf_worldToWebGL_3d,u_yf_viewToWebGL_3d,u_yf_intermediateToWebGL,u_yf_intermediateToWebGL_3d,u_yf_worldToIntermediate, andu_yf_zoom. -
The new
WebGLSupport.deleteProgrammethod deletes cached WebGL programs created with theWebGLSupport.useProgrammethod. This helps prevent memory leaks if deleting a WebGL program is required.
Interaction
- Changing the selection state of a large number of elements is now faster.
-
Tooltip contents can now be provided asynchronously. As an alternative to setting the
tooltip content directly, the
ToolTipQueryEventArgsclass also accepts aPromisethat provides the tooltip content asynchronously. - A visible tooltip is now automatically hidden if the mouse leaves the component.
-
The
HandleInputMode.beginDraggingmethod now returns aPromisewhich 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.validatedTextproperty accepts aPromisethat provides the validated text asynchronously. -
The
DragSource.startDragmethod now returns aPromisethat resolves when the drag operation is done. It resolves totrueon a successful drop and tofalseif the drag operation was canceled or otherwise unsuccessful. -
The
OrthogonalEdgeEditingContext.createOrthogonalEdgeDragHandlermethod now accepts anIPortOwnerinstead of only anINodeas dragged item. This can be used for custom edge drag handling that should support orthogonal edge editing. -
The
ItemCopiedEventArgsclass now guarantees that itsoriginalandcopyproperties are notnull. -
The
OverviewInputModenow renders its handle on top of the viewport rectangle instead of below it.
Hierarchic Layout
-
The
HierarchicLayout,EdgeRouter, andCurveRoutingStageclasses 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
HierarchicLayoutclass now generates shorter paths for edges that cross borders ofPartitionGridcolumns 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
HierarchicLayoutclass 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
HierarchicLayoutclass 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
OrganicLayoutit 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 will no longer generate nested structures.- Star structures offer the new styles
StarSubstructureStyle.RADIAL_NESTEDandStarSubstructureStyle.CIRCULAR_NESTED. ChainSubstructureStyle.RECTANGULAR_NESTEDandChainSubstructureStyle.STRAIGHT_LINE_NESTEDare the new styles for nested chains.CycleSubstructureStyle.CIRCULAR_NESTEDis the new style for nested cycles.
- Star structures offer the new styles
-
The
OrganicLayoutclass 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
OrganicLayoutclass now often produces more compact results and comes with an improved placement of degree-one nodes. -
When specified for the
OrganicLayoutclass, the scopeMAINLY_SUBSETnow 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
-
The
EdgeRouterclass now supports explicitly defining costs for different types of edge crossings. The new propertiesPenaltySettings.adjacentEdgeCrossingPenaltyandPenaltySettings.selfCrossingPenaltyrelate 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 existingedgeCrossingPenaltyproperty.- 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
edgeLengthPenaltyandgroupNodeCrossingPenaltyproperties were increased to obtain more balanced results.
-
The
EdgeRouterclass 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. -
When the
EdgeRouterclass runs with a highly restricted maximum duration or is aborted via theAbortHandlerclass, 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
HierarchicLayout,EdgeRouter, andCurveRoutingStageclasses 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.
Other Layouts
-
The new
LayoutGraphAdapter.ORIGINAL_TAG_DP_KEYdata provider key provides access to the object stored in thetagproperty 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(HierarchicLayoutRoutingStyle.curveShortcuts),EdgeRouter(EdgeRouterEdgeLayoutDescriptor.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(HierarchicLayoutRoutingStyle.curveUTurnSymmetry),EdgeRouter(EdgeRouterEdgeLayoutDescriptor.curveUTurnSymmetry) andCurveRoutingStage(CurveEdgeLayoutDescriptor.curveUTurnSymmetry).
-
The
ClassicTreeLayoutclass now features propertiesminimumFirstSegmentLengthandminimumLastSegmentLengththat allow to specify the minimum first and last segment length for the orthogonal routing style. -
The new
ParallelEdgeRouterData.routedParallelEdgesproperty returns which edges theParallelEdgeRouterclass 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. -
The new
BalloonLayoutData.OutEdgeComparerproperty specifies a comparison function used to sort a nodes' outgoing edges.
Type Declarations
-
The
senderargument of event listeners is now the type of the declaring class, which removes the need for type assertions. -
If a returned
Promisehas no (meaningful) resulting value, this resulting value is now correctly specified asvoidinstead ofanyor another object. Namely, this affects the methodsLayoutExecutor.start,LayoutExecutor.stop,GraphComponent.morphLayout,GraphComponent.updateVisualAsync,GraphComponent.zoomToAnimated,Animator.animate, andSvgExport.fixViewBoxAttribute. -
The
CanvasComponent.lastInputEventproperty now has the more narrow type.MouseEventArgs| TouchEventArgs
The type parameters of the BaseClass function are now inferable by the
TypeScript compiler. This makes implementing yFiles interfaces easier: in most cases the type arguments of
the BaseClass function can be omitted now.
The types of option objects are now more precise. Especially any has been
replaced with arrays of the correct type.
Bugfixes
General
-
The parameters and return values of various event handlers and callbacks are now correctly
annotated with not-
null. -
Assigning JSON data in constructor option parameters to properties of object type that
initially are
nullis now properly supported. Previously, the properties were applied recursively resulting in aTypeError.
Graph and Geometry
-
The
FilteredGraphWrapperclass now dispatchesParentChangedevents in the correct order after predicate changes. -
All
setFactorymethods of theNode-,Edge-,Label-,Port-, andBendDecoratorclasses now respect thenullIsFallbackproperty. -
A label with
EdgeSegmentLabelModelorEdgePathLabelModelnow moves steadily when the segment to which it belongs moves. -
The
DefaultFolderNodeConverterandFoldingEdgeConverterBaseclasses (and thus, also theDefaultFoldingEdgeConverterandMergingFoldingEdgeConverterclasses) no longer ignore port labels. -
The
areaproperty of an emptyRectinstance (includingRect.EMPTY) is now always zero, and no longer a negative value. - Labels at ports of collapsed nodes are no longer lost during GraphML serialization.
View
-
The
CanvasComponent.ensureVisiblemethod no longer ignores the limited viewport size in certain cases. -
The
CanvasComponent.zoomToAnimatedmethod now works correctly when aprojectionis used. -
The following issues of the
ICommand.ZOOM_TO_CURRENT_ITEMcommand 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.
- The item is no longer moved outside the visible area in rare cases. This was caused by
a problem in the
ViewportLimiterclass.
-
The
CanvasComponent.fitContentandGraphCanvasComponent.fitGraphBoundsmethods now correctly apply thefitContentViewMarginsin case aprojectionis set. -
Fixed incorrect margins on an
OverviewGraphCanvasComponentwith aprojectionset. -
Fixed a bug which caused the
ICommand.ZOOMcommand to disrespect theViewportLimiterif executed with a rectangle as parameter. -
Callbacks registered for removed visuals on the
CanvasObjecttree now reliably run after the visual is indeed no longer visible. -
Callbacks registered with the
IRenderContext.setDisposeCallbackmethod now are reliably called, even when a canvas object has been explicitly removed. -
In
SizeChangedDetectionMode.AUTO, theCanvasComponentnow correctly falls back to timer-based resize detection when the preferred resize detection modes are not supported. - In exported images, handles are now always drawn in the correct positions.
-
The
Animatorclass will now properly turn offWaitInputModeif an error occurs during an animation. - Using the scrollbars no longer triggers unnecessary CSS invalidations.
-
Fixed memory leaks when disposing the
GraphComponentwith thecleanUpmethod. -
The
IShapeGeometryparameter of theDefaultEdgePathCropper.isInsideandgetIntersectionmethods is nownullable. -
The result of the
TextRenderSupport.measureTextmethod is now correct when the font is updated and the text content is a single line. -
The
TextRenderSupport.measureText,TextRenderSupport.addTextandDefaultLabelStyleRenderer.addTextElementsmethods, as well as theDefaultLabelStyleclass now take empty lines into consideration. -
Fixed an infinite loop in
MarkupLabelStylewhen not even the first character fits the label. -
Whitespace with multiple spaces in a row is now handled correctly in
MarkupLabelStyle. -
The parameters of the
addandremovemethods of theSvgVisualGroupclass are now correctly annotated withnot-null. -
Automatic type conversion now converts a
nonefill or stroke tonullinstead ofblack.
Interaction
-
The text box shown by the
TextEditorInputModeclass is now correctly placed if theTextBoxPlacementPolicy.MOVE_TEXT_BOXis set and a projection is used. -
Editing self-loops with
PolylineEdgeStyleand orthogonal edge editing enabled works now correctly. - Auto-dragging now stops in all cases. Previously, it sometimes never stopped.
-
The
GraphComponentclass no longer consumesmousewheelevents if it is not focused and itsmouseWheelBehaviorproperty is set toMouseWheelBehaviors.ONLY_WHEN_FOCUSED. -
The
CreateEdgeInputModeclass no longer has an error which prevented the removal of port candidate visualizations after another input mode claimed to be active.
Hierarchic Layout
-
The
HierarchicLayoutclass 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
HierarchicLayoutclass 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
HierarchicLayoutclass 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
HierarchicLayoutclass no longer occasionally throws an exception when enablingHierarchicLayout.compactGroupsand in conjunction with layering constraints and/or a group node marked as incremental. -
The
HierarchicLayoutclass does no longer violate the specified minimum length for edges incident to group nodes. -
The sequencing phase of the
HierarchicLayoutclass is now faster for large graphs with sequence constraints and non-incremental layout mode. -
Curved edge routes generated by
HierarchicLayout,EdgeRouterandCurveRoutingStageno longer contain a self-crossing for edges that connect to a group node and where the connection styleCurveConnectionStyle.ORGANICis specified. -
The curved edge routes produced by
HierarchicLayout,EdgeRouterorCurveRoutingStageno longer violate the minimum node-edge distance or intersect the node. Intersections could previously happen especially when the specified node-edge distance was zero.
Edge Routing
-
The
EdgeRouterclass now uses the given ports for edges of a bus with fixed edges. -
The
EdgeRouterclass 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
CurveRoutingStageclass now correctly considers the minimum distance to nodes specified as value of theCurveEdgeLayoutDescriptor.minimumNodeToEdgeDistanceproperty. Previously, the curves could violate the distance and get too close to nodes. -
The
EdgeRouterclass no longer contains edges with self-crossings in some rare cases where it previously failed to eliminate them. -
The
EdgeRouterandCurveRoutingStageclasses no longer change the path of unaffected (fixed) edges when thecreateControlPointsproperty of their associatedEdgeLayoutDescriptorinstance (CurveEdgeLayoutDescriptorrespectively) is enabled. -
The
EdgeRouterclass 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 individualEdgeLayoutDescriptorinstances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used. -
The
EdgeRouterclass 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
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges defined viaBusDescriptor. -
The
EdgeRouterclass 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.*. -
Curved edge routes generated by
HierarchicLayout,EdgeRouterandCurveRoutingStageno longer contain a self-crossing for edges that connect to a group node and where the connection styleCurveConnectionStyle.Organicis specified. -
The curved edge routes produced by
HierarchicLayout,EdgeRouterorCurveRoutingStageno 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
BusRouterclass 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
BusRouterclass no longer ignores edges that should be routed when a they are on a bus with fixed edges (seeBusDescriptor.fixedproperty) and when they share both source and target port with a fixed edge. -
The
BusRouterclass now produces more suitable edge routes for rare cases that were caused by an unsuitable bus placement. -
The
ParallelEdgeRouterclass 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
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges (defined viaBusDescriptor). -
The
OrthogonalSegmentDistributionStageclass does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that theChannelEdgeRouterclass is affected too, as the stage is by default called from within the router. -
The
OrganicEdgeRouter.keepExistingBendsproperty now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends.
Other Layouts
-
Fixed a bug in
LayoutExecutorwhich caused port labels not to be placed in their calculated position after a layout animation. -
Fixed
LayoutExecutorto use wrong target bounds when a projection is set on theGraphComponent. -
The comparison delegates defined in
TreeLayoutData.outEdgeComparersandSeriesParallelLayoutData.outEdgeComparersno longer receivenullelements during runtime. -
The
OrganicLayoutandClassicOrganicLayoutclasses 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
ClearAreaLayoutclass no longer throws an exception for some scenarios where the same algorithm instance was first applied to a graph withPartitionGridand later to a graph without grid. -
The
ClearAreaLayoutandFillAreaLayoutclasses no longer throw an exception for some input graphs with edge labels if propertyConsiderEdgeLabelsis enabled. -
The
TreeLayoutclass now correctly handles trees with group nodes. Previously, it sometimes produced overlapping elements and halo violations for such inputs. -
The
RadialLayoutclass is now much faster if the input graph is a very large tree structure. -
The
FamilyTreeLayoutclass 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
SimpleProfitModelclass now computes meaningful different profits based on thePreferredPlacementDescriptorfor candidates that belong to aSliderEdgeLabelLayoutModelor aDiscreteEdgeLabelLayoutModel. Previously, the computed profit was equal for all candidates. -
The
PartialLayoutclass now transfers the value of itsPartialLayout.maximumDurationproperty 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
BendConverterlayout 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
TabularLayoutclass no longer throws an error about a missingPartitionGridwhen used withinRecursiveGroupLayout, andRecursiveGroupLayoutDataandTabularLayoutDataare used without an explicit cell-id mapping.
Incompatible Changes
See the Migration Guide for more details and advice on migrating.
General
-
The TypeScript type declarations of the UMD module have been changed to a slightly different
format that works a lot better with modern TypeScript. The main drawback is that quick interface
implementation cannot be used with
newanymore. Instead, use the staticcreatemethod of the interface. -
The documentation file
ide-support/has been removed. The various TypeScript type declaration files provide much better IDE support.yfiles-api-umd-jsdoc.js
Incompatible API Changes
-
The
PolylineEdgeRouterDataclass has been renamed toEdgeRouterDatato match the name of the layout algorithm it supports. -
The protected method
HandleInputMode.isHoveringhas been removed. To customize what handle should be used for a certain query location, use the newHandleInputMode.QueryClosestHandleevent. -
The
TextEditorInputMode.getTextBoxBoundsmethod has been removed. -
The
CanvasComponent.fitContentViewMarginsproperty has been renamed tocontentMargins. Accordingly, theonFitContentViewMarginsChangedmethod and theFitContentViewMarginsChangedevent have been renamed toonContentMarginsChangedandContentMarginsChanged, respectively. -
The optional
projectionparameter for theSvgExport.calculateScaleForWidthandcalculateScaleForHeightmethods has been removed. Instead, there is aprojectionproperty onSvgExport, which should be set to the same projection as the exported canvas component. -
The following methods now return a
Promise:-
The methods
MouseHoverInputMode.OnShowandShownow return aPromisethat completes when the tooltip content is available and provides whether the tooltip is actually displayed. -
The
HandleInputMode.BeginDraggingmethod now returns aPromise. -
The
GraphEditorInputMode.OnLabelTextEditedmethod now returns aPromisethat completes when the text validation is done and provides whether the validation succeeded or was canceled.
-
The methods
-
The
LayoutData.apply,ItemCollection.provideMapper, andItemMapping.provideMappermethods were removed. The newGenericLayoutDataclass is a generic implementation ofLayoutDatathat allows to pass arbitrary data to layout stages. -
The
CanvasComponent.fitContentandGraphComponent.fitGraphBoundsmethods now have an optional parameter that allows changing the viewport in an animated fashion. -
The
CanvasComponent.ensureVisiblemethod now has an additional parameterviewportInsets. -
The constructor of the
TreeReductionStageclass no longer contains thecoreproperty in the extra option object parameter. It is replaced by propertycoreLayoutwhich previously was a duplicate. -
The following properties of the option object parameter of the
DelegatingNodePlacerconstructor have been renamed to match the respective node placer property names:placerUpperLeftwas renamed toprimaryPlacerandplacerLowerRightwas renamed tosecondaryPlacer. -
The options overload of the following methods and constructors has been removed since they
were ambiguous with the regular invocation:
ICommand.canExecute,ICommand.execute, constructor ofInsetsGroupBoundsCalculator, and constructor ofSwimlaneDescriptor. -
IComparable's useless static create method has been removed. A properIComparablerequires state to compare the object passed to itscompareTomethod with. -
Some callbacks whose parameter types or return types erroneously accepted
nullnow have the proper type. This might result in compile time errors in TypeScript. -
If a returned
Promisehas no (meaningful) resulting value, this resulting value is now correctly specified asvoidinstead ofanyor another object. Namely, this affects the methodsLayoutExecutor.start,LayoutExecutor.stop,GraphComponent.morphLayout,GraphComponent.updateVisualAsync,GraphComponent.zoomToAnimated,Animator.animate, andSvgExport.fixViewBoxAttribute. -
The
BusRouterclass and the accompanying helper classBusRepresentationsare now located in the newly added moduleyfiles/router-bus.
Changes in Default Behavior
- As a result of the improvements and bugfixes for text measuring, a single line of text is no longer visible if the specified maximum height is smaller than its actual line height.
-
The
CanvasComponent.projectionproperty no longer accepts transforms with a non-zero translation component. -
The
FIT_CONTENTandFIT_GRAPH_BOUNDScommands now change the viewport in an animated fashion. -
Zooming with the mouse wheel to the center of the viewport by using
CanvasComponent'scenterZoomEventRecognizerno longer uses theINCREASE_ZOOMandDECREASE_ZOOMcommands. - During animated viewport transitions, for performance reasons, mouse events are not redispatched, anymore, except for the last frame of the animation.
-
Measuring an empty string with wrapping in
TextRenderSupport.measureTextnow returns the line height instead of 0.0. -
The provider returned by
IEdgeReconnectionPortCandidateProvider.ALL_NODE_AND_EDGE_CANDIDATESnow doesn't return port candidates of the reconnected edge itself anymore as this lead to an unstable reconnection behavior. -
The
HierarchicLayoutDataclass now assigns same-layer constraints to nodes with the same comparable inLayerConstraintsData.nodeComparables. This is an unintended change that was reverted in yFiles for HTML 2.4.0.1. -
The
OrganicLayoutsubstructure stylesStarSubstructureStyle.RADIAL,StarSubstructureStyle.CIRCULAR,ChainSubstructureStyle.RECTANGULAR,ChainSubstructureStyle.STRAIGHT_LINE, andCycleSubstructureStyle.CIRCULARdo 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.RADIAL_NESTED). -
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. 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 are
StarSubstructureStyle.SEPARATED_RADIAL,ParallelSubstructureStyle.RADIAL,ParallelSubstructureStyle.STRAIGHT_LINEandParallelSubstructureStyle.RECTANGULAR. -
As the
OrganicEdgeRouter.keepExistingBendsproperty 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 following behavior change applies to class
HierarchicLayoutwith polyline edge routing style: the default value of propertyEdgeLayoutDescriptor.minimumSlopewas changed from 0.3 to 0.2 which makes the sloped segments less steep and the overall results more compact. -
The default value of the
ClassicTreeLayout.minimumLayerDistanceproperty was changed from 40.0 to 20.0 and the default value of theClassicTreeLayout.busAlignmentproperty was changed from 0.3 to 0.5. In addition, the newminimumFirstSegmentLengthandminimumLastSegmentLengthproperties may lead to different results compared to previous versions. Setting both properties to zero will neutralize their influence on the result. -
For the
DefaultNodePlacerclass that is used by theTreeLayout, the default values of thehorizontalDistanceandverticalDistanceproperties were changed from 40.0 to 20.0, and the default values of theminimumFirstSegmentLengthandminimumLastSegmentLengthproperties were changed from 0.0 to 20.0. -
The default value of the
LayeredNodePlacer.busAlignmentproperty was changed from 0.3 to 0.5.
Deprecations
-
The
CanvasComponent.animateScrollCommandsproperty has been deprecated in favor of the newanimatedViewportChangesproperty, which offers more control over viewport animations, not just the scroll commands. -
The automatically inserted WebGL uniforms
viewTransform,worldTransform, andprojectionhave been superseded byu_yf_worldToWebGL,u_yf_viewToWebGL, andu_yf_intermediateToView, respectively. -
The
OrganicLayout.clusterNodesproperty is now deprecated. It is replaced by the newOrganicLayout.clusteringPolicyproperty. To disable clustering, specifyOrganicLayoutClusteringPolicy.NONE. To enable it and use the same algorithm as before, specifyOrganicLayoutClusteringPolicy.EDGE_BETWEENNESS.
yFiles for HTML 2.3.0.4
This is the 4th bugfix release for yFiles for HTML 2.3. It brings error corrections and some demo improvements.
There are no incompatible API changes in this release.
Bugfixes
View and Interaction
- The
ViewportLimiterclass no longer prevents users from zooming out in certain situations. In addition, it no longer causes sporadic jumps of the viewport. - Snap lines are no longer rendered at the wrong location on the screen.
- Arrow heads of some snap lines are no longer rendered with an incorrect orientation in isometric views.
-
The rendering of newline characters in the
MarkupLabelStyleis now consistent with the behavior of whitespace in HTML. Especially, newlines are rendered as a single space and ignored on the start and end of the input string. - The viewport rectangle in the overview is now correctly hit-tested when a projection is used.
-
Using the
NinePositionEdgeLabelModelfor edges with theBezierEdgeStyleno longer throws an error in theBezierEdgeStyleRenderer.getSegmentCountmethod. -
An animation created with the
Animations.createGraphAnimationmethod no longer throws an error if the providedIMapperwith new bend locations doesn't provide bend locations for all edges. - Layout animations for graphs with ports that are owned by edges no longer throw an error.
-
Disposing a
GraphComponentduring a running animation no longer throws an error.
Layout and Algorithms
-
After running a layout for a graph component with the
LayoutExecutorclass or themorphLayoutmethod, theLayoutExecutorinstance is now properly removed from the lookup of the component. Previously, allLayoutExecutorinstances were accumulated in the lookup, and with them the usedIGraph,ILayoutAlgorithm, andLayoutDatainstances, resulting in a memory leak. -
The
EdgeRouterclass 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 individualEdgeLayoutDescriptorinstances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used. -
The
HierarchicLayoutclass no longer ignores edges connected to group nodes when the group node contains a bus structure 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 error. -
The
PartialLayoutclass now transfers the value of itsPartialLayout.maximumDurationproperty 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
OrthogonalSegmentDistributionStageclass does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that theChannelEdgeRouterclass is affected too, as the stage is by default called from within the router. -
The
HierarchicLayout,EdgeRouterandCurveRoutingStageclasses no longer occasionally throw an error when the curved routing style is used for graphs that have self-loop edges. -
The
HierarchicLayoutclass no longer occasionally throws an error when enablingHierarchicLayout.compactGroupsand in conjunction with layering constraints and/or a group node marked as incremental. -
The
ClearAreaLayoutclass now produces correct orthogonal routes for edges if itsclearAreaStrategyproperty is set to a local strategy. Previously, some of the edges may have received a non-orthogonal route. -
The
EdgeRouterclass no longer throws an error if the input contains a bus defined viaBusDescriptorwhere all the associated edges are actually fixed. -
The Manhattan distance metric of
HierarchicalClusteringno longer ignores the vertical distance component. -
The
LabelPropagationClusteringalgorithm 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. -
The
Cycles.findCycleEdgesalgorithm no longer crashes when the given input graph contains self-loops.
Noteworthy Demo Improvements
-
The new Jest Demo
shows how to setup unit testing of a yFiles for HTML-based application without running a browser. It
complements the existing Jest Puppeteer Demo, and shows how to mock parts that depend on the DOM and how to
avoid the costly transpilation of the yFiles
JSmodules. - Updated the dependencies to third-party frameworks and tools in the demos, for example React, Vue CLI, Electron, etc.
-
The
VuejsNodeStyleclass now correctly uses thezoomproperty of theIRenderContextparameter in itscreateVisualandupdateVisualmethods instead of using the zoom ofGraphComponentinstance. - The PDF Export Demo now supports user-specified output paper sizes, for example A4, A3, and letter.
-
In the Web Worker Demos,
the
JsonIOclass now correctly handles the positions of group node labels that are positioned with theInteriorStretchLabelModel. - In the Drag and Drop Demo, dropping edges via the native DnD API now works in all supporting browsers.
- The Image Export Demo now correctly exports arrows in Internet Explorer 11. This required an update of the underlying canvg library which no longer supports IE 9.
yFiles for HTML 2.3.0.3
This is the third bugfix release for yFiles for HTML 2.3. It brings error corrections and a few improvements of the developer experience.
There are no incompatible API changes in this release.
Improvements
-
The performance of the
DefaultLabelStyleclass has been improved, especially when creating a large number of labels at once. -
The minimum required TypeScript version of the typings is now documented, which is, since
yFiles for HTML 2.3, TypeScript 2.8.
Note that due to an incompatible change in TypeScript 4.0, overriding non-abstract properties of a yFiles type fails in TypeScript 4.0+. See the related knowledge base article for more information.
- Several sections of the developer's guide have been updated and extended.
- Browsing the TypeScript demos in the yFiles package is now possible right from the start without any manual configuration. They are linked from the included demo overview page, and a watcher task is included
-
When editing demo source code in the preconfigured Visual Studio Code project, the code
completion suggests only imports from the
yfilesmodule. Additional unwanted imports from theyfiles-umdmodule are no longer suggested. - The yFiles for HTML optimizer was updated to version 1.4.2. It now supports the latest ECMAScript language features and automatically excludes from obfuscation several API names used by popular frameworks like Angular and Vue.js.
Bugfixes
-
The TypeScript typings now define the
delegatefunction and its methods. Previously, this API was only part of the API documentation but missing in the typings. -
Corrected the automatic conversion from object syntax with string values to
ObjectBindings. -
The
GraphModelManager.getMainCanvasObjectmethod no longer throws an error when overriding itsgetCanvasObjectmethods for specific item types in an unexpected way. -
The
MapEntryclass now properly implements value equality. Previously, it unintentionally implemented reference equality, and as a consequence, the results of the methodsgetPathBetween,getAllPathsBetween, andhasPathBetweenof thePathsResultclass never found a matching path. Note that neither thePathsResult.pathsproperty nor theHashMapclass were affected by this error.
Interaction
-
The
NodeDropInputModeclass now correctly considers port labels, both for creating the new node and for the preview. -
The
ICommand.ZOOM_TO_CURRENT_ITEMcommand now centers the current item even if aViewportLimiterois enabled and uses alimitingPolicyofTOWARDS_BOUNDS. -
The new default
ViewportLimiterpolicyTOWARDS_BOUNDSno longer causes the viewport to scroll to unexpected locations (including far away from the graph) during layout animations. -
Calling the
GraphInputMode.FindItemsandGraphInputMode.HitTester.EnumerateHitsmethods with a customIInputModeContextwill now always pass that context to theIHitTestableimplementations of the items being hit-tested. Previously, the main input mode's ownIInputModeContextwas used in certain cases. -
When the viewport changed while a mouse button was pressed, the corresponding
MouseEventwas accidentally reported via theMOUSE_MOVEDevent rather than theMOUSED_DRAGGEDevent. TheeventTypeproperty was correct, though. -
The
contextparameter of the staticIHitTestable.createmethod is now correctly defined as non-null, as it is already the case for all other of thesecreatemethods.
Layout
-
Instantiating a new
PartialLayoutno longer fails with an error if no type from thelayout-organicwas used before. -
The
HierarchicLayoutclass 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
EdgeRouterclass 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
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges defined with theEdgeRouterBusDescriptorclass. -
The
BusRouterclass 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
BusRouterclass no longer ignores edges that should be routed when a they are on a bus with fixed edges and when they share both source and target port with a fixed edge. -
The element processing order in the
BendConverterlayout 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
ParallelEdgeRouterclass 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
OrthogonalLayoutclass now correctly handles input graphs with parallel edges if thePreferParallelRoutesproperty is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
FamilyTreeLayoutclass 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.
yFiles for HTML 2.3.0.2
This is the second bugfix release for yFiles for HTML 2.3. There are only a few error corrections but several new demos.
There are no incompatible API changes in this release.
Bugfixes
Graph and View
-
For all three graph builder and tree builder classes, the
GraphBuilderItemEventArgs.dataItemproperty of theNodeRemovedandEdgeRemovedevents no longer contains an outdated object in some cases. -
The
GraphBuilderclass no longer fails if an edge and its source or target node are removed by the sameupdateGraphcall. -
The TypeScript definitions and the documentation of the
GraphOverviewCanvasVisualCreator,GraphOverviewSvgVisualCreator, andGraphOverviewWebGLVisualCreatorclasses now contains the previously missing methodscreateVisualandupdateVisual. -
The
ViewportLimiterclass now queries thegetCurrentBoundsmethod if theViewportLimitingPolicyproperty is set toViewportLimitingPolicy.TOWARDS_LIMITS, too.
Layout
-
The
HierarchicLayout,EdgeRouter, andCurveRoutingStageclasses 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. -
Curved edge routes generated by the
HierarchicLayout,EdgeRouter, andCurveRoutingStageclasses are now more symmetric and smoother in cases where a large number of edges connect to the same node side. Previously, non-curved artifacts could appear. -
The
HierarchicLayoutclass does not crash anymore when defining different edge routing styles for different edges where at least one of the styles isHierarchicLayoutEdgeRoutingStyle.CURVED. -
The
EdgeRouterclass 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
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges -
Resolved a potential
null-reference error caused by theChannelEdgeRouterclass when using theOrthogonalPatternEdgeRouterclass as path finder strategy.
New Demos
- Process mining visualization
- The new Process Mining Visualization Demo shows how to create an animated visualization of a process flow. The diagram shows the various steps in a processing pipeline and how entities move through the pipeline. A heat map shows which elements in the graph are nearing their capacity limit.
- Aggregating nodes with common properties
- The new Interactive Aggregation Demo shows how to analyze a graph by interactively aggregating nodes with common properties.
- A node style with a modifiable shape
- The new Editable Path Node Style Demo shows a path-based node style whose control points can be moved by users.
- Avoiding node overlaps while editing graphs
- The new Node Overlap Avoiding Demo shows how an automatic layout can remove node overlaps while a user interactively edits a graph.
- Folding with layout
- The new Folding With Layout Demo shows how to automatically trigger a layout that clears or fills the space when opening or closing groups.
- Clear an area of graph items
- Two new, similar demos show how the clear and fill area layout can be used to keep an area clear of graph elements during user interaction. The new Clear Marquee Area Demo automatically keeps a marquee area clear of graph elements, and the new Clear Rectangle Area Demo keeps a user-defined rectangular area clear of graph elements.
Noteworthy Demo Improvements
-
In large Angular apps, especially ones with many components, performance can go down due to
Angular's extensive and expensive change detection. To prevent this, the yFiles
GraphComponentshould run 'outside of Angular'. Details are explained in the corresponding knowledge base article and shown by the updated Angular Demo. - The BPMN Editor Demo now contains a parser for the BPMN Diagram Interchange format.
- The React Demo now comes with a template node style that makes use of React's data binding to automatically update its visualization when the corresponding data changes.
- We removed the previous Isometric Drawing Demo. Since the introduction of the Projection feature in version 2.3, the approach shown in this demo is no longer recommended. It is replaced by the new demo that was introduced in 2.3 with the name Isometric Drawing Demo.
yFiles for HTML 2.3.0.1
This is the first bugfix release for yFiles for HTML 2.3. In addition to the usual error corrections, there is a new demo and a noteworthy correction in demo code.
There are no incompatible API changes in this release.
Bugfixes
General
-
In the UMD variant of the library, the
layout-areamodule now correctly includes all types that belong to theClearAreaLayoutandFillAreaLayoutAPIs. -
The layout-only yFiles for HTML packages now contain the library module
layout-areathat was missing before. -
The
AdjacencyGraphBuilderandTreeBuilderclasses now properly remove references to edges whose source or target node has been removed.In addition, these classes no longer create incomplete graphs when an invalid
parentIdwas specified for a node.
View and Styles
-
In version 2.3, the
SvgExportclass did not inline external Bitmap images anymore. This has been fixed and the documentation has been improved. - Several problems related to the text measuring performance improvements of version 2.3 are now fixed. Effectively, these improvements have an effect only now.
-
The
MarkupLabelStyleclass now places text that starts or ends with some empty lines correctly when using the optionVerticalTextAlignment.TOP. -
If the preferred label size is too small to even render wrapped text, the
MarkupLabelStyleclass does not throw an error anymore. In addition, if the remaining text of a line doesn't fit in the next line after cropping, text rendering will now end at this text position instead of continuing with the next line. -
Measuring text with the
TextRenderSupportclass is now more exact. Previously, the determined width of a line was one pixel to small (except for lines that ended with an ellipsis). Especially, this problem affected the text placement of the built-in label styles. -
Edges styled with
BezierEdgeStylenow remain smooth during layout animations and are now properly cropped at nodes whoseIShapeGeometryimplementations returnnullas outline. -
The bounds and the hit testing of the
BezierEdgeStyleclass now consider the entire edge, regardless of the number of bends, and performance problems in theisVisible,isHit, andgetBoundsmethods have been fixed. -
Due to better
nullchecks, several styles and input modes no longer throw an error in the rare case that anIRenderContextdoesn't provide aCanvasComponentinstance. -
The
ViewportAnimationno longer throws an error when applied on a zero-sizeGraphComponent.
Input
-
The
ICommand.SET_CURRENT_ITEMcommand can now also be used to “reset” the current item tonullby passingnullas the command parameter. This also fixes that theNavigationInputMode.setCurrentItemandGraphInputMode.setCurrentItemmethods did nothing whennullwas passed as an argument. -
The
TextEditorInputModeclass now correctly queries theViewportLimiterif itstextBoxPlacementPolicyproperty is set toTextBoxPlacementPolicy.SCROLL_CANVAS. Now, if a text box is not visible at its original location because it's outside the limited viewport, the viewport only scrolls to its limits and then the text box is moved instead. -
The
GraphClipboard.pastemethod is now called from the paste command, thus overriding it will now have the expected effect.
Layout and Analysis
-
The
IGraph.morphLayoutandLayoutExecutor.startmethods no longer throw an error when applied on a zero-sizeGraphComponent. -
GraphCentralityandClosenessCentralityno longer calculate infinite orNaNcentrality values on single-node graph subsets. Moreover, these classes no longer include results for a single node if the original graph has a single node and the subset filters that node away.
New Demos and Noteworthy Demo Improvements
-
The new Layout
Without View Demo shows how to run graph analysis and layout algorithms without a view and without the
IGraphAPI. - A problem in the context menu implementation that is used by several demos is now fixed. It prevented the opening of all context menus in demos. Now, context menus in demos show again as expected.
yFiles for HTML 2.3
Major New Features
- Isometric Drawing and Other Projections
-
CanvasComponentand thusGraphComponentnow have an additionalprojectionproperty 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 theMatrixclass. 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. The corresponding chapter in the Developer's Guide has all details about the customization options and the changes related to these features.Projections are supported by all three rendering modes SVG, HTML Canvas, and WebGL.
The new Isometric Drawing Demo displays graphs isometrically and allows for adjusting the projection to rotate the graph in 3D.
- Fill Area Layout and Clear Area Layout
-
The new
ClearAreaLayoutalgorithm 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
FillAreaLayoutalgorithm 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.These new layout algorithms are part of the new
layout-areamodule.The Component Drag and Drop Demo uses the
ClearAreaLayoutalgorithm to create space in the graph for newly inserted components. In the Fill Area Layout Demo, theFillAreaLayoutalgorithm closes gaps in the graph layout after graph elements were deleted. Finally, the Interactive Graph Restructuring Demo combines both algorithms to adjust the graph layout while sub-graphs are moved and reconnected within the graph. - 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
NodeAggregationclass 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
KCoreComponentsclass provides a component detection algorithm that finds k-cores. -
The classes
LouvainModularityClusteringandLabelPropagationClusteringprovide two new algorithms for cluster detection. -
The
EigenvectorCentralityclass offers a centrality algorithm that measures the influence of a node in a network based on the Eigenvector score. -
The
PageRankclass provides a centrality algorithm that calculates the so-called page rank for the nodes. -
The classes
ChainSubstructures,CliqueSubstructures,CycleSubstructures,StarSubstructures, andSubtreeSubstructuresprovide 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
GraphStructureAnalyzernow 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 the
NodeAggregationalgorithm 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 other new graph analysis algorithms are shown in either the Graph Analysis Demo or the Clustering Algorithms Demo.
-
The new
- Markup Label Style
-
The new
MarkupLabelStyleinterprets the label's text as markup and renders the label accordingly, for example with bold or italic parts, different colors, and different sizes. With this style, many typical text styling requirements can be realized without implementing a custom label style.The new Markup Labels Demo shows the markup that is supported by this style. The new Markdown Label Demo realizes basic markdown rendering based on this style and the new Rich Text Label Demo shows how to implement interactive rich text editing for this style.
- Bezier Edge Style
-
The new
BezierEdgeStylerenders edges with smooth Bezier-curve paths. For intuitive interactive editing, the style comes with the same control points -or handles- that are known from other vector graphic drawing applications.In addition, the new edge label models
BezierEdgePathLabelModelandBezierEdgeSegmentLabelModelplace labels optimally on curved edges rendered with this style.The new Bezier Edge Style Demo presents this edge style and its label models. In addition, several of the existing demos with curved edges now use the new style.
- 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.centerReshapeRecognizeris triggered which defaults toKeyEventRecognizers.ALT_PRESSED. - Aspect ratio resizing maintains the aspect ratio of a node. It is active when the
NodeReshapeHandleProvider.ratioReshapeRecognizeris triggered which defaults toKeyEventRecognizers.SHIFT_PRESSED. - The
NodeReshapeHandleProvider.reshapePolicyproperty 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 Selection 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, andAdjacentNodesGraphBuilderclasses 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.With perfect TypeScript-based code completion, 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, andAdjacentNodesGraphBuilderclasses are available as demo code in thedemos-js/utilsdirectory.The Graph Builder Demo, the Tree Builder Demo, the Adjacency Graph Builder Demo, and the Simple Graph Builder Demo show how to load graph data from JSON using the new graph builder classes.
- Improvements for Developers
-
- The new development mode variant of the library includes the powerful yFiles runtime type checking. It's no longer needed to include it separately and deployment tools like webpack can strip it from "production" builds.
- Custom object formatters for the developer tools in Google Chrome and other Chromium browsers.
- The UMD variant of the library now also provides namespace-less names, so the modern "flat" API can easily be used with Node.JS, web workers, or RequireJS.
- Various improvements for the optimizer.
- The semi-automatic migration tool was rewritten to make the migration process for returning users easier. It now offers built-in TS support, an incremental mode, and clear output with source code references recognized by major IDEs.
-
Removed the
create-node-librarytool, as the UMD library now already includes top-level exports of all types. - Two new demos show how to lazily load yFiles modules with dynamic imports, namely the Webpack Lazy Load yFiles Demo and the Webpack Lazy Load Layout Modules Demo.
- TypeScript Demos
- A large number of demos is now available in a TypeScript version in addition to the JavaScript version. In this release, these demos include all tutorials of the Getting Started, Custom Styles, and Application Features tutorials, as well as all the new demos. More demos in TypeScript will be added in future minor and major releases, but all demos will always be available in JavaScript, too, and both versions will be identical except for language differences.
New Features
General
-
yFiles interfaces now provide a static
createmethod that creates a new instance of the interface. The signature of this method follows the same rules as the quick interface implementation of the interface. This is especially useful in TypeScript projects since the previous JavaScript-style quick interface implementation syntax cannot be expressed with TypeScript definition files. -
Types that support type
conversion now have a static
frommethod to explicitly invoke the conversion. This is especially useful in TypeScript projects and custom code to set properties in this way. -
GraphML I/O now supports a static
$metaattribute to annotate properties of classes withGraphMLAttributes. This alleviates the need to revert to the yFiles class framework for classes that should be serialized through GraphML.
Graph Component and Interaction
-
To improve accessibility, the new
GraphComponent.ariaLiveRegionproperty provides an aria-live region that can be used to update screen readers. The new Accessibility Demo shows how to make use of this property. -
The default label style now supports right-to-left text direction. Label text is properly placed
and wrapped when the CSS
directionof theGraphComponent's<div>element is set tortl. The Label Text Wrapping Demo has a new graph sample with right-to-left text. -
The
GraphComponentis now prepared to provide complete control of the z-order of elements in all cases. The new Z-order Demo shows how to use this to maintain the z-order during operations there the library does not maintain this order by default, e.g. for undo and redo, expanding and collapsing groups, and clipboard commands. -
Added support for two-finger drag and pinch touchpad gestures. The new
MouseEventArgs.wheelDeltaXproperty provides the horizontal mouse wheel component. -
The template styles now provide a
makeObservablemethod to transform a regular data object into an observable object, allowingTemplateBindingsto react to changes of these objects automatically.In addition, bindings in template styles now support "duck typing". In other words, if the bound object fires the appropriate events, the binding is updated automatically.
-
All string template styles now strip executable code from the templates to prevent attacks via
GraphML. To re-enable code injection set the new static property
trustedon any of these classes totrue. -
The new
NodeLabelModelStripeLabelModelAdapterclass allows using node label model parameters for the positioning of the row and column labels of a table. -
A new policy has been added to the
ViewportLimiterclass 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. -
An
Animationcan now be paused and unpaused by setting the newAnimator.pausedproperty after the animation has started. This feature is used in the Network Monitoring Demo to pause the animation of the network traffic. -
The
GridVisualCreatorclass can now also draw only horizontal lines or only vertical lines when itsgridStyleproperty is set to one of the new enum valuesGridStyle.HORIZONTAL_LINESorGridStyle.VERTICAL_LINES.
Layout
-
The
EdgeRouterclass and theHierarchicLayoutclass now support a new routing style that generates curved edge paths. This style can be specified for each edge individually using theEdgeRouterEdgeRoutingStyle.CURVEDenum value and theHierarchicLayoutEdgeRoutingStyle.CURVEDenum value, respectively. -
The new layout stage
CurveRoutingStagereplaces polyline edge paths with curved segments using cubic bezier splines and provides a generic way to produce layouts with curved edges. -
The new property
EdgeRouterEdgeLayoutDescriptor.routingStyleallows specifying the routing style individually for each edge routed by theEdgeRouterclass. Furthermore, the new propertiesmaximumOctilinearSegmentRatioandpreferredOctilinearSegmentLengthon the descriptor provide means to configure the octilinear routing style. -
The
CircularLayoutclass now supports exterior edges that are routed around the exterior of the circle as smooth arcs. This can be specified with the newCircularLayout.edgeRoutingPolicyproperty. -
The new
EdgeBundlingStageclass 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. -
The
RadialLayoutclass now supports a user-defined layer/circle assignment strategy. This can be specified with theRadialLayoutLayeringStrategy.USER_DEFINEDenum value and the layout data propertyRadialLayoutData.layerIds. -
The Layout Styles Demo has
been enhanced to include the following layout features and improvements:
- Exterior edge routing for the circular layout
- Curved edge routing and bus routing for the hierarchic layout and the edge router.
- Integrated edge labeling for the edge router.
Algorithms
The "algorithms" part of the library provides the actual implementation of the new aggregation and analysis
algorithms. Since this part uses the Graph API instead of the common IGraph API, using
these implementations directly is rarely needed.
-
New methods of the
GraphStructureAnalyzerandGroupAlgorithmclasses compute several additional network statistics, namelyGraphStructureAnalyzer.getAverageDegree,GraphStructureAnalyzer.getAverageWeightedDegree,GraphStructureAnalyzer.getDiameter,GraphStructureAnalyzer.getDensity, andGroupAlgorithm.getModularity. -
The new
NodeAggregationAlgorithmclass provides an algorithm that intelligently aggregates nodes of (large) input graphs. -
The new
TransitivityAlgorithm.transitiveEdgesmethod creates the transitive edges that connect the visible nodes in an input graph. -
The new
GroupAlgorithm.getClusteringCoefficientmethod computes the local clustering coefficient for each node as well as the average clustering coefficient. -
The new
GraphConnectivity.kCoreoverloaded methods compute the so-called k-cores of an undirected input graph. -
The new
CentralityAlgorithm.eigenvectorCentralitymethod computes the eigenvector centrality for each node in an undirected graph. -
The new
GroupAlgorithm.labelPropagationmethod implements the label propagation algorithm which detects communities in the input graph. -
The new
GroupAlgorithm.louvainModularitymethod detects the communities of an input graph by applying the well-known Louvain method for community detection. -
The new
CentralityAlgorithm.pageRankmethod provides an implementation of the page rank algorithm that computes a rank for each node. -
The new
Substructuresclass offers methods to detect the following graph structures: Chains, Cliques, Cycles, Stars, and Trees.
Improvements
-
The new static method
IEdge.getPathPointsreturns anIListEnumerablethat contains a snapshot of the source port location, followed by the bend locations, followed by the target port location of an edge. -
The
ITable.addLabelmethod no longer accepts label model parameters that do not supportIStripeinstances. Previously node label models could be used but did not work properly at runtime. -
The new
Fill.hasSameValuemethod can be used to check two fills for equality. -
The classes
DefaultFolderNodeConverterandFoldingEdgeConverterBaseprovide a new protected methodcreatePreferredLabelSizeto allow for overriding the default implementations. - The performance of GraphML serialization and deserialization was improved.
-
The parameter of all predicate functions is now annotated as
not-nullwhich makes it more comfortable to implement these functions. -
BaseClasshas now overloads with more than one type parameter, making the TypeScript syntax for implementing several interfaces less complicated.
Collections
-
The interfaces
IEnumerableandIListnow provide the methodsindexOfandfindIndexwhich behave similarly to the corresponding functions of JavaScript Arrays. The methodIList.indexOfnow has an optional parameterfromIndex. -
The
IListinterface now declares the methodspush,pop,shift, andunshiftthat work in the same way as the corresponding methods of JavaScript arrays. -
The static methods
Point.from,Size.fromandRect.fromcan now convert any object that provides at least properties likex,y,width, andheight. -
The new
Point.interpolatemethod calculates the linear interpolation between two points. -
The
IMapinterface now extends theIMapperinterface to facilitate registering instances of maps in theMapperRegistry. -
A native JavaScript
Mapcan now be converted automatically toIMapper.
View
- The DOM update performance when elements in the back of the rendering stack got removed or changed their z-Order was massively improved.
-
The
GraphOverviewComponentis now rendered with HTML Canvas instead of SVG by default. This results in better performance and was always the intended behavior. -
The performance of general text measuring for
TextMeasurePolicy.SVGwas improved for cases in which a lot of measurements are done in a short period of time, e.g. during bulk label creation. -
The
CanvasComponent.fitContentmethod now respects thelimitedFitContentZoomproperty if aViewportLimiteris enabled. -
The
CanvasComponent.updateContentRectmethod now throws an exception if an element on the canvas provided invalid bounds, e.g. one with infinite values. -
The methods
raise,lower,toFront, andtoBackon classGraphModelManagerare now virtual. -
The new
GraphModelManager.provideUserObjectOnMainCanvasObjectproperty can be set so that a model is accessible as its main canvas object's user object. -
The new
SvgExport.cssStylesheetproperty allows for defining CSS rules that are added to the exported SVG. Additionally, setting it explicitly tonulllets theSvgExportclass automatically add all relevant CSS rules from available stylesheets to the exported SVG. -
The classes
NodeStyleLabelStyleAdapter,NodeStylePortStyleAdapter, andNodeStyleStripeStyleAdapternow propagate the tags of labels, ports, and stripes to the node that's rendered with the node style. -
The rendering performance of the
DefaultLabelStyleclass was improved when setting amaximumSize. -
To make overriding easier, the overloaded method
IPathGeometry.getTangentthat has a segment index and a ratio as parameters was renamed togetTangentForSegment. The corresponding methods ofEdgeStyleBaseandGeneralPathwere renamed as well. -
To make overriding easier, the overloaded methods
GraphModelManager.getCanvasObjectGroupnow have distinguishable names, namelygetNodeCanvasObjectGroup,getEdgeCanvasObjectGroup, etc.
Graph Component's New Projection Feature
-
The
CanvasComponentclass has additional methods to convert between the world, the new intermediate, and the view coordinate system. -
The
MarqueeSelectionInputMode,NavigationInputMode, andHandleInputModeclasses now have a propertyuseViewCoordinateswhich controls whether the input mode draws its decorations and processes input in view coordinates. -
When the
MarqueeSelectionInputModeclass uses view coordinates, the resulting shape of the marquee in world coordinates may not be a rectangle. Therefore, theMarqueeSelectionEventArgsclass now has apathproperty of typeGeneralPathto describe the marquee shape and ausePathproperty that determines whether thepathproperty or therectangleproperty shall be used. -
The
EdgeDecorationInstaller,RectangleIndicatorInstaller,PointSelectionIndicatorInstaller, andDefaultPortCandidateDescriptorclasses now have auseViewCoordinatesproperty that controls whether the decoration is rendered in view coordinates. -
The
ContextConfigurator.calculateScaleForHeightandcalculateScaleForWidthmethods now take an additional optional parameter with the projection to correctly calculate the scale factor when a projection is used. -
The
CreateEdgeInputMode.measureDistancemethod now has to return the distance in view coordinates if and only ifCanvasComponent'sprojectionis used. -
The
IRenderContextinterface now has additional members that are useful with the new projections feature:projection,intermediateTransform,worldToIntermediateCoordinates, andintermediateToViewCoordinates.
Interaction
- Zooming speed of two-finger scroll and pinching was improved for Chrome and Firefox on macOS.
- The default position handler for edges now creates fewer additional bends when the edge is dragged while orthogonal edge editing is enabled.
-
The new factory method
OrthogonalEdgeEditingContext.createOrthogonalEdgeDragHandlercan 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
maximumBoundingAreacan now be set on the classesReshapeHandleProviderBase,ReshapeHandlerHandle,RectangleHandle, andReshapeRectangleContextto restrict reshaping to stay inside the given bounds. -
The new
NodeDecorator.reshapeHandlerDecoratorproperty simplifies using customIReshapeHandlerimplementations for nodes. -
The new
ReshapeRectangleContext.ratioproperty specifies the width/height ratio that is kept for aspect ratio resizing. -
The new classes
NodeReshapeHandleProviderandNodeReshapeHandlerHandleare used as the default implementation for node resize handles. -
With the new
ReshapeRectangleContext.reshapePolicyproperty,INodeReshapeSnapResultProviderimplementations can respect the node aspect ratio for according resize gestures. -
The
ReshapeHandlerHandleclass has new getters for theIReshapeHandlerand theHandlePositions. -
The new
NavigationInputMode.fitContentmethod is called after collapse, expand, enter, and exit operations if thefitContentAfterGroupActionsproperty is enabled. -
The
NavigationInputModeclass doesn't fit the content anymore after expand and collapse operations if anautoGroupNodeAlignmentPolicyother thenNodeAlignmentPolicy.NONEis used. -
An optional parameter
preferredSnapTypehas been added to theSnapLineSnapResultconstructor and theSnapResults.createSnapLineSnapResultfactory method. -
The
GraphClipboardandGraphEditorInputModeclass now provide the newElementsDuplicatedevent that occurs when a duplicate operation finished successfully. -
The
undoandredomethods of theUndoEngineclass now throw an exception with the nameInvalidOperationErrorif the current state does not allow performingundoorredo. Previously, the name was eitherNotSupportedErroror justError. -
The classes
ResizeStripeInputMode,DropInputMode, andHandleInputModenow have anisDraggingproperty indicating whether a drag currently is in progress. -
The
CompositeLabelModelclass now supports label snapping. -
The
SnapResults.createResizeSnapResultmethod now takes aPointas delta parameter instead of a number so it is possible to create resize snap results where the orientation of the mouse delta differs from the orientation of the snapped size. -
The properties
gridSnapDistanceandgridSnapTypeof theGraphSnapContextclass have been pulled up to theSnapContextclass. -
The zoom-invariant
gridSnapDistanceproperty has been added to theCollectSnapResultsEventArgsclass. -
It is now easier to customize the
GroupingNodePositionHandlerclass. The boolean propertiesadjustParentNodeLayout,moveChildNodesandreparentingEnabledhave been added to control whether an 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
GraphEditorInputMode.requeryHandlesmethod has been made public and can now be used to refresh the displayed handles ifIHandleProviderimplementations return different handles over time.
Layout
- Frequently used types of the layout part have now nullability annotations.
-
The
LayoutExecutorclass now generates more specific port constraints with theFixPortsproperty enabled, resulting in better edge paths. -
The methods
IGraph.applyLayoutandGraphComponent.morphLayoutnow support the configuration of their internalLayoutExecutorinstance. Hence, options like viewport animation can be adjusted without switching to theLayoutExecutorclass. -
The
EdgeRouterclass now provides improved support for early exits. The routing algorithm now often reacts more sensibly to the case that the specifiedmaximumDurationis reached. -
If the
EdgeRouteralgorithm runs with highly restricted maximum time or when it gets stopped by means of anAbortHandler, it now better adheres to the minimum edge-to-edge distance. -
The new
HideGroupStage.resetEdgePathsproperty allows specifying whether or not the stage resets the path of edges incident to group nodes. -
The
ComponentLayoutclass now correctly considers node and edge labels when using the packed layout styles, e.g.,ComponentArrangementStyles.PACKED_RECTANGLEorComponentArrangementStyles.PACKED_CIRCLE. Previously, labels could overlap other elements when using these component arrangement styles. -
The new
DefaultPortAllocator.considerFixedPortsproperty allows specifying whether edges with strong port constraints or fixed port candidates should be considered during the port assignment. Previously, such edges were ignored which could lead to intersections with the ports of the other edges. This new feature is enabled by default. -
The
PartialLayoutclass now produces more stable results if it is multiple times applied to the same input graph and thesubgraphPlacementproperty is set toSubgraphPlacement.FROM_SKETCH. -
Constructor overloads have been added to the classes
SingleItem,ItemCollection,ItemMapping, andContextItemMappingthat initialize one of their properties on construction. -
If the
mapperproperty ofHierarchicLayoutData.edgeDirectednessis directly accessed (not explicitly set) its default for unset values is 1.0 (in other words, such edges are considered to be directed). -
If the
mapperproperty ofOrganicLayoutData.groupNodeModesis directly accessed (not explicitly set) its default for unset values isGroupNodeMode.NORMAL. This doesn't change the result of the layout. -
For the
rootPlacements,subtreeRoutingPolicies, andsubtreeAspectRatioproperties of theAspectRatioTreeLayoutDataclass, the type of the mapped values has been made nullable. Fornullor unset values, the settings on theAspectRatioTreeLayoutwill now be taken. -
All
PortCandidate.createCandidatemethods now support type conversion for the port direction.
Analysis
-
The
GraphCentralityandClosenessCentralityanalysis algorithms now calculate the centrality individually per component instead of returning a centrality value of 0.0 for nodes in graphs that are not connected. -
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. The backing algorithms in the
Centralityclass are unchanged. -
When
EdgeBetweennessClusteringandFeedbackEdgeSetare executed, the specified edge weights are checked and in case they are not positive or finite, an exception is thrown. -
The
GraphStructureAnalyzerclass has now methods to determine whether there are multiple edges between the same pair of nodes.
Bugfixes
-
Fixed a bug in
FoldingManagerwhere a predicate change in aFilteredGraphWrapperwhich serves as the master graph could trigger an exception if a child of a folder node has been hidden. - Undo and redo of additions and removals of bends on folding edges now correctly restores the bends at the location they had at the time of removal.
-
Fixed a bug in the
GraphCopierclass which caused theLabelCopiedevent to be dispatched twice for port labels on folder nodes. -
Using ES6 classes together with
GraphMLIOHandler.addXamlNamespaceMapping(xmlNamespace, module)no longer results in an exception when writing GraphML. -
We now make sure that types that are structural compatible for TypeScript are actually
different in the TypeScript typings. Otherwise, the overload resolution provided by the typings wouldn't reflect
the actual outcome. This affected especially the
EdgeDpKeyandNodeDpKeyclasses and theIMapperRegistry.createMappermethods. -
The methods
createNodeMapperandcreateEdgeMapperof classYGraphAdapterare no longer interchanged. Previously, thecreateNodeMappermethod created anIMapperfor keys of typeIEdgeand vice versa.
View
-
The methods
ICanvasObject.aboveandbelowdon't unnecessarily triggerIRenderContext.ChildVisualanymore. -
Fixed a bug that sometimes callbacks registered via the
IRenderContext.setDisposeCallbackmethod have not been called when the visual was disposed. - 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).
- 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
ZOOM_TO_CURRENT_ITEMcommand to ignore theViewportLimiterof the correspondingCanvasComponent. -
The
CanvasComponent.zoomTomethod no longer triggers twoViewportChangedevents. -
The scrollbars of a
GraphComponentare no longer missing if it was lazily initialized with the policyScrollBarVisibility.ALWAYS. -
Setting the
CanvasComponent.useGlassPaneproperty to true now enables a glass pane as intended. -
The
CanvasComponent.SizeChangedevent now also returns the correct old size if theErrorHandling.CatchErrorsproperty is not enabled. -
Fixed a bug where setting the
SvgExport.encodeImagesBase64property to true together with setting theSvgExport.inlineSvgImagesproperty to false would encode SVG images as base64 bitmap images. -
Fixed a bug where SVG images with data URLs as source would not be inlined when the
SvgExport.inlineSvgImagesproperty was set to true.
Styles
-
The
TemplateBinding.boundsproperty is no longer undefined. -
Setting the
fillof anArrowof typeSHORTnow works also with automatic type conversion. -
When setting a new
FontwhosetextDecorationproperty had the valueNONE, thisTextDecorationwas not applied to the SVG text element. -
The
TextRenderSupport.addTextmethod now also applies the properties of the given font to the text element, as stated in the documentation.
Interaction
- Pinch-zoom no longer stops periodically during the gesture.
-
Fixed a touch interaction bug in Safari that resulted in a freeze of the
CanvasComponentwhen lifting two fingers at once. -
Using a custom input element for editing label text now works correctly since the
GraphEditorInputMode.editLabelCoremethod now sets the label text to theTextEditorInputMode.editorTextproperty instead of to its own internal text input element. -
The
NavigationInputMode.fitContentAfterGroupActionsproperty is no longer ignored when theNavigationInputModeclass is used as a child input mode of theGraphEditorInputModeclass. -
The
NavigationInputModeclass now also updates theCanvasComponent.contentRectproperty when it is not used as a child input mode of theGraphEditorInputModeclass. -
The
SnapContext.gridSnapDistanceandSnapContext.snapDistanceproperties are no longer incorrectly interpreted in world coordinates when calculatingsnapResults. - Orthogonal edge editing does not add bends anymore to edges that are marked as not orthogonal.
-
The paste and duplicate operations now honor the
GraphEditorInputMode.shouldSelectpredicate. - 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.
-
The property name reported by the
UndoEngine.PropertyChangedevent is now always equal to the name of the corresponding property. Previously, some of the reported names started with an uppercase letter. - Under rare circumstances, tooltip elements were not removed from the DOM after their leave animation ended. There is now a configurable maximum duration for such animations after which the tooltip is removed in any case. The default value is 5 seconds.
Layout
-
The
HierarchicLayoutclass no longer throws an exception that was previously triggered in some cases with bus structures and in conjunction with layering constraints. -
The
HierarchicLayoutclass no longer throws an exception that was previously triggered in some cases with bus structures and in conjunction with undirected edges. -
Fixed a bug in the
HierarchicLayoutclass that could cause unnecessary (double) edge crossings when the algorithm was executed in incremental layout mode with edge grouping and alternative group bounds. -
The
NodePlacerBase.placeSubtreemethod now clears its internal caches, especially the graph cached in fieldNodePlacerBase.graph. Previously, holding onto a node placer instance could lead to subtle memory leaks. -
The
EdgeRouterclass 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
EdgeRouterclass now correctly observes inputs where the user specifies buses with both fixed and non-fixed edges at the same time. -
The
EdgeRouterclass no longer throws an exception when points specified with theEdgeLayoutDescriptor.intermediateRoutingPointsproperty are too close together. -
The
EdgeRouterclass no longer yields edge labels that overlap with unrelated group nodes when using the integrated label placement feature. -
Resolved a bug in the
EdgeRouterclass 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
EdgeRouterclass no longer produces an exception for some rare cases with fixed grouped edges and octilinear paths. -
The
OrganicLayoutclass no longer throws an exception when having aPartitionGridand at the same time the scope set toSUBSETorMAINLY_SUBSETwhere all nodes of the graph are marked as affected (could have used scopeALLinstead). -
The
EdgeRouterclass now properly considers ports provided by aPortCandidateSetwhen 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
EdgeRouterclass does no longer use the same fixedPortCandidateout of a specifiedPortCandidateSetif another non-saturated candidate can be chosen. Thus, overlapping edge segments are avoided. -
The
OrthogonalSegmentDistributionStageno longer produces degenerated (very large or small) coordinates for edges that contain zero-length segments, that is, duplicate edge path points. -
The
ChannelEdgeRouterclass no longer yields degenerated routing results (very large or small coordinates) when using theOrthogonalPatternEdgeRouteras path finder strategy and setting its minimum distance to zero. TheOrthogonalPatternEdgeRouterclass now avoids duplicate points when theminimumDistanceproperty is set to zero. -
The
AspectRatioTreeLayoutclass no longer crashes, causing a stack overflow, when applied to a large chain graph. -
The
RecursiveGroupLayoutclass now correctly moves child nodes along with their group also in case theRecursiveGroupLayout.coreLayoutisnull. Previously, if additionally a group node had a specific layout algorithm associated with it, the content was not correctly moved along. If the core layout was notnull, the issue did not occur. -
The
EdgeRouterclass 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
BalloonLayoutclass no longer crashes due to a stack overflow for inputs containing very long chain graphs. -
Fixed a bug in the
HierarchicLayoutclass that in some cases caused a violation of the minimum first or last segment length. The bug was only triggered when the minimum length values were relatively large. -
The
TreeMapLayoutclass no longer produces results that may have infinite coordinates.
Analysis
-
The
HierarchicalClusteringclass no longer throws an exception when applied to an empty graph. -
The results of the
Chainsclass are now correct for undirected cycles, too. If such cycles are not connected to other parts of the graph, thenodescollection of a resultingPathcould have been in an incorrect order. -
The
ClosenessCentralityclass no longer calculatesNaNas results of thenormalizedNodeCentralityproperty if the graph consists of one single node. Instead, the value of thenormalizedNodeCentralityproperty is now positive infinity. -
The
ClosenessCentrality.runmethod no longer throws an exception for unconnected graphs. Instead, all values of thenodeCentralityandnormalizedNodeCentralityproperties will be0.0as the documentation states. -
The
EdgeBetweennessClustering.runmethod no longer throws an exception with its default setting for themaximumClusterCountproperty.
Incompatible Changes
See the Migration Guide for more details and advice on migrating.
Incompatible API Changes
-
The
GraphBuilder,TreeBuilder, andAdjacentNodesGraphBuilderclasses have been replaced in the library with more powerful but incompatible builder classes. Drop-in replacement classes that resemble the API of the previous builders, namedSimpleGraphBuilder,SimpleTreeBuilder, andSimpleAdjacentNodesGraphBuilder, are available as demo code in thedemos-js/utilsdirectory. See the migration guide for details. -
The
KMeansClusteringDistanceMetricenum was removed in favor of theDistanceMetricenum with the same members. -
The
ToolTipclass has now a constructor without parameters to make custom implementations easier. -
To make overriding easier, the overloaded method
IPathGeometry.getTangentthat has a segment index and a ratio as parameter was renamed togetTangentForSegment. The corresponding methods ofEdgeStyleBaseandGeneralPathwere renamed as well. -
To make overriding easier, the overloaded methods
GraphModelManager.getCanvasObjectGroupnow have distinguishable names, namelygetNodeCanvasObjectGroup,getEdgeCanvasObjectGroup, etc. -
To support right-to-left text direction, a new optional
rightToLeftparameter with default valuefalsewas added to the methodsDefaultLabelStyleRenderer.addTextElementsandTextRenderSupport.addText. -
The
DefaultLabelStyleRenderer.addTextElementsmethod now consumes anSVGElementas first parameter. For the default left-to-right text direction, this is anSVGTextElementlike before. For the newly supported right-to-left text direction, this is anSVGGElement. -
The
NodeReshapeSnapResultProvider.getSnapLinesmethod now takesCollectSnapResultsEventArgsas additional parameter. -
Several methods related to snapping now take a
Pointinstead of anumberasdeltaparameter. In detail, these areSnapResults.createResizeSnapResult,NodeReshapeSnapResultProvider.addSnaplineSnapResult,NodeReshapeSnapResultProvider.addGridLineSnapResult, andNodeReshapeSnapResultProvider.addSameSizeSnapResult. -
The
HierarchicalClusteringResult.dendrogramRootproperty can now returnnullif the result has been obtained from an empty graph. -
The optional
IPortLocationModelParameterandIPortStyleparameters of theIGraph.addPortmethod can now benull. -
The
ModelManager.unInstallmethod has been renamed to the canonical nameuninstall. -
The singleton returned by the static
DefaultEdgePathCropper.INSTANCEproperty has been moved to theIEdgePathCropper.INSTANCEproperty. This singleton doesn't implementDefaultEdgePathCropperand similar singletons are defined on their corresponding interface, too. -
The method
CanvasComponent.createInputModeContextis protected again, after having been made public accidentally previously. -
The
GraphEditorInputMode.requeryHandlesmethod is now public. -
The static methods
createDelegateanddynamicInvokeofdelegatehave been removed. They were never intended to be part of the public API and didn't work as intended in all cases. -
The methods
getPreferredSizeandgetPreferredSizeCoreof (String)TemplateNodeStyle, (String)TemplatePortStyle, and the corresponding renderer implementations have been removed since they were never used by the library and returned no meaningful value. -
The methods
createNodeMapperandcreateEdgeMapperofYGraphAdapterare no longer interchanged. Previously,createNodeMappercreated anIMapperfor keys of typeIEdgeand vice versa. -
Some methods of the
YListclass have been replaced to be consistent with the new methods ofIListand the corresponding methods of JavaScript arrays. Note thatYListis a special-purpose list implementation that is typically only used when implementing a layout customization. In detail,pophas been renamed toshift,popLasthas been renamed topop, andpushhas been changed to be in line withIList.push: it now returns the length of the list instead of aListCell.
Changes in Default Behavior
-
The
GraphOverviewComponentis now rendered with HTML Canvas instead of SVG by default. This results in better performance and was always the intended behavior. You can switch to SVG rendering with theGraphOverviewComponent.renderModeproperty. -
The
NavigationInputMode.adjustContentRectmethod doesn't fit the graph bounds in the viewport anymore. -
The
NavigationInputModeclass doesn't fit the content after expand and collapse operations anymore. This behavior can be restored by setting theautoGroupNodeAlignmentPolicyproperty to a value other thanNONEand thefitContentAfterGroupActionsproperty totrue. -
The
NavigationInputMode.fitContentAfterGroupActionsproperty now isfalseby default. -
The
ViewportLimiterno longer jumps to the limited viewports if the current viewport is outside the limited area. This behavior can be restored by setting theViewportLimiter.limitingPolicyproperty toLimitingPolicy.STRICT. -
The default value of the
MoveViewportInputMode.pinchZoomThresholdproperty has been changed from100to50to prevent pinch gestures from stopping periodically. -
All string template styles now strip executable code from the templates to prevent attacks via
GraphML. To re-enable code injection set the new static property
trustedon the classesStringTemplateNodeStyle,StringTemplateStripeStyle,StringTemplateLabelStyle, orStringTemplatePortStyletotrue. -
The
GraphCentralityandClosenessCentralityanalysis algorithms now calculate the centrality individually per component instead of returning a centrality value of0.0for nodes in graphs that are not connected. -
HierarchicLayoutData.edgeDirectednessproperty: If itsmapperproperty is directly accessed (and not explicitly set), its default for unset values is now1.0instead of0.0. This means that such edges are now treated as directed instead of undirected. -
For the
rootPlacements,subtreeRoutingPolicies, andsubtreeAspectRatioproperties of theAspectRatioTreeLayoutDataclass, the type of the mapped values has been made nullable. Fornullor unset values, the settings on theAspectRatioTreeLayoutwill now be taken. This is the documented behavior, though. -
The value of the read-only property
EdgeRouter.partitionis nownullafter applying the routing algorithm. It is only intended to be used during the execution. Previously, it was cached, even though the documentation stated otherwise.
Changes When using a Projection
- 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, the
CanvasComponent.contentRectproperty no longer has an effect on scrollbars or theGraphComponent.fitGraphBoundsmethod. -
SvgExport.viewWidthandSvgExport.vViewHeightare no longer used for the exported image dimensions when using a projection. If you need to know the size of the resulting image, this can be obtained from the image after export. - Visuals that are rendered in view coordinates relative to the viewport may appear in a different location when exporting an image.
-
CanvasComponentignores itsViewportLimiterwhen projections are used.
Deprecations
-
The
LabelStyleBase.createLayoutTransformmethod has a new overload with the render context as the first parameter to take non-identity projections of the correspondingCanvasComponentinto consideration. Without this context, this method cannot respect a projection and, consequently, the overload with the previous signature is now deprecated. -
The properties
EdgeRouter.polylineRouting,EdgeRouter.preferredPolylineSegmentLengthandEdgeRouter.maximumPolylineSegmentRatioare now deprecated. To enable polyline routing, specifyEdgeRoutingStyle.octilinearas routing style viaEdgeLayoutDescriptor.routingStyle. The other two properties are also replaced by respective properties on theEdgeLayoutDescriptorclass.
Demo Changes
-
Our simple
RequireJSdemo implementation is no longer part of the package. The demos now use module loading instead, and we always recommended to use the officialRequireJSimplementation.
yFiles for HTML 2.2.0.3
This is the third bugfix release for yFiles for HTML 2.2. In addition to the usual error corrections , there are small improvements for the library and the demos.
There are no incompatible API changes in this release.
Bugfixes
-
Corrected
OverviewComponent's repainting behavior when the device pixel ratio is not 1.0. -
The
FilteredGraphWrapperclass no longer throws an error when the parent of a node which is not visible in the filtered graph has been changed in the wrapped graph. -
The
FoldingManager.getFoldingEdgeStatemethod now throws an error with a meaningful message instead of a cryptic error if both end nodes of the given edge are expanded.Invoking the
FoldingManager.hasFoldingEdgeStatemethod now returnsfalseinstead of throwing a cryptic error if both end nodes of the given edge are expanded. -
The value of the
ILabelCandidateDescriptor.profitproperty now is considered properly by the labeling algorithms. -
The
DefaultLabelStyleRenderer.updateVisualmethod no longer ignores overridden style property accessors when deciding whether to update its visual or to create a new one. -
The documentation of the return values of the
Enum.getValueNamesandEnum.getValuesmethods are now more exact. ThegetValueNamesmethod returns an array of strings and theEnum.getValuesmethod returns an array of integers. -
Fixed a bug in the
TableLayoutConfiguratorclass which in rare cases could cause exceptions in additional layout stages. -
The
EdgeRouterclass 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
BalloonLayoutclass now longer crashes due to a stack overflow for inputs containing very long chain graphs. -
The
HierarchicLayoutclass no longer throws an error that was previously triggered for some inputs with bus structures and undirected edges. -
The
BorderLineandSimpleNodePlacerclasses can now be instantiated. -
The constants
LabelLayoutKeys.EDGE_LABEL_LAYOUT_DP_KEYandLabelLayoutKeys.NODE_LABEL_LAYOUT_DP_KEYnow specify correctly that their generic type parameter isLabelLayoutData[]and not justLabelLayoutData.
Improvements
-
If the required yFiles style sheet
yfiles.csshas a different version than the JavaScript files of the library, the console of the browser's developer tools now shows a corresponding warning. - Safari on iOS fires bogus mouse events when both fingers of a pinch gesture are lifted simultaneously. Since these events could result in an unresponsive graph component, we now include a workaround for this problem.
-
In the UMD variant of the library, if an HTML element with
id="yfiles"existed in the DOM, that element was used in rare cases instead of theyfilestop-level namespace object, resulting in a cryptic error. There is now a proper check for this problem, and an instructive error message. - The package now contains a tool that converts the es-modules variant of the library to the CommonJS format for use in Node.js applications.
Noteworthy Demo Improvement
- BPMN Demo: The node styles have now a property for the fill color and there are various other small improvements.
yFiles for HTML 2.2.0.2
This is the second bugfix release for yFiles for HTML 2.2. Besides the usual error corrections for the library, there are small improvements like meaningful error messages for some common programming errors. Moreover, we created several new demos and improved existing demos, added new sections to the Developer's Guide, and improved the documentation viewer.
There are no incompatible API changes in this release, but we document two incompatible changes from previous releases that were un-documented so far.
The GWT overlay was made available for yFiles for HTML 2.2 some weeks ago and will be updated for
this and all future bugfix releases of yFiles for HTML 2.2.
The yFiles for HTML Optimizer was
updated, too. We added the new shouldOptimize setting and fixed a problem that resulted in broken
overloads.
Bugfixes
General
- The TypeScript typings no longer prevent the bitwise combination of certain enums in TypeScript.
-
Removed the false requirement for implementing
getTangentin the typings forPolylineEdgeStyleRendererwhen using TypeScript.
Graph and Collections
-
The
FilteredGraphWrapperclass now correctly handles port labels of filtered items. -
The
EdgePathLabelModelclass no longer returns an invalid geometry for parameters with a ratio < 0 and zero-length edge segments. -
Labels at folder nodes and their adjacent edges are no longer lost during GraphML
deserialization if the
DefaultFolderNodeConverter.copyFirstLabelproperty is enabled. -
Fixed unexpected behavior of the
GeneralPath.flattenmethod if a curve follows after a close operation. -
The
GeneralPath.prependmethod no longer loses a part of the combined path in certain circumstances. -
Mapper.removeValue's parameter is now correctly marked as nullable.
View
-
The
SvgExport.exportSvgStringmethod no longer inserts duplicatexlink:hrefattributes in Safari on macOS. -
The
SvgExportclass now takes even more care to handlexlink:hrefattributes in all browsers correctly. This was broken because of recent changes in Google Chrome. -
When exporting to SVG, inlined SVG images without
viewBoxattribute now get a reasonable default value to avoid rendering issues. This behavior can be customized with the new protected methodSvgExport.fixViewBoxAttribute. -
Text measurement for text wrapping settings unequal to
TextWrapping.NONEis now much faster since we omit a lot of unneeded iterations. -
The
TextRenderSupport's methods now correctly respect the font parameter when usingSVGas text measuring policy. - Moving WebGL handles out of the viewport no longer breaks the WebGL visualization nor the handles.
- Fixed a memory leak when using handles rendered with WebGL.
- Removed some performance bottlenecks of the WebGL styles.
-
Whether the current browser supports
SizeChangedDetectionMode.SENSORis now only checked once. This avoids unwanted side-effects in certain browsers like flickering toolbars. - The native browser scrollbar in WebKit-based browsers no longer appears in rare cases.
Interaction
-
The default key binding for the toggle group expansion state command works now. (It's
CTRL+Multiply.) -
Changing the value of the
GraphEditorInputMode.showHandleItemsproperty while handles are displayed no longer results in duplicate handles. -
Fixed an issue where
NavigationInputMode'sautoGroupNodeAlignmentPolicywould sometimes not work when the expanded and collapsed group node sizes differ. -
The
CreateEdgeInputMode.getPortOwnermethod no longer returns edges even if theallowEdgeToEdgeCreationproperty is set tofalse. This could have resulted in the edge'sIPortCandidateProviderbeing queried for candidates erroneously. -
The
PortRelocationHandleProviderclass no longer ignores the values of itsshowPortCandidatesandshowTargetHighlightproperties. -
The
HandleInputModeclass now clears itsaffectedItemsproperty after thecanceledevent has been raised. Previously, it was cleared before. -
The promise returned by the
GraphEditorInputMode.addLabelmethod now fulfills at the correct time. Previously, immediate subsequent calls to this method failed despite waiting for the promise to resolve.
Layout
-
The
HierarchicLayoutclass now produces better results for input graphs with grouped edges and aPartitionGrid. Previously, such inputs may have produced edge routes with superfluous bends. -
The
HierarchicLayoutclass now correctly considers the propertiesmaximumNodesAfterBusandmaximumNodesBeforeBusof theBusDescriptorfor 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
HierarchicLayoutclass no longer throws an exception if the component arrangement policy is set toComponentArrangementPolicy.COMPACTand bus routing is enabled. -
The
PortPlacementStageclass no longer destroys the grouping information for the core layout algorithm. -
The
OrganicLayoutclass 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 an exception. -
The
OrganicLayoutclass now correctly removes node overlaps if itsscopeis set toScope.MAINLY_SUBSETand itsnodeOverlapsAllowedproperty is disabled. Previously, the layout sometimes produced superfluous overlaps for such cases. -
The
TreeMapLayoutclass no longer produces results that may have infinite coordinates. -
The
EdgeRouterclass no longer produces bad, non-orthogonal edge segments in cases where a selected edge is grouped together with a un-selected edge and where both edges have strongPortConstraintsat their common source/target node. -
The
EdgeRouterclass now correctly considers strong port constraints of edges that belong to a bus structure. -
The
EdgeRouterclass no longer throws an exception if all fixed edges of a bus are non-orthogonal or non-octilinear. -
The
PartialLayoutclass no longer throws an exception if nothing from the organic layout module is imported. -
The
PartialLayoutclass no longer throws an exception for some input graphs with group nodes. -
The
GenericLabelingclass no longer throws an exception for some input graphs containing labeled edges with zero length. -
The
SingleItemclass now correctly resets itsdelegateandsourceproperties when setting another property.
Incompatible Changes in Previous Releases
-
The
Class.injectInferfacesmethod was removed. It was a leftover from before version 2.0 and never worked since 2.0. - The TypeScript typings don't contain definitions that allow quick interface implementations anymore. This change actually happened with version 2.2 but was undocumented until now. Note that this affects only the typings, quick interface implementations are still supported by the library.
Improvements
-
yFiles for HTML now uses the following proper policy for updating the version of the yFiles
npm module. The first two digits of the yFiles version are combined into the first digit of the npm module
version and the other two digits are kept. For example, this release
2.2.0.2has the npm module version22.0.2. This complies with Semantic Versioning. -
The documentation of the
YGraphAdapter.createNodeMapperandcreateEdgeMappermethods now warns that their method names are interchanged. To maintain compatibility, we will fix this not before the next major release. -
The documentation of the
EdgePathLabelModel,EdgeSegmentLabelModel, andFreeLabelModelclasses now contains the previously missing methodsfindBestParameterandgetParameters. -
If the required style sheet
yfiles.cssis not loaded, a warning is now logged to the console of the browser's developer tools. -
The
SvgExportclass now throws a descriptive exception if exporting fails because of a very large (WebGL) canvas. -
The
GraphBuilderclass now throws a descriptive exception if creating a graph item fails because the graph belongs to a folding view. -
In the TypeScript typings, the
CONVERTERstore of all template styles is now typedanyfor improved usability. -
The
yfilesmodule now exports theresourcesobject which provides defaults for command names and shortcut keys. In addition, the typings now properly define this object and all of its members.
New Demos
- Automated Testing Demos
- The new WebdriverIO Demo and the new Jest Puppeteer Demo show integration tests for a yFiles for HTML application in multiple browsers using WebdriverIO and in Chrome Headless using Jest and Puppeteer, respectively.
- React and React TypeScript Demos
-
A remodeled React Demo replaces the previous one. The new demo is based on
create-react-appand is truly reactive: the diagram automatically reacts to every change of the underlying data. In addition, there is new similar demo for React and TypeScript. - Vue-CLI demo
- This demo shows how to integrate yFiles as a npm dependency in a Vue-CLI setup.
- EdgeRouter Grouping Demo
- This demo shows the edge grouping and port grouping features of the edge routing.
- Hierarchic Bus Structures Demo
- This demo shows how bus structures in the hierarchic layout can result in much more compact arrangements.
- Custom Edge Creation Demo
- This demo shows how to provide directional ports and demonstrates interactive edge routing and several customizations for the edge creation gesture.
- Zoom-invariant Label Style Demo
- This demo shows a label style that is independent of the zoom level.
- GraphQL demo
- This demo shows how to load data from a GraphQL endpoint and create a diagram for it.
- Electron demo
- This demo shows how to integrate yFiles for HTML in a desktop application with Electron.
- Dojo 2 Demo
- This demo shows how to integrate yFiles in a Dojo 2 application that was setup with the Dojo 2 CLI.
- Graph Decorator Demo
- The previous "Custom Ports" step of the Getting Started Tutorial was remodeled into this new demo that focuses on its actual purpose, namely, to show how to use the graph decoration pattern.
Noteworthy Demo Improvements
- On macOS, clicking context menu entries had no effect because of a timing problem. The demo context menu now uses a larger delay.
- The demos that use yFiles as npm module now create a npm package of the library instead of directly referencing the local files since the latter caused issues with webpack.
-
Corrected the GraphML serialization of the Vue.js template node style
VuejsNodeStyle. In addition, this style has a newlineSpacingproperty to control the line height of wrapped text. - The PDF Export Demo uses updated versions of the svg2pdf and jsPDF libraries that fix an issue with custom fonts on Internet Explorer 11.
-
The Image Export Demo and PDF Export Demo now use Headless Chrome/Puppeteer instead of
PhantomJSfor server-side image and PDF creation, respectively. - In the Label Handle Provider Demo, the resize handles now act consistently on rotated and non-rotated labels.
- The Move Unselected Nodes Demo has a new option to start edge creation at distinct port candidates. This allows the gestures for moving of unselected nodes and for edge creation without to co-exist without using a modifier key.
- The Drag and Drop Demo now shows drag and drop of edges, too.
- The Grid Snapping Demo has a new user interface to make exploring the various configuration options more intuitive.
- In the Large Graphs Demo, the "Move Only Mode" has improved performance.
- The Tree Layout Demo now has sample graphs for different use cases and provides reusable configurations for each one.
- The Neo4j Demo now supports creating a graph from arbitrary cypher queries.
-
The
FileSaveSupportclass now writes images as binary content.
Documentation Improvements
- Most of the stand-alone documentation pages that were previously included in the yFiles package are now part of the documentation viewer. Namely, this includes the pages about migration, known issues, requirements, and the various tools. The main benefit is that this information can now be found with the search of the documentation viewer.
- The search of the documentation browser now allows you to find related demos and to even search in the source code of the demos.
-
Added new sections to the Developer's Guide about deploying yFiles with specific
toolkits (e.g. webpack, Angular, etc.), the Vue.js template node style
VuejsNodeStyle, and best practices for developing with the yFiles npm module. - The migration notes are now part of the documentation viewer to improve discoverability. The corresponding tools are now covered in more detail and there is a new separate section for the migration from the UMD to the ES modules variant of yFiles for HTML.
yFiles for HTML 2.2.0.1
This is the first bugfix release for yFiles for HTML 2.2. It corrects several problems in the TypeScript definition
files and two other minor errors. There are no incompatible changes.
Note that the bugfixes of yFiles for HTML 2.1.0.7 are part of this release, too.
Bugfixes
-
The TypeScript definition files now pass the compiler's
strictchecks. -
The UMD variants of the TypeScript definition files no longer contain erroneous usages of the
thistype. -
The constructor of the
SolidColorFillclass now converts floating-point values to integers. This prevents incorrect values in exported GraphML files. - There was a regression in mouse click fuzziness detection. As a result, mouse double clicks were sometimes not properly detected in Chrome on Windows and other browsers that fire superfluous mouse move events.
yFiles for HTML 2.2
Major New Features
- npm package of the library
-
The yFiles library now comes as a local npm package. This makes it much easier to include yFiles in projects
with third-party tools and frameworks like webpack and Angular. In addition to the library, the npm module
installs the typings that come with yFiles. Thus, code completion and documentation lookup work in JavaScript
IDEs like JetBrains WebStorm and Visual Studio Code without further configuration.
Since the format for the documentation is slightly different for WebStorm and VS Code, a tool is included that tailors the typings for your preferred IDE.
- Improved coding assistance and 1000 new code snippets
-
The typings that provide code completion for JavaScript IDEs like JetBrains WebStorm and Visual Studio Code have been reworked to be more precise and extensive. For example, they now contain the static members of interfaces, support type conversion, and specify whether properties, parameters, and return values can be
nullor not and whether they must be anobjector can be of any type. Of course, TypeScript projects benefit from these improvements, too.In addition, the documentation viewer has more than 1000 new code snippets and shows the new information, too.
- CSS styling for handles etc.
-
All visualizations of
handles and indicators for interactive editing have now CSS classes to allow styling with CSS rules. This
includes the selection, focus, and highlight templates, resize and move handles, snap lines and grids, the
visualization of port candidates, marquee and lasso selection, and the viewport rectangle in the overview. The
documentation and the Developer's Guide contain extensive lists of all available classes.
In addition, the edit label input box and the tooltips now have dedicated CSS classes during entering and leaving of the DOM. Also, a subtle fade animation was added to these elements that is enabled by default.
The new CSS Styling Demo shows this new styling feature.
- WebGL and HTML Canvas rendering
-
WebGL and HTML Canvas rendering are now supported for the visualization of handles and grids, and for the overview component. These rendering techniques provide significant performance improvements especially for large graphs. The rendering technique is specified by the new property
renderModeofHandleInputMode,GridVisualCreator, andGraphOverviewComponent, respectively.Note that WebGL and HTML Canvas rendering for the visualization of graph items like nodes and edges is already supported.
- Bus-like placement in hierarchic layouts
-
The
HierarchicLayoutclass 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.busesproperty, and the newBusDescriptorclass provides more individual settings for the buses. - Label placement, bus routing, and port grouping for EdgeRouter
-
The
EdgeRouterclass now features integrated edge label placement. Labels are automatically placed when the new propertyintegratedEdgeLabelingis enabled. The placement considers the optionalPreferredPlacementDescriptorof 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
PolylineEdgeRouterDataclass. - Analysis wrapper
-
The powerful analysis algorithms got a new API that is based on the
IGraphinterface 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
GraphStructureAnalyzerclass that provides methods to check structural properties of a given graph.The new Analysis Algorithms Step of the Getting Started Tutorial shows how to run an algorithm. The existing Graph Analysis Demo allows you to interactively explore all the algorithms.
- Demos use ES module imports
-
Using ES modules makes it easier to re-use demo code in your own project since many third-party frameworks and tools work with ES modules, too, most notably webpack and Angular. In addition, the source code is now more concise due to the absence of fully-qualified names and can be better analyzed by IDEs for code completion and documentation lookup.
In addition, we provide several tools that help existing customers in either migrating to ES modules or converting new demo code with ES modules syntax back to the previous require.js and UMD usages.
- New and improved demos
-
This release contains the following new demos:
- Metaball Groups Demo: Shows how to render metaball-like background visualizations where nodes can be associated to zero or more groups.
-
Web Worker Demo: There are now two
versions of this demo, one with
UMDloading and one with import statements. -
d3 Node Style Demo: Presents a node
style that visualizes dynamic data with
d3.js. - Family Tree Demo: Show the automatic layout for genealogical graphs.
-
Simple Partition Grid Demo:
Shows how to manually create a
PartitionGridfor the automatic layout. - Overview Styles Demo: Shows several different rendering techniques and styles for the overview.
The Application Features Tutorial has the following new demos which concentrate on a single feature and make it particularly easy to re-use their code:
- Background Image Demo: Shows two different ways of adding an image to the background of the graph component.
- Graph Search Demo: Shows how to search in the graph and highlight the result.
- Smart Click Navigation Demo: Shows how to scroll and zoom the viewport to the area of interest by single edge-clicks.
- Rectangular Indicator Demo: Shows how to add an interactive indicator to the graph component.
- Level of Detail Style Demo: Shows a node style that hides details when zooming out.
- Filtering Demo: Shows how to configure graph filtering.
The new Layout Data Step of the Getting Started Tutorial shows how to configure individual settings for each node for the automatic layout.
In addition, we refactored several of the demos to make it easier to re-use their yFiles-specific code. These demos include, amongst others, Organization Chart Demo, Hierarchic Grouping Demo, and Sankey Demo.
New Features
General
- The new yFiles for HTML Optimizer replaces the previous deployment tool. It is available as npm package. The optimizer can be seamlessly integrated into JavaScript deployment setups as a webpack plugin or using its JavaScript API.
-
Many types now support parameter objects in their constructors and we added several new type
conversions for frequently used types like the ones used in
LayoutData. This allows you to write more concise code.
View
-
The
DefaultLabelStyleclass 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
CreateEdgeInputModeclass can now create edges in reversed direction, i.e., starting from the target port.- The new
EdgeDirectionPolicysupports starting creation at the source, at the target, in the last direction, or depending on the port candidate. - A configurable
ToggleDirectionRecognizerallows changing the edge direction during creation.
- The new
-
The new property
MoveLabelInputMode.allowUnselectedenables moving labels without having to select them first. -
The
MoveInputModeand theCreateEdgeInputModeclasses now usePromisesindoStartDraganddoStartEdgeCreation. ThesePromisesreturn either the affected/new items ornullif the gesture was canceled. -
The
GraphModelManagerclass has the new methodsraise,lower,toFrontandtoBackthat allow changing the z-order ofIModelItems. All new z-order-related methods can also be triggered by the new commandsRAISE,LOWER,TO_FRONTandTO_BACK.In addition, the
GraphEditorInputModeclass provides the new methodsRaiseSelection,LowerSelection,SelectionToFrontandSelectionToBackthat change the z-order of all selectedIModelItems. -
The new
PortStyleDecorationInstallerclass allows the use of anIPortStyleto render the selection, highlight, or focus indicator of ports.
Layout
-
The
HierarchicLayoutclass 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
HierarchicLayoutclass is now able to consider individual crossing costs for edges and for crossing a group node border. These can be defined with theHierarchicLayoutData.edgeCrossingCostsand theHierarchicLayoutData.groupBorderCrossingCostsproperties.In addition, the new callback method
DefaultLayerSequencer.getCrossingCostallows 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.getOriginalEdgemethod was added. -
The
LeftRightNodePlacerclass 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 propertyBranchCountallows to configure the number of branches. -
The tree node placer
GridNodePlaceroffers 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,TRAILINGandCENTER. - Child sub-trees can be assigned to rows automatically using the new property
GridNodePlacer.automaticRowAssignment. - The new alignment policy
GridNodePlacer.BUS_ALIGNEDaligns 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
OrganicLayoutclass is now able to consider user-specified inertia and stress values for nodes. -
The
OrthogonalLayoutclass is now able to consider custom crossing and bend costs for edges. They can be specified using the new propertiesOrthogonalLayoutData.edgeCrossingCostsandOrthogonalLayoutData.edgeBendCostsrespectively. -
The new
InteractiveOrganicLayout.compactnessFactorproperty specifies the compactness of the result. If the graph contains several components, this feature can prevent that the components drift apart. -
The new
GivenCoordinatesStageclass changes node locations and edge paths to user-specified values before invoking the core layout algorithm. To specify locations and paths, use the newGivenCoordinatesStageDataclass. -
The new
GenericPartitionGridSupportStageclass offers generic support for partition grid structures. -
The
OrganicLayoutclass is now able to produce 3D layout results. -
The new
ChannelRoutingToolclass brings back the features of theChannelRouterclass that was removed in version 2.0.
Improvements
General
-
We identified and changed the (valid) code in the library that was previously broken by certain build
optimizers, e.g., the production build of Angular CLI (
ng build --prod). Thus, you no longer need to disable it or work around this issue. -
Incorrect usage of
$classbefore callinglang.util.fixType()on ES6 classes will now throw aTypeInfoErrorwith typeinfo enabled. -
The new function
yFiles.help(object)provides information about the given instance if it is a yFiles class, namely the class name, the implemented interfaces, and the base class. -
The constructors of most types now support parameter objects, e.g. the
GraphBuilderclass, label models, layout algorithms, and layout helper classes. - Improved performance with the webcomponents polyfill by working around its performance bottlenecks.
Graph and Collections
-
The properties
rowsandcolumnsof classPartitionGridare now of typeIEnumerable<RowDescriptor>andIEnumerable<ColumnDescriptor>instead of an un-typedYList. -
Point,Size,Rect,Insets, andIEnumerablenow have a staticfromfunction that converts objects that are similar in shape to the corresponding type. -
Each of the methods
concat,filter,map,selectMany,takeWhile, andreversedofIEnumerablenow return a dynamic enumerable, i.e., if the original enumerable changes the returned enumerable changes, too. Previously, the enumerables returned bymap,takeWhile, andreversedwere a copy of the state of the original enumerable at the time of invocation. -
In addition, the
IEnumerableinterface now provides lazily evaluatedprepend,append,flatMap,from,ofRange,ofRepeat,take,reduceRight,skip,skipWhile,groupBy,orderBy,orderByDescending, anddistinctmethods, similar to what other platforms offer. -
The
Listclass now supports the methodspush,pop,slice,splice,shift,unshift, andfillas known from plain JavaScript Arrays.
View
-
The type conversion for
Colornow supports theCSS4syntax. -
Adding and removing visualizations from the
GraphComponentis now much faster in Chrome when there are more than 12000 elements. -
If the content of a tooltip changes while it's visible, the new method
ToolTip.updateLocationcan be called to trigger an update of the location to reflect the changed size. -
The default CSS rule for the tooltip now sets a large value for the z-index. To override it,
set a different value to the
yfiles-tooltipclass. -
The
TextRenderSupport.measureTextmethod now returns the result asSize. Previously, it returned aRect. -
The constructors of
CanvasComponent,GraphComponent, andGraphOverviewComponentnow throw an error if the specified<div>element is already in use by another component. -
The
CanvasComponentclass no longer prevents external drag and drop handling by callingstopPropagationandpreventDefaulton alldropevents. Instead, such an event is now handled by a corresponding (drop) input mode if such an input mode is enabled and responsible for the event's data type. -
The new property
SvgDefsManager.cleanUpDurationsets a soft limit for the runtime of theSvgDefsManager.cleanUpDefsmethod. -
A component with zero size now updates its internal size automatically if its container
<div>element gets a non-zero size. This can happen for example if the<div>element is not part of the DOM during initialization. -
GraphOverviewComponentno longer draws nodes and edges that are hidden viaVoidNodeStyleandVoidEdgeStyle. -
NodeStylePortStyleAdapterandPortControlPortStylenow have anoffsetproperty that allows to shift the port visualization so that it no longer is centered over the port. -
The
GraphModelManagerclass has new factory methods for creating theItemModelManagerof each item group. -
DefaultEdgePathCropper's methodscropEdgePathandcropEdgePathAtArrowhave been made virtual. -
The
GraphModelManager.getModelItemmethod now always returns theIModelItemfor anICanvasObjectretrieved for it viagetMainCanvasObject. Previously this only worked in all cases for theICanvasObjectretrieved viagetCanvasObject. -
Added the
GraphClipboard.getIdmethod to facilitate retrieving the original item from which an item to be pasted has been copied from. -
The new property
GraphClipboard.clipboardContextprovides access to the currentIGraphClipboardContextduring a clipboard operation. -
The
GraphMLIOHandlerclass now supports reading and writing arbitrary objects at graph level. -
The properties
RectangleIndicatorInstaller.templateandOrientedRectangleIndicatorInstaller.templatenow return always the value that has been set by client code and are not modified by internal code anymore. -
The type conversion of
DashStylenow supports the constant names ofDashStyle, like real enums do. -
The type conversion of
Strokecan now createdashedanddottedlines similar to CSS border. -
The
CanvasComponent.exportContentmethod now always returns an<svg>element with proper size declaration that can be embedded into a document.
Input
- In Microsoft browsers, the selection gesture is now much faster if selecting many items at once.
-
New overloads for the
KeyboardInputMode.addKeyBindingandaddRecognizerBindingmethods make it easy to register key bindings and key recognizer listeners. -
The new property
CreateEdgeInputMode.showTargetHighlightspecifies whether to enable or disable highlighting of potential targets for edge creation. Also, the methodupdateTargetHighlighthas been added to allow for further customization of the highlight. -
The new properties
PortRelocationHandler.showTargetHighlightandPortRelocationHandlerProvider.showTargetHighlightspecify whether to enable or disable highlighting of potential targets for edge creation. Also, the methodupdateHighlighthas been added to thePortRelocationHandlerclass to allow for further customization of the highlight. -
The new properties
PortRelocationHandler.showPortCandidatesandPortRelocationHandlerProvider.showPortCandidatesspecify whether to enable or disable showing port candidates during edge relocation. -
The
GraphEditorInputMode.DeletedItemevent 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.onDeletedItemis now virtual. - Mouse move and drag events now correctly report the changed modifier keys.
- Snaplines are now infinitely long by default.
-
The classes
NodeDropInputMode,LabelDropInputMode,PortDropInputMode, andStripeDropInputModenow also support the simple type name as expected type. This type is set by user code on drag start. -
The properties
GraphInputMode.clickHitTestOrderandGraphInputMode.doubleClickHitTestOrderwhich are of typeGraphItemTypes[]now support type conversion and can be specified as arrays of strings. Each of the string values is converted toGraphItemTypeswith the existing type conversion of that enum. - The drag and drop behavior when multiple input devices are used simultaneously has improved.
Graph-Layout-Bridge
-
Combining multiple
LayoutDataclasses is now easier:- The base class
LayoutDataoffers a new methodcombineWiththat combines the current instance with anotherLayoutDatainstance. - The class
CompositeLayoutDatahas an additional constructor that takes a variable number ofLayoutDatainstances.
- The base class
-
The classes
ItemMapping,ContextItemMapping,IncrementalHintsItemMapping,ItemCollection,DpKeyItemCollectionandSingleItemnow support type conversion which makes it easier to configure layout data. -
The new
PortAdjustmentPolicyproperty ofLayoutExecutorandLayoutGraphAdapterreplaces the previousImprovePortAssignmentboolean property. The new property is of typePortAdjustmentPolicyand offers more options for adjusting the port locations after a layout calculation. -
The viewport animation of the
LayoutExecutorclass considers now the value of theLimitFitContentZoomproperty of the correspondingGraphComponent.
Hierarchic Layout
-
The
HierarchicLayoutclass now also considers critical edge priorities for grouped edges. -
The
HierarchicLayoutclass now also considers sequence constraints for grouped edges. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass no longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges. -
The layering of
HierarchicLayoutwas improved with respect to the resulting edge lengths if the recursive group layering feature is enabled. -
The
HierarchicLayoutclass now produces less overlapping elements for graphs with fixed coordinate hints. -
The
HierarchicLayoutclass now correctly calculates the group node bounds. Previously, the groups' insets were slightly too large (up to one pixel). -
The
HierarchicLayoutclass 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
HierarchicLayoutclass now requires less memory for graphs with sequence constraints.
Edge Routing
-
The
EdgeRouternow supports edge grouping on both endpoints. Previously, an edge could only be part of either a source or a target group. -
The
EdgeRouterclass now generates less edge-edge overlaps and a better distribution of edge segments when theEdgeRouter.maximumDurationis strongly restricted or set to zero, or when the algorithm is stopped via theAbortHandler.stopmethod. -
The
EdgeRouterclass now avoids superfluous bends that were in some cases caused by group nodes with (small) inset values. -
The path search performance of the
EdgeRouterclass has been improved for cases where an edge has a strong, externalPortConstraintor a fixed, externalPortCandidate. -
The
EdgeRouterclass now generates a proper routing from a group node border to a port location inside this group node defined by a strongPortConstraintor 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, andtargetPortCandidatesofChannelEdgeRouterDatafacilitate using these features withChannelEdgeRouter.
Labeling
-
The performance of the
GenericLabelingalgorithm and the quality of the label placements were improved. -
The quality of edge label placement of the
GenericLabelingclass 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.preferParallelRoutesproperty allows for controlling how parallel edges (multi-edges) are routed. -
New options of the
PlaceNodeAtBarycenterStageclass 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
TreeReductionStagenow marks non-tree edges if anIDataAcceptoris 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
RecursiveGroupLayoutclass now allows to define a localPartitionGridstructure for each recursively handled group node. See the new propertyRecursiveGroupLayoutData.groupNodePartitionGridsfor details. -
If the master edge is clipped on the bounds of its source or target, the
ParallelEdgeRouterclass now always clips the associated parallel edges on that bounds, too. -
The
RemoveCollinearBendsStage.scaleproperty 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
PartitionGridDataclass has new propertiesoptimizeRowOrderandoptimizeColumnOrderto indicate whether or not the order of the rows respectively columns should be chosen automatically to minimize edge lengths.In addition, the
rowIndicesandcolumnIndicesproperties of thePartitionGridDataclass can now also be used in combination with thegridproperty. -
The
PortCalculatorclass 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.
Bugfixes
Graph
- 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
UndoEngineclass that resulted in memory leaks if the tokens returned bygetTokenwere not disposed when theUndoEnginegot cleared.
View
- Tooltips can now correctly flow out of the area of the graph component.
-
The
TextRenderSupport.addTextmethod now takes into account existingxattribute values of the text element and places the text relatively to this value. -
The
EdgeStyleDecorationInstallerclass no longer causes an error when used on edges that attach to other edges. -
A template style with an unresolved template now creates a visual with an empty SVG
<g>element instead ofnull. This avoids seemingly unrelated errors later on. - Fixed a memory leak and possible UI freezes that could occur in certain circumstances when using template styles.
-
If the
SvgExport.shouldEncodeImageBase64property is enabled, images that use dataURIsand are not already encoded are now Base64 encoded during export as well. - Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an error.
- In rare cases, saving a graph that uses folding to GraphML threw an error.
- Newline and tab characters in GraphML attribute values were written as-is, but replaced with whitespaces when reading the GraphML back in. These characters are now written as character entity references and correctly restored.
-
The
nullcheck for theGridVisualCreator.strokeproperty works correctly now. -
Setting an
ICanvasObjectGroupto invisible now clears all containing visuals. As a consequence, child visuals are correctly initialized when the group is set to visible again. - A grid with crosses using a stroke with a large thickness is now rendered correctly.
- It is now possible to change only the color of a grid after the grid was initialized.
Input
- The speed of pinch zooming on certain trackpads is no longer way to fast.
- 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 promises returned by the label editing methods in
GraphEditorInputModenow providenullwhen canceled instead of the dummy label. -
The
parentInputModeproperty of the context of theInputModeEventArgsclass now contains the input mode which has raised the event. Previously, some input modes erroneously set this property to the containingGraphEditorInputModeorGraphViewerInputMode. -
The type
IGridConstraintProvidercannot be used in lookup methods since it has a generic type parameter. Therefore, new specific interfaces have been added for each item type (for exampleINodeGridConstraintProvider). -
The
CreateEdgeInputModeclass now considers the value of theCanvasComponent.hitTestRadiusproperty when itsstartOverCandidateOnlyproperty is enabled. -
GraphClipboard's methodsonElementCutandonElementCopiedare no longer called for graph items which are not copied themselves but are owners of copied items. -
When an edge is duplicated using
GraphClipboardand 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
CreateEdgeInputModeclass does not flicker, anymore. -
The classes
MarqueeSelectionInputModeandOverviewInputModenow install new visual templates correctly when they are set through the corresponding template property.
Hierarchic Layout
-
The
HierarchicLayoutclass now correctly considers the group insets for input graphs with nested group nodes. Previously, it sometimes produced too large insets for inner groups. -
The
HierarchicLayoutclass no longer throws an error if it is wrapped by an instance ofRecursiveGroupLayoutand the input graph contains layering constraints between elements of different groups. -
The
HierarchicLayoutclass no longer throws anArgumentErrorfor some rare cases in incremental layout mode. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass 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
HierarchicLayoutclass now produces less superfluous crossings if there are same-layer edges withPortConstraintsorPortCandidates. -
The
HierarchicLayoutclass now correctly handles port labels with zero height or width. Previously, such labels may have caused very large distances between some nodes. -
The
HierarchicLayoutclass sometimes threw anArgumentErrorfor input graphs that contained incremental elements in combination with groups. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass no longer causes non-orthogonal segments when the input contained port labels in conjunction with edge grouping. -
The
HierarchicLayoutclass sometimes threw anArgumentErrorfor input graphs that contained fixed elements in combination with both swimlanes and groups. -
The
HierarchicLayoutclass now correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues. -
The
HierarchicLayoutclass 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.
Tree Layout
-
The
CompactNodePlacerclass no longer throws an error for input graphs with specified memento strategies (seeTreeLayoutData.compactNodePlacerStrategyMementosorCompactNodePlacer.STRATEGY_MEMENTO_DP_KEY). -
The
CompactNodePlacerclass now correctly considers the specified values of theverticalDistanceandhorizontalDistanceproperties. -
The
CompactNodePlacerclass no longer throws an error for some inputs with specified strategy memento information. -
The
SimpleNodePlacerclass no longer produces unnecessarily long horizontal edge segments.
Edge Routing
-
The
EdgeRouterclass 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
EdgeRouterclass that sometimes caused a non-deterministic behavior. -
The
EdgeRouterclass now correctly handles edges with external ports. Previously, such inputs may have caused an error. -
The
EdgeRouterclass now correctly groups edges associated with equal group IDs that have a different object ID. -
A rare error that was triggered by the
EdgeRouterclass during routing when agridis defined on which edges need to be routed is now fixed. -
The
EdgeRouterclass now avoids unnecessary bends in cases that containPortCandidateswith 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
PolylineLayoutStageclass 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
EdgeRouterclass during routing in cases where the input contained grouped edges. -
The
EdgeRouterclass no longer throws an error if theEdgeRouter.polylineRoutingproperty is enabled and the input contains fixed, grouped edges. -
The
EdgeRouterclass now considers the correctNodeHaloassociated 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
EdgeRouterclass now correctly considers intersections between edges and labels of fixed edges if propertyconsiderEdgeLabelsis enabled. -
The
EdgeRouterclass 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
EdgeRouterclass 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
EdgeRouterclass no longer considers allPortCandidateswith multiple directions as fixedPortCandidates. -
Fixed two issues that induced the violation of a
PortCandidatewith fixed offsets (or a strongPortConstraint) by theEdgeRouterclass. 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
EdgeRouterclass for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios. -
The
EdgeRouterclass now correctly handles cases where the maximum duration is exceeded and where previously an error was triggered. -
Fixed a
StackOverflowErrorinEdgeRouter.
Labeling
-
The
GenericLabelingclass now produces better results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor.distanceToEdge) and at the same time multiplesideOfEdgepreferences (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
GenericLabelingclass 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
GenericLabelingclass no longer calculates wrong label profit values for some edge labels. Previously, edges that had aPreferredPlacementDescriptorwere sometimes affected. -
The
GenericLabelingclass now always prefersLabelCandidateswith higher profit values over others with lower profit. Previously, this sometimes happened even though both candidates did not intersect with other elements. -
The
GenericLabelingclass no longer assumes that allLabelCandidatesassociated 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
GenericLabelingthat may have caused anArgumentErrorfor some input graphs that contain edges with zero length segments and labels associated with a free edge label model.
Other Layout Styles
-
The
OrthogonalLayoutclass no longer throws an error when propertyOrthogonalLayout.uniformPortAssignmentis enabled and the input contains parallel edges. -
The
OrthogonalLayoutclass no longer causes an error for some input graphs when propertyfaceMaximizationis enabled. -
The
OrthogonalLayoutclass 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.treeStyleis not set toTreeLayoutStyle.NONE. -
The
OrganicLayoutclass no longer throws an error when usingCycleSubstructureStyle.CIRCULARand arranging a cycle structure where at least one cycle node is also connected to a group node outside the cycle. -
The
OrganicLayoutclass now produces deterministic results for group nodes if its propertydeterministicis enabled. -
When using
RecursiveGroupLayout, the values of the propertiescomputedWidth,computedHeightandcomputedPositionof the classesColumnDescriptorandRowDescriptorare now correctly set after the layout ifEdgeRouteris the correspondinginterEdgeRouter. -
The
ComponentLayoutclass now correctly handles input graphs with user-specified components that contain nodes withnullas their component ID (see propertyComponentLayoutData.componentIds). Previously, such inputs may have caused an error. -
The
SeriesParallelLayoutclass now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an error. -
The
PartialLayoutclass now correctly considers the specifiedPortCandidatesduring orthogonal or octilinear routing of edges. -
The
PartialLayoutclass does no longer reduce the size of fixed group nodes if the optionPartialLayout.resizeFixedGroupsis disabled. -
The
OrganicRemoveOverlapsStageno longer produces infinite loops in some rare cases. -
Fixed a bug in
YGraphAdapterthat could trigger an error when boolean, integer or double values were requested from registeredIMapperbut no value had been set beforehand. -
The
GraphStructureAnalyzer.hasMultipleEdgesmethod now returns the correct result for input graphs with self-loops. -
The
PathAlgorithm.findAllChainsmethod now correctly calculates the chains for input graphs with cycles. -
The
BfsAlgorithm.getLayersmethod now correctly stores the layer indices in the specifiedINodeMap. Previously, the maximum layer index stored in the map exceeded the number of returned layers.
Incompatible Changes
See the Migration Guide document (of your local yFiles for HTML installation) for more details and advice on migrating.
Incompatible API Changes
-
In the ECMAScript module variant of the library, the names of some types have been changed to
make it more clear to which layout style they belong. The new names include a 'Layout' part, for example
HierarchicLayeringStrategyis nowHierarchicLayoutLayeringStrategy.In addition, the existing analysis algorithm classes got a
Algorithmpostfix since the canonical short names are now used by the newIGraph-based analysis classes andYMaphas been renamed toHashMap. See the migration guide for a complete list of these changes. -
The
IEnumerable.selectManymethod has been renamed toIEnumerable.flatMap. -
The
GraphOverviewComponent.svgRenderingproperty has been removed in favor of the newGraphOverviewComponent.renderModeproperty. -
The
IGraph.portLabelsproperty replaces thegetPortLabelsmethod. The similar API members for other item types already are properties. -
The methods
ITable.getDecoratorandITable.getAccumulativeInsetshave been replaced by the corresponding propertiesITable.decoratorandITable.accumulativeInsets. -
The resource keys of the
SnapLineclass have been removed. They are replaced by the newSnapLineVisualizationTypeenum. -
The
TextRenderSupport.measureTextmethod now supports the parametersmaximumSizeandtextWrappingto measure the size of wrapped text. The method parameter order was changed to fit theTextRenderSupport.addTextmethod.In addition, the
TextRenderSupport.measureTextmethod now returns the result asSize. Previously, it returned aRect. -
The
MouseHoverInputMode.toolTipproperty was removed to support separate fade out animations for tooltips. To specify a tooltip overwrite theMouseHoverInputMode.createToolTipmethod instead.In addition, some properties of the
ToolTipclass have been made read-only because changes to these properties had no effect anyway. -
The
improvePortAssignmentboolean property ofLayoutExecutorandLayoutGraphAdapterhas been replaced by theportAdjustmentPolicyproperty. -
SingleItemCollection'sitemproperty has been pulled up toItemCollection. ClassSingleItemCollectionhas been removed, its usages have been replaced byItemCollection. -
The following properties of specific layout data types now have a name with the correct plural or singular
usage.
-
HierarchicLayoutData.alternativeEdgePathhas been renamed toalternativeEdgePaths. -
TreeLayoutData.leftRightPlacersLeftNodeshas been renamed toleftRightNodePlacerLeftNodes. -
TreeLayoutData.delegatingNodePlacersPrimaryNodeshas been renamed todelegatingNodePlacerPrimaryNodes. -
FixNodeLayoutData.fixedNodehas been renamed tofixedNodes.
-
-
The type of the properties
BalloonLayoutData.treeRootandTreeLayoutData.treeRoothas been changed toSingleItem<INode>. -
The property
HierarchicLayoutData.alternativeEdgePathsnow expectsIEnumerable<IPoint>instead ofYPointPathas mapped values. -
The property
HierarchicLayoutData.alternativeGroupBoundsnow expectsIRectangleinstead ofYRectangleas mapped values. -
The properties
rowsandcolumnsof classPartitionGridare now of typeIEnumerable<RowDescriptor>andIEnumerable<ColumnDescriptor>instead of an un-typedYList. -
The properties
sourceGroupsandtargetGroupsofRadialLayoutDatahave been removed since edge grouping is not supported by theRadialLayoutclass. -
The
PenaltySettings.invalidEdgeGroupingPenaltyproperty has been removed. If edge groups are defined, theEdgeRouterclass now always considers them. Therefore, this setting no longer applies. - Implementing yFiles interfaces in TypeScript now requires to specify the intersection type of all implemented interfaces. See the Developer's Guide for an example.
-
The
BfsDirectionenum has been renamed toTraversalDirectionsince it is now used for other graph traversal algorithms, too.
Changes of Default Behavior
-
The
SimplexNodePlacer.barycenterModeproperty is now enabled by default. Thus, theHierarchicLayoutclass with default settings now produces different (usually more symmetric) layouts. -
The
CanvasComponentclass no longer callspreventDefaulton all 'drop' events. Instead, this is now called only for events for which an enabled and responsible (drop) input mode exists. -
The methods
map,takeWhile, andreversedofIEnumerablenow return a dynamic enumerable, i.e., if the original enumerable changes, the returned enumerable changes, too. Use thetoArrayortoListmethod if you want to store the current state of an enumerable. -
GraphClipboard's methodsonElementCutandonElementCopiedare no longer called for graph items which are not copied themselves but are owners of copied items. As a consequence, the methodscutandcopyof theIClipboardHelperimplementations of these elements are no longer called, either. -
The
Promisereturned from theGraphEditorInputMode.editLabelmethod now resolves withnullif the edit was canceled or did not validate successfully. -
The default tooltip of the
ToolTipQueryEventArgsclass is now set tonull. Thus, the tooltip is not displayed when the event is handled without setting the tooltip content. -
The properties
RectangleIndicatorInstaller.templateandOrientedRectangleIndicatorInstaller.templatenow return always the value that has been set by client code and are not modified by internal code anymore. - Newline and tab characters in GraphML attribute values are now written as character entity references instead of writing actual newline or tab characters.
-
The
SvgExport.shouldEncodeImageBase64method is now only called for images that are not already Base64 encoded. -
The
GroupingSupportclass no longer throws anArgumentErrorif there is a node without associated ID. Instead the class uses the node itself as ID. -
The
HierarchicLayoutclass 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
ParallelEdgeRouterclass now always clips the associated parallel edges on that bounds, too. -
The default value of the property
GridNodePlacer.rootAlignmentwas changed toGridNodePlacer.BUS_ALIGNEDfromRotatableNodePlacerBase.RootAlignment.TRAILING.
Minor Incompatible Changes
- The TypeScript .d.ts file doesn't contain typings that allow quick interface implementations anymore. Quick interface implementations still work at runtime though.
-
The
CanvasComponent.exportContentmethod now always returns an<svg>element instead of either an SVG group<g>element for SVG-only rendering and a<div>element with<canvas>and<svg>children otherwise. -
The method
LayoutData.applyis now protected instead of public. -
The
YList.subListmethod was removed since it was not implemented at all and is not used by the library. - The
clonemethods of the geometric typesPoint,Rect,Size, andInsetswas removed since these types are immutable and the methods just returnedthis. -
The classes
GeneralPathandGeneralPathCursorare now sealed. -
The protected
DefaultLabelStyleRenderer.measureTextmethod got an additional parameter for the maximum size. -
The following changes regarding the expert API related to the
EdgeRouterclass were made:- The first parameter of the constructors in class
SegmentInfoBaseis now of typeobjectinstead ofEdge. The provided type should be eitherPathRequestfor affected edges orEdgefor non-affected, fixed ones. Furthermore, the propertySegmentInfoBase.edgehas been removed as the info is not necessarily associated with an edge anymore. - Similarly, the first parameter of the constructor in class
EdgeCellInfois now of typeObjectinstead ofEdge. The provided type should be eitherPathRequestfor affected edges orEdgefor non-affected, fixed ones. - The constructor of class
EdgeInfonow additionally takes a parameter of typeEdge. - The parameter of type
Edgefrom the constructor ofPathas 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.getEdgeInfowas removed.
- The first parameter of the constructors in class
yFiles for HTML 2.1.0.7
This is the 7th bugfix release for yFiles for HTML 2.1. It corrects several errors.
There are no incompatible API changes.
Note that the bugfixes of this release are part of yFiles for HTML 2.2.0.1, too.
Bugfixes
Graph and View
-
Improved code paths in the implementations of the
IGraphinterface that sometimes led to a runtime that was quadratic in the number of nodes when creating large graphs. -
The
EdgeStyleDecorationInstallerclass no longer causes an exception when used on edges that attach to other edges. -
The
EdgeStyleDecorationInstallerclass now properly displays decorations for edges between group nodes and their descendants when displayed in view coordinates. -
A template style with an unresolved template now creates a visual with an empty SVG
<g>element instead ofnull. This avoids seemingly unrelated exceptions later on. -
If the
SvgExport.encodeImageBase64property is enabled, images that use dataURIsand are not already encoded are now Base64 encoded during export as well. -
The
TextRenderSupport.addTextmethod now takes into account existingxattribute values of the text element and places the text relatively to this value. -
Fixed a but that rendered labels or ports neither in a separate layer nor at their owner when
exactly one of
LabelLayerPolicy.AT_OWNERorPortLayerPolicy.AT_OWNERwas used. -
Fixed an exception which could occur in the
CanvasComponent.compareRenderOrdermethod and in the function set to theGraphModelManager.comparerproperty. -
The
GridVisualCreator.strokeis now correctly checked fornull.
Input
- The speed of pinch zooming on certain trackpads is no longer way to fast.
- Reparenting an expanded group node into a collapsed group node no longer throws an exception.
-
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
AutoGroupNodeAlignmentPolicyvaluesCENTER_LEFT,CENTER_RIGHT,TOP_CENTER,BOTTOM_CENTER, andBOTTOM_LEFTnow work correctly. -
Fixed a memory leak in the
UndoEngineclass if the tokens returned by thegetTokenmethod were not disposed when theUndoEnginegot cleared. - In very rare cases, the undo/redo processing of several consecutive reparent actions threw an exception.
-
The visualization of source port candidates by the
CreateEdgeInputModeclass does not flicker, anymore. -
The
CollapsibleNodeStyleDecorator.isHitmethod now respects buttons that are located outside of the node bounds. -
The classes
MarqueeSelectionInputModeandOverviewInputModenow install new visual templates correctly when they are set through the corresponding template property. -
The promises returned by the label editing methods in
GraphEditorInputModeandTableEditorInputModenow fulfill withnullinstead of the temporary label if the editing was canceled or the text did not validate. This was already the documented behavior.
GraphML
-
Labels at folder nodes and their adjacent edges are no longer lost during GraphML
deserialization if the
DefaultFolderNodeConverter.copyFirstLabelproperty is enabled. - Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
- In rare cases, saving a graph with folding to GraphML threw an exception.
Hierarchic Layout
-
The
HierarchicLayoutclass now correctly calculates the group node bounds. Previously, the groups' insets were slightly too large (up to one pixel). -
The
HierarchicLayoutclass no longer throws an exception if it is wrapped by an instance ofRecursiveGroupLayoutand the input graph contains layering constraints between elements of different groups. -
The
HierarchicLayoutclass now correctly considers the group insets for input graphs with nested group nodes. Previously, it sometimes produced too large insets for inner groups. -
The
HierarchicLayoutclass no longer throws an exception for some rare cases in incremental layout mode. -
Self-loop segments generated by the
HierarchicLayoutclass 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.
Edge Router
-
The
EdgeRouterclass now correctly groups edges associated with equal group IDs that have a different object ID. -
A rare exception that was triggered by the
EdgeRouterclass during routing when agridis defined on which edges need to be routed is now fixed. -
The
EdgeRouterclass now avoids unnecessary bends in cases that containPortCandidateswith 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
EdgeRouterclass now correctly handles edges with external ports. Previously, such inputs may have caused an exception. -
The
EdgeRouterclass 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
EdgeRouterclass that sometimes caused a non-deterministic behavior. -
The
EdgeRouterclass no longer throws an exception during the routing of some graphs with grouped edges. -
Fixed two issues in the
EdgeRouterclass that resulted in the violation of aPortCandidatewith fixed offsets or a strongPortConstraint. 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
EdgeRouterclass no longer throws an exception if itspolylineRoutingproperty is enabled and the input contains fixed, grouped edges. -
The
EdgeRouterclass now considers the correctNodeHaloassociated 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
EdgeRouterclass now correctly considers intersections between edges and labels of fixed edges if its propertyconsiderEdgeLabelsis enabled. -
The
EdgeRouterclass 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
EdgeRouterclass 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
EdgeRouterclass no longer considers allPortCandidateswith multiple directions as fixedPortCandidates.
Label Placement
-
The performance of the
GenericLabelingalgorithm and the quality of the label placements were improved. -
The
GenericLabelingclass no longer throws an exception for some input graphs containing labeled edges with zero length. -
The
GenericLabelingclass 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
GenericLabelingclass no longer calculates wrong label profit values for some edge labels. Previously, edges that had aPreferredPlacementDescriptorwere sometimes affected. -
The
GenericLabelingclass now produces valid results for edge labels that have a preferred distance to the edge and at the same time multiplesideOfEdgepreferences (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.
Other Layouts
-
The
Paths.findAllChainsmethod now correctly calculates the chains of input graphs with cycles. -
Fixed a potential exception in the
LayoutExecutorclass which could occur during a layout of a graph with table nodes which are not group nodes. -
The
OrganicLayoutclass 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 an exception. -
The
OrganicLayoutclass no longer throws an exception when usingCycleSubstructureStyle.CIRCULARand arranging a cycle structure where at least one cycle node is also connected to a group node outside the cycle. -
The
OrthogonalLayoutclass no longer causes an exception for some input graphs when itsfaceMaximizationproperty is enabled. -
The
OrthogonalLayoutclass no longer runs into an infinite loop for some input graphs that are tree structures with mixed edge directedness (see theOrthogonalLayout.edgeDirectednessDpKeyproperty). Note that the problem only occurred if theOrthogonalLayout.treeStyleproperty is not set toTreeLayoutStyle.NONE. -
The
OrthogonalLayoutclass no longer throws an exception when itsuniformPortAssignmentproperty is enabled and the input contains parallel edges. -
The
CompactNodePlacerclass no longer throws an exception for input graphs with specified memento strategies (seeTreeLayoutData.compactNodePlacerStrategyMementos. -
The
SimpleNodePlacerclass no longer produces very long horizontal edge segments for inputs where they aren't required. -
The
PolylineLayoutStagedoes no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes). -
The
PartialLayoutclass now correctly considers the specifiedPortCandidatesduring orthogonal or octilinear routing of edges. -
The
SeriesParallelLayoutclass now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception.
Minor Behavior Change
-
The
SvgExport.shouldEncodeImageBase64method is now only called for images that are not already Base64 encoded. This method is only meant to specify whether images that are not already Base64 encoded should be encoded for the export. SvgExport doesn't (and didn't) change images that are already Base64 encoded.
yFiles for HTML 2.1.0.6
This is the 6th bugfix release for yFiles for HTML 2.1. It corrects several errors and brings some improvements. There are no incompatible changes.
Improvements
- By default, the Backspace key now deletes the selected elements, as the Delete key does. This is especially useful on MacBooks since their 'Delete' key is Backspace. Previously, the Backspace key had no default command.
-
Added the
FixPortLocationStageDataclass that allows to conveniently define the port constraints that are considered by theFixPortLocationStageclass. -
The new properties
OrganicLayoutData.sourceGroupIdsandOrganicLayoutData.targetGroupIdscan be used to specify edge grouping.
Bugfixes
View
-
Exporting with the
SvgExportclass silently failed without exporting anything if the text of a label contained emojis or some other unusual Unicode characters. - 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 the
CanvasControl.animateScrollCommandsproperty enabled no longer changes the zoom level. -
The labels of dragged ports were not displayed correctly by the
PortDropInputModeclass. -
The
EdgeStyleDecorationsInstallerclass now properly displays decorations for edges between group nodes and their descendants when displayed in view coordinates. -
The
IAnimation.createSequentialAnimationmethod no longer throws aTypeErrordue to 'Object.binarySearchis not a function'.
Layout
-
The
HierarchicLayoutclass now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes. -
The
HierarchicLayoutclass sometimes threw an exception for input graphs that contained incremental elements in combination with groups. -
The
HierarchicLayoutclass now prevents intersections between labels and the horizontal grid lines of aPartitionGrid. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass does no longer violate fixedPortCandidatesin cases where also critical edges (HierarchicLayoutData.criticalEdgePriorities) and edges connecting to group nodes are given. -
The
HierarchicLayoutclass now produces less superfluous crossings if there are same-layer edges withPortConstraintsorPortCandidates. -
The
HierarchicLayoutclass no longer produces non-orthogonal segments if the graph has port labels and the edge grouping feature is enabled. -
The
HierarchicLayoutclass 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.nodeToEdgeDistanceproperty. -
The
HierarchicLayoutclass 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
EdgeRouterclass no longer throws an exception for some inputs containing edges with intermediate routing points. -
The
EdgeRouterclass now correctly handles cases where the maximum duration is exceeded and where previously an exception was triggered. -
Improved the path search performance of the
EdgeRouterclass 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 stack overflow error in
EdgeRouter. -
When using
RecursiveGroupLayout, the values of the propertiescomputedWidth,computedHeightandcomputedPositionof the classesColumnDescriptorandRowDescriptorare now correctly set after the layout ifEdgeRouteris the correspondingInterEdgeRouter. -
The
ComponentLayoutclass now correctly handles input graphs with user-specified components that contain nodes withnullas their component ID (see propertyComponentLayoutData.componentIds). Previously, such inputs may have caused an exception. -
The
CompactNodePlacerclass now correctly considers the specified values for theverticalDistanceandhorizontalDistanceproperties. -
The
CompactNodePlacerclass now correctly handles inputs where the tree root is marked as assistant node, seeTreeLayoutData.assistantNodes. -
The
CompactNodePlacerclass now correctly handles input graphs that contain assistant nodes and given placement strategies (see theTreeLayoutData.compactNodePlacerStrategyMementosproperty). -
The
CompactNodePlacerclass now produces more compact results for some cases where it previously generated larger, less compact results. - The
CompactNodePlacerclass no longer throws an exception for some inputs with specified strategy memento information. -
The
OrthogonalLayoutdoes no longer throw an exception if a graph is almost a tree and itstreeStyleproperty is set toTreeLayoutStyle.INTEGRATEDand a fixedTreeOrientationis set. -
The
OrganicLayoutclass now produces deterministic results for group nodes if the propertydeterministicis enabled. -
The
OrganicRemoveOverlapsStageclass no longer gets stuck in an infinite loop in some rare cases.
yFiles for HTML 2.1.0.5
This is the 5th bugfix release for yFiles for HTML 2.1. It corrects just one issue that prevented backwards compatibility with old browsers.
Bugfixes
- A deployment issue caused the "lang" library module to contain a 'const' declaration. This declaration has now been replaced by a 'var' declaration, so the modules are fully ECMAScript 5 compatible again.
yFiles for HTML 2.1.0.4
This is the 4th bugfix release for yFiles for HTML 2.1. It corrects several errors and comes with some improvements of the library and the demos. There is one minor incompatible change.
Improvements
-
Some code optimizers break the library code, most prominently the build optimizer of Angular
CLI, Rollup when 'tree shaking' is enabled, and Uglify when the 'pure_getters' setting is enabled. We now check whether the code has been wrecked and show a corresponding warning in the console. For more details, see the Known Issues document (of your local yFiles for HTML installation) and the corresponding angular-cli issue. -
The
LayoutExecutornow automatically enables and disables a wait input mode for theGraphComponentduring layout and subsequent animation. This can be turned off with the newallowUserInteractionproperty. - Input modes no longer run unnecessary hit tests when they are canceled.
Bugfixes
- ES6 library modules that are packed with webpack no longer contain 'const' variables.
- The deployment tool did not rename references to obfuscated types in some cases when using the simple names exported from the yFiles ES6 modules.
View and Input
-
GraphModelManager: Fixed an error that occurred when any of thedescriptorproperties were set while theGraphModelManagerinstance was not yet associated with anIGraph. -
Fixed a possible infinite loop in the
OrthogonalEdgeHelperclass. - The cursor is now correctly reset after editing an orthogonal edge.
-
Fixed a possible error which could occur in customized
LabelDropInputModeandPortDropInputModeclasses. - The drop input modes now make sure not to throw "Invalid Argument" errors in Internet Explorer.
-
The
PortRelocationHandle.GHOST_VISUALIZATION_STROKE_KEYconstant was not excluded from obfuscation. -
The
graphparameter of the constructor of thePortRelocationHandleProviderclass can now benull. This was already the documented behavior. -
Mouse wheel scrolling and scroll commands no longer move the view to the top left corner if
the viewport is limited by a
ViewportLimiter. -
The bounds and the visibility state of the
ICanvasObjectinstalled by theRectangleIndicatorInstallerclass were wrong. This impacted the performance as e.g. some node selection highlights were updated although they were not in the viewport and resulted in unnecessary large content rectangles. -
The
IHitTestableimplementation of theDefaultPortCandidateDescriptorclass used incorrect coordinates. -
Changing the
MouseHoverInputMode.durationproperty had no effect. -
The
ItemHoverInputModeclass now updates the hovered item upon mouse drag events, too. This was already the documented behavior. Previously, the hovered item was only updated on mouse move events. -
The
ItemHoverInputModeclass now removes the hovered item uponCancel. -
The
CreateEdgeInputModeclass doesn't show port candidates anymore if bend creation is enforced (by pressingCTRLkey during edge creation). -
Key bindings registered with
KeyboardInputModewere gone after re-installation of the mode. -
The
INodeInsetsProviderimplementations which can be retrieved fromInteriorLabelModelandInteriorStretchLabelModelnow correctly sum up the space required by overlapping labels. - Bridges sometimes did not appear on edges when they were scrolled into the viewport.
- The overview did not render self-loops whose ports were owned by another edge correctly.
- 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 a possible
TypeErrorinTableNodeStyleRendererwhen aTableNodeStyleis rendered with thetableproperty set tonull. -
The
GraphBuilder.updateGraphmethod properly builds the graph now even ifbuildGraphwas not called before.
Layout
-
The
HierarchicLayoutclass placed source and target edge labels at the wrong location when integrated edge labeling was enabled and if there were either critical edges or the propertySimplexNodePlacer.straightenEdgeswas enabled. -
The
HierarchicLayoutclass sometimes threw an error for input graphs that contained fixed elements in combination with both swimlanes and groups. -
HierarchicLayoutis no longer stuck in an endless loop if a sub-component with a nested layout algorithm that again contains aHierarchicLayoutalgorithm is defined. -
The
OrganicLayoutclass now always correctly moves the nodes for inputs with scope set toSUBSETorMAINLY_SUBSETand with specified output restrictions. -
The
TreeLayoutclass now correctly passes on exceptions that occurred during the layout calculation. Previously, they were sometimes caught without proper handling. -
The
SeriesParallelLayoutclass can now handle input graphs that contain nodes with very large location coordinates (e.g. largest possible floating-point value) when thefromSketchModeproperty is disabled. -
The
RadialLayoutclass does no longer throw an error if there is anIDataProviderregistered with the keyHierarchicLayout.SUB_COMPONENT_ID_DP_KEY. -
The
RecursiveGroupLayoutclass now correctly considersPortConstraintsandPortCandidatesof self-loops where both end points are restricted to the same node side. -
A rare bug in the
GenericLabelingmay have caused an error for some input graphs that contain edges with zero length segments and labels associated with a free edge label model. -
The
EdgeRouternow avoids edge-to-edge distance violations for segments directly connecting at a node if there exists a cheaper route that, e.g., introduces a bend (which costs less by default). The effect of this issue was mainly observable in cases where the edge-to-edge distance was set to a rather large value. -
The
EdgeRouternow avoids some unnecessary bends that were previously created for edges that needed to pass group node borders and in conjunction with rather largeminimumNodeToEdgeDistancevalues. -
The
EdgeRouterclass now keeps paths with self-crossings belonging to fixed edges. Previously, the self-crossings were removed, i.e. paths of fixed edges were changed. -
The
PolylineLayoutStageclass now keeps collinear bends of fixed edges.
Notable Demo Improvements
- Updated third-party toolkits and dependencies of the demos to the current versions, most notable to webpack 4 and TypeScript 3.
- Improved the performance of the Structure View and Neighborhood View demo components.
-
The new
JSONWriterandJSONReaderclasses show how to write and read a graph to/from JSON. They supersede theGraphToJSONclass and are more universal to support more use cases. - Enabled a workaround for Microsoft Edge in the Image Export demo. Otherwise gradients are not drawn correctly.
Incompatible Change
- Reverted the following improvement of version 2.1 since it turned out to cause problems:
"
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.".
yFiles for HTML 2.1.0.3
This is the 3rd bugfix release for yFiles for HTML 2.1. It includes several new demos, improvements, and corrections of errors. There are no incompatible changes.
Improvements
- The yFiles type checking now complains always when trying to create an instance of an abstract class.
View
-
Reduced memory consumption of Void styles like
VoidNodeStyle. - Improved performance for graphs with a large number of dynamically data-bound template styles.
-
Improved performance of the
WebGLTaperedEdgeStyle.
Layout
-
The new
PlaceNodesAtBarycenterStageDataclass allows to conveniently define the nodes that should be affected byPlaceNodesAtBarycenterStage. -
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.
Bugfixes
- Prevent a TypeError due to missing createElementNS property in web workers and in node.js when using the ES6 modules variant of the library.
View
-
GraphModelManagerno longer removes the port visualizations ifPortLayerPolicy.AT_OWNERis used and theHierarchicNestingPolicyis changed. - Bridges: For edges which cross each other with the same absolute slope a bridge is added on exactly one of these edges, depending on the crossing policy. Previously, a bridge was added either on both edges or none of them.
-
SmartEdgeLabelModelcentered all labels on an edge that overlapped with a segment of the edge or were placed directly next to it. - Switching the input mode in an event handler of the current input mode no longer throws an error.
-
GraphClipboard: The contents of a folder node were 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. -
GenericLabelModelserialization: Fixed cyclic reference in GraphML which could happen while serializing aGenericLabelModelwith a parameter with associated descriptor. -
Corrected the GraphML serialization of the
IArrowinstances that are returned by theArrow.asFrozenmethod.
Layout
-
HierarchicLayoutnow correctly considers fixed nodes with layering constraints. Previously, there were some rare cases where such inputs caused infinite looping issues. -
OrthogonalLayoutdoes no longer throw an error for some input graphs when itstreeStyleproperty is set toCOMPACTand itschainStyleproperty is set to a wrapped style. -
OrthogonalLayoutno longer throws an error if itscycleStyleproperty is set to a specific style and the input graph only consists of a single cycle. -
EdgeRouternow always considers thePortCandidatesfor edges grouped with fixed edges. -
EdgeRouternow keeps collinear bends of fixed edges. -
EdgeRouterno longer crashes when defining exactly two equal intermediate routing points for an edge. -
EdgeRouterthrew an error when the list of intermediate points for an edge consisted of exactly two equal points. -
BusRouterno longer produces non-deterministic results, i.e. different results for consecutive runs on the same input. Previously, this was possible in rare cases. -
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. -
GenericLabelingnow always prefersLabelCandidateswith higher profit values over others with lower profit. Previously, this sometimes happened even though both candidates did not intersect with other elements. -
GenericLabelingdoes no longer assume that allLabelCandidatesassociated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given. -
MultiPageLayoutnow correctly considers the maximum page size for tree layouts. -
FamilyTreeLayoutnow correctly considers the preferred family member order. -
The
PreferredPlacementDescriptor.equalsmethod incorrectly reported instances with different angles and distances as equal.
New Demos and Tutorials
- Gantt Chart
- Shows how to create an interactive Gantt chart from JSON data.
- Structure View Demo
- Features a tree list component that shows a structural view of a grouped graph.
- Edge Groups
-
Shows how to configure
HierarchicLayoutto group edges. Grouped edges share common segments, thus making the layout more understandable and cleaner. - Split Edges
-
Shows that
RecursiveGroupLayoutin combination withHierarchicLayoutpresents the option to align edges that are split at a group's border. This leads to better routes for edges between groups and allows edges that connect ports at a group's border to the nodes of the group. - Rendering Order
-
Shows how to use the
GraphModelManagerclass to control the order in which graph elements are rendered. - Build Swimlanes from Data Tutorial
- Shows how to build a swimlane graph from JSON data.
- Native Listeners Tutorial
- Describes how to use a native click listener to add a button on a style.
- Filtering with Folding Tutorial
- Shows how to configure filtering and folding in the same diagram.
yFiles for HTML 2.1.0.2
This is the 2nd bugfix release for yFiles for HTML 2.1. It includes four new demos, restructured tutorials, some improvements, and corrects several errors. There are no incompatible changes.
Improvements
-
Reduced the number of bends of directed edges in
OrthogonalLayout. -
The new
TreeLayoutData.criticalEdgePrioritiesproperty can be used to specify critical edges. -
The
INodeparameter of theNavigationInputMode.enterGroupmethod is now optional. If it is omitted ornullthe whole graph will be revealed. -
The
CanvasControl.createInputModeContextmethod is now public instead of protected. -
The
PointD.toMutablePointandRectD.toMutableRectanglemethods now return aMutablePointinstead ofIMutablePointand aMutableRectangleinstead of aIMutableRectangle, respectively. -
The new optional parameter
initialTargetLocationof theCreateEdgeInputMode.doStartEdgeCreationmethod can be used to define the initial location that shall be used to find a target node.
Bugfixes
-
For some constructors, the automatic type conversion did not work as documented. Also many
simple constructors were not type-checked at run-time at all even if
yfiles-typeinfo.jswas available. -
Due to a bug in Safari 10.0 and earlier, using the new automatic type conversion feature for
enum values resulted in a
TypeErrorin these browsers. We now avoid the problematic code. -
Since version 2.1, the workaround
IE7766782for a problem in Internet Explorer withGWTwas not applied to all problematic usages ofArray.isArray. Thus,instanceofchecks for arrays could have been wrong in rare cases, resulting in different kinds of subsequent errors.
View
- yFiles no longer shows an error if WebGL support is not available but no WebGL rendering is used at all. If WebGL support is not available and WebGL rendering is used, the resulting error has now a clear error message.
-
The
Workaroundsclass now correctly documents that it is exported by theyfiles/coreES6 module. -
CreateEdgeInputModedid not show port candidates after re-installation of the input mode. -
CreateEdgeInputModedidn't always update the highlight of possible source port candidates when itsshowPortCandidatesproperty was configured to show the source port candidates. -
The default input mode that available view the
GraphEditorInputMode.moveUnselectedInputModeproperty moved the bottom-most item at the cursor position instead of the top-most. This is most apparent when trying to move a child node of a group. -
ClickInputModeprovided wrong click locations in theClickevent if aMouseEventTypes.CLICKevent without precedingMouseEventTypes.DOWNevent was processed. -
If the
MouseHoverInputMode.toolTipproperty was changed while a tool tip was visible, that tool tip was shown forever. -
ItemHoverInputModenow resets the hovered item when moving the mouse out of the control. - While relocating edges, dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
- Fixed an exception when an edge or label was pasted without selected target while its original owner was not in the current view.
-
The marquee visual of the
LassoSelectionInputModeclass was not updated properly during zooming. -
PolylineEdgeStylenow takes arrow heads into account for visibility checks. -
Reduced memory consumption of
DefaultEdgePathCropper. -
EdgeSegmentLabelModelandEdgePathLabelModelplaced the label on the wrong side forEdgeSides.ABOVE_EDGEandEdgeSides.BELOW_EDGEif the distance and offset was both 0. -
The
TextWrapConverterfor template styles threw aTypeErrorif the resolved value was not a string (e.g. for numbers ornull). Now, it handlesnullandundefinedlike an empty string and converts non-string values to string. -
The
maximumSizeparameter of theTextRenderSupport.addTextmethod is now optional, and consequently handlesnullarguments as it was already documented.
Layout
- The
HierarchicLayoutnow produces less bends if the edges should be routed on a grid and the grid reference point is not(0,0), seeNodeLayoutDescriptor.gridReference. 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 propertySimplexNodePlacer.barycenterModeis enabled.- For some input graphs with port groups, the
HierarchicLayoutthrew an exception for layout modeLayoutMode.INCREMENTAL. - Fixed a rare bug in
OrthogonalLayoutthat may have caused infinite looping for grouped input graphs. - For some input graphs the
OrganicLayoutproduced an error if theCycleSubstructureStyleproperty was set toCycleSubstructureStyle.CIRCULAR. CircularLayoutdoes now correctly consider theEdgeBundleDescriptor.bundledproperty for edges between different partitions. Previously, when at least one of these edges had theBundledproperty enabled, all of them were bundled, ignoring the property value of the other edges.- Fixed a bug in
TreeMapLayoutthat may have causedNaN-coordinates or infinite looping for input graphs that are non-directed trees. - The
EdgeRouternow produces better routes if there are edges with intermediate routing points, see propertyEdgeLayoutDescriptor.intermediateRoutingPoints. - For grouped segments the
GraphLayoutLineWrappernow produces more compact results. - In rare cases the
GraphLayoutLineWrapperproduced drawings with large empty space between lines.
New and Improved Demos
- Application Features Tutorial
- These new small tutorials show how to implement features that applications typically have, like drag and drop, building graphs from JSON data, and tool tips.
- Map Integration
-
Draws a graph on top of an interactive map. The
nodes are placed at the correct locations on the map with geo-coordinates. The map in this demo is realized with
the
Leaflet.jslibrary. - Contextual Toolbar
- In this demo, contextual toolbars for the nodes and edges allow quick modifications of the styling and other actions.
- Template Styles
- Shows how to rapidly create node, label, and port styles from SVG template snippets. These styles can show information about their item with dynamic data binding.
- Lasso Selection
- Shows how to configure a lasso tool for freeform selection.
Other Notable Demo Improvements
- The performance of the Large Graphs Demo was significantly improved.
- The PDF Export now supports custom fonts and non-Latin-1 characters. A second sample graph shows such fonts and characters.
- The load and save operations in the File Operations demo have been refactored and simplified to make it much easier to re-use the code in customer applications.
yFiles for HTML 2.1.0.1
This is the 1st bugfix release for yFiles for HTML 2.1. It includes four new demos, some improvements, and corrects several errors. There are three minor incompatible behavior changes.
In addition, there are new tutorial videos available online. We'll add more videos in the future.
Improvements
- Calling a method that is not available because its required module is missing now throws an
informative error message. Prominent examples are the
LayoutExecutor.morphLayoutand theIGraph.applyLayoutmethods which are only available if theview-layout-bridgemodule is loaded. -
The
EdgeRouterclass now calculates a better routing for edges between group nodes and their descendants in the case that the routing is aborted viaAbortHandleror 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
HierarchicLayoutclass now respects the sequence and layering constraints between subcomponents. Previously, such constraints were ignored.
Bugfixes
- The amount of time that may pass before a touch movement is considered a drag instead of a
press is now correctly read from
CanvasComponent.dragTime. Previously, the value of theCanvasComponent.longPressTimeproperty was used instead. - The
IOrientedRectangle.orientedRectangleCenterproperty didn't return the correct center if the width or height of the rectangle was equal to 0. - Moving an edge label with
SmartEdgeLabelModelthat is owned by an edge without visible path no longer throws an exception. -
The behavior of the
DefaultObservableCollection.clearmethod has been corrected. Previously, it always threw an error. - For template-based label and port styles, the binding context was not initialized early enough. As a result, these styles first created the DOM elements for the wrong, uninitialized vales and then updated them to the correct values.
- The new CSS classes
yfiles-selected,yfiles-highlightedandyfiles-focusedfor template-based styles were not always applied correctly at element creation time. - Removing an item that is currently highlighted with a custom
HighlightIndicatorManager,FocusIndicatorManager, orSelectionIndicatorManagerno longer results in an error. - Fixed a bug that resulted in an unresponsive input mode in Safari on iOS. This error happened
only if the
CollapsibleNodeStyleDecoratorRenderer.addToggleExpansionStateCommandmethod was used in a custom group node style. - The TypeScript definition files incorrectly required the implementation of some non-abstract properties in the quick-interface implementation constructors of some interfaces.
-
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 ayfiles.algorithms.DataProviderAdapterthat does not override theDataProvider.getmethod was registered with keyGivenLayersLayerer.LAYER_ID_KEY. This issue only appeared in conjunction with subcomponents.
New and Improved Demos
- UML Editor
- An editor for UML diagrams that features a tailored UML node style, a custom automatic layout, and special pop-up menu to quickly add new connections of different types with the mouse and touch.
- Rotatable Nodes
- Shows nodes that can be rotated interactively by dragging a rotation handle. Labels and ports rotate with their node and edges clip perfectly at the rotated node bounds. Automatic layout can deal with rotated nodes, too.
- Hierarchic Subcomponents
- Hierarchic layout can now arrange selected subcomponents with a different style. This can be a tree, organic, or orthogonal style, or a hierarchic style with different settings than the main layout.
- Critical Paths
- In hierarchic and tree graphs, some paths can be more important than others. This demo shows how the hierarchic and tree layout styles align the nodes and edges of such important, or 'critical', paths to make them more striking.
Other Notable Demo Improvements
- The context menu that is used in the demos is now an actual class and its menu items are real input elements. It now returns the focus to its graph component when closed and is easier to open with a touch long-press gesture.
- The Image Export, PDF Export and Web Worker demos have been refactored to make it easier to re-use the code in other projects.
- The
GraphToJSONconverter correctly parses bend locations and port locations now.
Changes of Default Behavior
- The
IGraph.setNodeLayoutmethod and the various methods to create a node now throw anArgumentErrorif the layout rectangle contains one or moreNaNvalues. Similarly, theIGraph.setBendLocationand the various methods to add a bend to an edge now throw anArgumentErrorif the location point contains one or twoNaNvalues. - The
ContextMenuInputMode.populateMenuevent is now only fired if the current input mode state allows opening the context menu. Previously, the event was fired before the input mode had even checked whether another active input mode would prevent the opening of the menu. - The default value of
DragSource.effectAllowedis nowDragDropEffects.ALLinstead ofDragDropEffects.NONE. This was always the intended default value.
yFiles for HTML 2.1
Major New Features
- ES6 Modules of the Library
- The yFiles package now contains the library as ES6 modules in addition to the existing UMD modules. This makes, amongst others, working with modern IDEs, popular tools like Webpack and Angular CLI, and TypeScript much easier.
- WebGL Rendering
- Added WebGL as a third rendering option besides the already available SVG and HTML5 Canvas rendering. This allows the rendering of very large graphs with good performance. The Large Graphs demo shows the new technique in action.
- Labels at Ports
-
Labels can now be added to ports and the new label models
FreePortLabelModelandInsideOutsideLabelModelcan be used to place such labels. On the technical side,IPortnow extends theILabelOwnerinterface and there is a new enum constant:GraphItemTypes.PortLabel. - 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
LabelLayerPolicyandPortLayerPolicyofGraphModelManagertoLabelLayerPolicy.AtOwnerandPortLayerPolicy.AtOwner, respectively.The nesting options of
GraphModelManagerfor the visualizations of nodes and edges have been improved and clarified. The propertiesuseHierarchicNodeNestinganduseHierarchicEdgeNestinghave been combined into the newhierarchicNestingPolicyproperty. It takes values of the newHierarchicNestingPolicyenum. Its new optionHierarchicNestingPolicy.GROUP_NODEconfiguresGraphModelManagerto visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth. - Touch Improvements
-
A completely new Touch
demo shows how the user experience can be optimized for touch-only devices, for example with large handles
and a context dial menu that is triggered on "long-press".
This is accompanied by several improvements in the library that make touch input more fun. Especially, the hit test radius and drag detection area is now autoamtically enlarged for touch input, inertia scrolling of the viewport behaves now in a more natural way and stops after a fixed amount of time and two-finger panning and zooming now smooths small movements to avoid undesired changes of the zoom level.
- Drag and Drop
-
Native HTML5 drag and drop is now supported in addition to the custom yFiles
implementation that is based on mouse and touch event listeners. Both ways can now display a preview image of
the dragged item all of the time and not only inside the graph component. Finally, the new
LabelDropInputModeandPortDropInputModeclasses implement drag and drop for labels and ports, respectively. The API of these classes is similar to the existingNodeDropInputModefor nodes. - Lasso Selection
-
The new
LassoSelectionInputModeselects 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.SubComponentsproperty can be used to configure the new sub-components feature of the hierarchic layout. - Tree Map Layout
-
Added the new layout algorithm
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 newTreeMapLayoutDataclass provides additional configuration options for this algorithm and the new Tree Map Demo shows a possible use case for the new layout style. - Tabular Layout Style
-
The new layout 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 newTabularLayoutDataclass provides additional configuration options for this algorithm and the Layout Styles Demo shows the new layout style.
New Features
General
If you are updating from an older version of yFiles for HTML, have a look at the list of incompatible changes and at the more detailed description in the Migration Guide document (of your local yFiles for HTML installation). An updated version of our automatic source code conversion tool is available for this release, too.
- Many common simple types can now be created, or automatically type converted,
from a shorthand string or object notation. For example, you can specify a point with
{x:100, y: 200}, an arrow with"blue large circle", and an enum just by its name, e.g."TOP_LEFT". Usages that allow the conversion of a parameter or property value are marked with a 'Conversion' badge in the API Doc and the valid syntax for each type is described with the corresponding type. -
The deployment tool can now optimize and obfuscate ES6 sources directly; transpiling the
sources to
ES5first is not required anymore.
View
-
The performance of
FilteredGraphWrapperhas been significantly improved. Now, it depends mainly on the size of the resulting filtered graph. This makes use cases that load very large graphs into memory and displaying only a subset of them usingFilteredGraphWrappermuch more reactive. - The new property
CanvasComponent.devicePixelRatiocan be adjusted to achieve crisp Canvas or WebGL rendering on high DPI devices. CanvasComponentandGraphComponentcan automatically detect (re-)insertions into the DOM now, allowing the size calculation and adjustment to also work in cases where the component previously was not displayed (out of DOM ordisplay:none).- The following types and methods were added to support the new
LassoSelectionInputMode:- Added the
GraphInputMode.lassoSelectionInputModeproperty and a corresponding factory method.LassoSelectionInputModeis disabled by default. - The new
GraphInputMode.lassoSelectmethod programmatically selects all items in the providedGeneralPath. - The new
ILassoTestableinterface specifies whether the item is considered to be inside the lasso path. This is analogous to theIMarqueeTestableinterface for marquee selection. - Any model item can be decorated with an instance of
ILassoTestableor provide one in its lookup. For this, theNode/Edge/Port/Label/BendDecoratorclasses got the newlassoTestableDecoratorproperty for decorating an item with a customILassoTestable. - The new
isInPathmethod ofNode/Edge/Port/LabelStyleBasecan 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. -
The rectangle of the marquee selection can now be customized with the new protected method
MarqueeSelectionInputModes.calculateMarqueeRectangle. -
Added the events
ElementsCopied,ElementsCut, andElementsPastedtoGraphEditorInputMode, and the eventElementsCopiedtoGraphViewerInputMode. -
Added new decorator implementations for table items. You can access these new decorators via
the new method
ITable.GetDecoratorwith theRowDecorator,ColumnDecoratorandStripeLabelDecoratorproperties. -
The mouse wheel behavior of the overview can now be switched between
Zoom,Scroll, andNone, and optionally the action can be performed only when the control is focused. This can be configured with the newOverviewInputMode.MouseWheelBehaviorproperty. -
If the new
CanvasControl.QuantizeInputCoordinatesproperty is enabled, world coordinates of mouse and touch events are rounded to nicer values to avoid unnecessary precision. For example, you'll get the value 326.375 instead of 326.3858109495. 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. - Added text wrapping support to the template styles. This feature is available through the
built-in converter function
TextWrapConverter.
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.maximumDurationcontrols the preferred time limit of this layout algorithm. -
The new
OrthogonalLayout.uniformPortAssignmentproperty allows to obtain results with a more uniform port assignment. -
TreeLayout: Added node placerCompactNodePlacerthat 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. -
The new
TreeLayoutData.CompactNodePlacerStrategyMementosproperty can be used to to maintain similar layout styles over subsequent runs of compact tree layout. -
EdgeRouternow 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
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 ofRecursiveGroupLayoutwithout 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
TemporaryGroupNodeInsertionDataclass provides additional configuration options for this algorithm. -
The new stage
PlaceNodesAtBarycenterStageplaces a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these node are hidden.
Improvements
General
- The TypeScript declaration files now support quick interface implementations.
-
The new
yfiles.lang.Workaroundsclass provides properties that activate workarounds for known browser issues. This alternative way of setting workarounds is especially useful in ES6 modules where no reference to theyfilestop-level namespace is required anymore. -
The new
yfiles.lang.Licenseobject has avalueproperty that can be set to the license values. This alternative way of setting the license data is especially useful in ES6-style code where no reference toyfilesis required anymore. - Errors thrown during the execution of the default implementations of
ICommand.SAVEandICommand.OPENcan now be caught by setting an error handler function to theyfiles.lang.Exception.handlerproperty. - The
IEnumerable.reducemethod now uses the same argument order and semantics as the defaultArray.prototype.reducemethod. -
RectandSize: Added methods toreducethe size of aRectand aSizeinstance, respectively. - The new method
GeneralPath.intersects(GeneralPath)determines whether the path intersects with anotherGeneralPath. - Saving a GraphML file now works in Safari 10.1 and 11 on macOS.
- When reading GraphML with the deserialization property
IGNORE_XAML_DESERIALIZATION_ERRORSenabled, invalid property content is now skipped instead of discarding the whole object with such content. -
The
GraphMLSupport.graphMLIOHandlerproperty is initialized with aGraphMLIOHandlerinstance.
Graph
- The default value of
DefaultPortCandidate.locationParameteris nowFreeNodePortLocationModel.NODE_CENTER_ANCHOREDfor nodes andBendAnchoredPortLocationModel.FIRST_BENDfor edges instead of a parameter of an internal model. - Added a
removemethod toNodeDecorator,LabelDecorator,EdgeDecorator,PortDecorator, andBendDecoratorfor easy removal of decorations. - Many label model
createParametermethods now have default values for parameters that are not needed every time. InteriorStretchLabelModel: Added new parametersCENTER_HORIZONTALandCENTER_VERTICALfor horizontal or vertical centered one-line labels.- The
elementCopiedCallbackorelementDuplicatedparameter of the methodsGraphCopier.copyandGraphClipboard.duplicateis now optional (and can be null). DefaultGraphnow fills the undo engine and triggers events in a consistent manner for all graph element factory methods.DefaultGraphhas new factory methods to customize undo unit creation.- The performance of
GraphBuilder,TreeBuilder, andAdjacentNodesGraphBuilderwas drastically improved if node and edgeIDbindings are set. Additionally, these types have an improved API that makes it easier to customize the created and updated graph elements.
View
-
The new
CanvasComponent.hitTestRadiusTouchproperty controls the hit test radius for touch interaction. The existinghitTestRadiusproperty now only applies to mouse interaction. TheICanvasContext.HitTestRadiusproperty automatically uses one or the other value, depending on the last input event. -
The new
CanvasComponent.dragSizeTouchproperty specifies the size of the area where a touch point may stay in before a movement is considered a drag. The existingdragSizeproperty now only applies to mouse interaction. - Added the new
CanvasComponent.limitFitContentZoomproperty which controls whether the maximum zoom level for theCanvasComponent.fitContentmethod as well as thefitContentcommand is restricted to1or the value of themaximumZoomproperty. - Akin to the two
CanvasComponent.zoomTomethods, there are now twoCanvasComponent.zoomToAnimatedmethods that animate the viewport change. TheCanvasComponent.zoomToAnimatedmethod now returns aPromisethat fulfills when the viewport animation has finished. - The new
CanvasComponent.updateVisualAsyncmethod behaves like theinvalidatemethod but yields aPromisethat can be awaited for. - The new
CanvasComponent.lastInputEventproperty contains thelastMouseEventorlastTouchEventdepending on which was dispatched last. - The
CanvasComponent.cleanupmethod new removes all DOM children and attributes created during the lifetime of theCanvasComponentfrom itsdivelement. - The
CanvasComponent.sizeChangedTimerIntervalproperty now is a properTimeSpaninstead of a simple number. - The new
CanvasComponent.toWorldFromPagemethod converts from HTML page coordinates to world coordinates. - Improved styling of scrollbars and provided more CSS classes for different states of the scrollbar.
- Improved zooming and scrolling behavior for touch pads in Chrome, Safari, Edge and Opera.
GraphModelManagernow 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.- The new method
GraphModelManager.getMainCanvasObjectreturns the canvas object that should be used when changing the visibility or z-order of a model item. ICanvasObjectGroup.addChild(Object,ICanvasObjectDescriptor): The second parameter is now an optional parameter. If no descriptor is passed,ICanvasObjectDescriptor.ALWAYS_DIRTY_INSTANCEis used by the default implementation.- Assigning a new graph instance to
GraphOverviewComponentnow keeps configuration changes made to the overview'sIVisualCreatorinstance. - Self-loop edges are now properly displayed in the
GraphOverviewComponent. -
The new
Animations.createSequentialAnimationmethod creates an animation that animates multiple animations in sequence.
Styles
PolylineEdgeStylerenders better looking paths for self-loop edges whose ports are near the node border.- The
GeneralPath.createSmoothedPathmethod now has additional parameters to change how smoothing is applied. Those new options result in nicer smoothing when combined with large smoothing lengths and many different segment lengths of the path. - The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. Therefore, the visualizations no longer extend into the node bounds.
- Template styles now search for binding converter functions in a static converter store object on the template type before checking the `window` object. This helps preventing pollution of the global scope.
- Template styles can now bind to the current zoom level of the component.
- Template styles now provide
yfiles-selected,yfiles-highlightedandyfiles-focusedCSS classes depending on their current state. - Some styles unnecessarily added empty SVG <g> elements to the DOM.
- New instances of
SolidColorFillare now automatically frozen which can result in performance improvements. This type was already immutable anyway. - The new static methods
Stroke.setStrokeandFill.setFillarenull-safe replacements for the existingapplyTomethods ofFillandStroke.
Input
ItemClickedEventArgsnow extendsClickEventArgsand therefore provides additional information like theIInputModeContext.- Added
MouseEventRecognizersthat recognize a current down state of a mouse button. These can be used to recognize ongoing gestures like drags, in contrast to recognizers for the actualmousedownevent. - The static constants
SELECTED_MOVABLES_POSITION_HANDLERandSELECTED_MOVABLES_HIT_TESTABLEhave been added toGraphEditorInputMode. These are used as defaultIPositionHandlerandIHitTestableproperties ofGraphEditorInputMode.moveInputModeand can be reused for other input modes. - The new
GraphEditorInputMode.moveUnselectedInputModeproperty provides a child input mode for moving unselected items. It supersedes the previouscreateMoveUnselectedInputModemethod. This input mode is disabled by default. CreateEdgeInputModenow removes coinciding bends if orthogonal edge creation is enabled.- The new property
CreateEdgeInputMode.prematureEndHitTestableallows for considering any location as valid target point for an edge. - The new
CreateEdgeInputMode.getSourcePortCandidatesprotected method makes source port candidate determination more flexible. CreateEdgeInputModeprovides access to a dummy target node which is used during the interactive edge creation. This allows making the node visible during creation by setting a style and size.CreateEdgeInputModenow supports edges ending without a valid target port candidate. This allows creating new target nodes together with a newly created edge.- During interactive edge creation, the tip of a newly created edge now only snaps to valid target port candidates to create orthogonal end segments.
- The new
CreateEdgeInputMode.dragCursorproperty specifies the cursor that is used during edge creation when no bend may be created at the current location. 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.- The new
CreateEdgeInputMode.startOverCandidateOnlyproperty can be used to restrict the start of an edge creation gesture to directly hovered port candidates. CreateEdgeInputModenow supports showing port candidates at potential sources for edge creation, too.- Moving a node with the
MoveInputModefor unselected nodes now moves the bends of incident self-loops, too. MoveLabelInputMode: The visualization of a moved label has been improved. The new propertyvisualizationallows easy switching between a symbolic preview, a preview or a live view.-
The new static methods
PositionHandlers.combinecombine multiple position handler instances into a single instance. - Added overridable methods to
PortRelocationHandleto allow customization of the port candidates. - The new
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. ClickInputModenow dispatches the clicked events in the same order asGraphInputMode, i.e. the more specific eventsLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClickedare now dispatched beforeClickedandDoubleClicked. Hence,ClickedandDoubleClickedwill only be triggered if the event wasn't handled before.- The events
ItemTapped,ItemDoubleTapped, andCanvasTappedhave been added toGraphInputMode. - The new
TapEventArgs.tapCountproperty can be used to distinguish between single and multiple taps. - Added a
originalEventproperty toTapEventArgsandClickEventArgs. TouchEventArgsnow provides the modifier keys that were pressed when the event was dispatched as well as those that have changed their state since the lastTouchEventArgs.- The
CanvasComponent.MouseClickevent now reports the position of the mouse down event as its location, and theCanvasComponent.TouchClickevent reports the location of the touch down event as its location. Previously, this was the location of the up events which can be slightly different. - The new properties
MoveViewportInputMode.snapPanningandsnapPanningThresholdallow for snapping touch panning to one axis. - The new optional
contentparameter of theMouseHoverInputMode.showmethod defines the content of the tool tip to show. Now, thegetToolTipContentmethod only gets called if no content was specified. - The new methods
findNextItemandfindNearestItemofNavigationInputModecan be used to configure the determination of the "next" item. - The generic type parameter
Tof classItemDropInputMode<T> is no longer restricted toIModelItem. - Several improvements of the interactive label editing.
- Improved the focus handling of the text box.
- Other elements can now be added to the default text box, e.g. buttons.
- A new factory method allows replacing the text box with a custom label editor.
- The new
TextEditorInputMode.textBoxPlacementPolicyproperty provides finer control of what happens when theTextBoxis (partially) outside of the viewport. - The new
TextEditorInputMode.TextBoxPaddingproperty controls the padding between the text box and the border of the canvas. - The properties
maximumSnapDistance,showHitPortOwnerCandidatesOnlyandvisualizationhave been added toPortRelocationHandleProviderand are applied to eachPortRelocationHandlecreated by this provider. - The following input modes now release the mutex before dispatching their final event:
CreateEdgeInputModenow releases the mutex before dispatching theEdgeCreatedevent.MoveInputModenow releases the mutex before dispatching theDragFinishedevent.ResizeStripeInputModenow releases the mutex before dispatching theDragFinishedevent.
Table
- The last parameter of the following extension methods of
ITableis now optional:findRow,findColumn,findStripe, andfindStripes. -
TableEditorInputModenow handles clicks and taps similar toGraphEditorInputMode:- New
ItemClicked,ItemLeftClicked,ItemRightClicked,ItemDoubleClicked,ItemLeftDoubleClicked,ItemRightDoubleClicked,ItemTapped,ItemDoubleTappedevents are raised. - If an event is handled, its default behavior is prevented.
- The new properties
clickableItemsandclickableRegionsdetermine for which items and regions a click or tap event will be raised.
- New
Layout and Algorithms
-
SmartEdgeLabelModelis properly handled by labeling algorithms now, resulting in better label placements. -
The new
LayoutExecutor.createLayoutGraphAdaptercallback method makes it possible to configure theLayoutGraphAdapterthat is used for the layout calculation. - The new
improvePortAssignmentproperty ofLayoutExecutorandLayoutGraphAdapterenablesPortCalculatorto improve the port assignment. -
Major performance improvement for
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. -
The combination of
PartitionGridDataandTableLayoutConfiguratorhas been improved:PartitionGridDatanow reuses thePartitionGridcreated by theTableLayoutConfigurator.- Several methods have been added to
TableLayoutConfiguratorwhich provide access to thePartitionCellIdassignment of the configurator as well as the mappings betweenIRow/IColumnandRowDescriptor/ColumnDescriptor.
-
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 specifiedcoreLayoutis either an instance of classTreeLayoutorClassicTreeLayout. Furthermore, propertyMultiPageLayout.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 propertycreateProxyReferenceNodesthat allows to disable the creation of proxy reference nodes as well as propertymultipleComponentsOnSinglePagethat 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 usingDataProviders registered withPortConstraintKeys.SOURCE_PORT_GROUP_ID_DP_KEYandPortConstraintKeys.TARGET_PORT_GROUP_ID_DP_KEY. -
TreeComponentLayout: Added propertyconsiderUndirectedTreesthat allows to specify whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered. -
DefaultNodePlacerandSimpleNodePlacernow 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.minimumChannelSegmentDistanceandSimpleNodePlacer.minimumChannelSegmentDistancerespectively. -
ClassicTreeLayoutnow allows to specify a minimum vertical distance for the horizontal edge segments of the bus, seeClassicTreeLayout.minimumBusSegmentDistance. -
The new properties
layerConstraintsandsequenceConstraintsofHierarchicLayoutDatacan be used to configure layer and sequence constraints for theHierarchicLayout. These supersede the previouslayerConstraintFactoryandsequenceConstraintFactoryproperties.
Bugfixes
Graph and View
- Corrected weird scrolling behavior of the scroll bar when the viewport was outside the content rectangle.
-
DefaultGraphnow calls theonRemovingEdgeandonRemovingPortmethods before their incident items are removed. -
The
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. - Undo units created by the execution of a layout algorithm are now correctly merged with undo units of the previously executed interactive gesture.
- The graph of
IFoldingView.graphnow raises theNodeCreated,EdgeCreated,PortAdded,LabelAdded, andBendAddedevents 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. - Sometimes, the
GroupNodeDefaults.Labels.AutoAdjustPreferredSizeproperty and theGroupNodeDefaults.Ports.AutoCleanupproperty were not considered for labels and ports of groups. -
The commands
COPY,CUT, andDUPLICATEare no longer enabled if there are no elements to cut, copy, or duplicate. -
The
ICommand.COPYcommand is no longer executed twice. -
The methods
GraphClipboard.copyandGraphClipboard.cutdon't copy items anymore which depend on items that are selected but not included inGraphClipboard.copyItems. - The
InteriorStretchLabelModel.getMinimumNodeSizemethod now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width. - Labels rendered using
DefaultLabelStyleandTextRenderSupportnow properly consider the ascent for the first line of text and are thus rendered in a slightly higher location than before. BevelNodeStyleRenderer,PanelNodeStyleRenderer,ShadowNodeStyleDecoratorandShinyPlateNodeStyleRenderernow consider the shadow in theirisVisibleandgetBoundsmethods.- GraphML serialization: Write the
IconLabelStyle.wrappedproperty with the correct name. - The GraphML compatibility layer can now deserialize ports placed with
AnchoredPortLocationModelof yFiles for HTML1.x.
Input
-
GraphEditorInputModeandGraphViewerInputModeno longer ignore changes to their sub-input modes after having been installed once. - The
KeyEventRecognizersSHIFT_IS_DOWN,ALT_IS_DOWNandCTRL_IS_DOWNnow also recognize the modifier for touch events. - The following event recognizer of input modes and input-related classes can now also be used
with touch gestures:
CreateBendInputMode.splitOrthogonalSegmentRecognizer.ResizeStripeInputMode.resizeNeighborsRecognizerandignoreContentRecognizer.CreateEdgeInputMode.portCandidateResolutionRecognizerandenforceBendCreationRecognizer.GraphInputMode.multiSelectionRecognizer.TableEditorInputMode.multiSelectionRecognizer.ReparentNodeHandler.reparentRecognizer.PortRelocationHandle.portCandidateResolutionRecognizer.
-
The
hitTestRadiusproperty of the following implementations ofICanvasContextnow correctly contain the value in world coordinates instead of view coordinates:- The context created by
ICanvasContext.createCanvasContextwhen passing aCanvasComponentbut no hit test radius. - The context passed to
IPositionHandlers byMoveInputMode. - The context passed to adjacent handles when moving a bend handle.
- The context passed to
callbackparameter in theIRenderContext.setDisposeCallbackmethod.
- The context created by
-
Disabling
MarqueeSelectionInputModeduring the gesture via code left the marquee visible on the screen. - Panning with two fingers held down does no longer change the zoom level.
- The
ClickedandDoubleClickedevents ofClickInputModewere sometimes missing when clicking on a node or edge. Now, they are always triggered unless the event was handled before. - Changing the values of the
CreateEdgeInputMode.dummyEdgeGraph.edgeDefaultsproperty had no effect for some interactions. - Node-to-edge snapping is now disabled by default which is the documented and intended value.
For this, the initial value of the
GraphSnapContext.nodeToEdgeDistanceproperty is set to-1.0. - Snap lines which indicate the same size are no longer shown for implicitly re-sized parent group nodes.
- The default implementation of
IPortSnapResultProvidernever returned any snap results. - The
LabelEditingEventArgs.context.parentInputModeproperty provided in the eventsGraphEditorInputMode.LabelAdding,GraphEditorInputMode.LabelEditing,TableEditorInputMode.LabelAddingandTableEditorInputMode.LabelEditingnow contains the correspondingGraphEditorInputModeorTableEditorInputModeinstance. - The
CreateEdgeInputMode.cancelGestureOnInvalidTargetproperty was sometimes ignored on touch-enabled devices. CreateEdgeInputMode: ThevalidBeginCursoris now correctly hidden during edge creation when bend creation isn't allowed.- Fixed an exception when enabling
TextEditorInputMode.rotateTextBox. - Pen input was not handled at all on Android devices. Now, it is treated as mouse input.
Table
- When a stripe is removed,
ITable.LabelRemovedevents for the implicitly removed associated labels are now raised, too. - When a selected stripe label is edited its text box now is correctly placed.
ReparentStripePositionHandler: The source and target ghost visualization was not always updated correctly when custom ghosts were used.- 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.
- The implementations of
IStripeHitTestHelperandIBoundsProviderin the lookup of anIStripecould neither be decorated nor overridden by the context lookup provided by a stripe style.
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. -
HierarchicLayout: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers. -
OrthogonalLayoutnow considers edge grouping also if there are no directed edges specified.
Incompatible Changes
See the Migration Guide document (of your local yFiles for HTML installation) for more details and advice on migrating.
Incompatible API Changes
-
The
IEnumerable.reducemethod now uses the same argument order and semantics as the defaultArray.prototype.reducemethod. This means theinitialValueparameter is now the (optional) last parameter and the first element of the enumerable becomes theinitialValueif that is undefined. Previously, the order of these two parameters was reversed. -
Renamed
MouseEventRecognizersandTouchEventRecognizersto be in line with the common JavaScript notation. - Renamed the values of the
KeyEventTypeenum to match the corresponding JavaScript event type. -
The
CanvasComponent.sizeChangedTimerIntervalproperty now is a properTimeSpaninstead of a simple number. CanvasComponent: Removed the eventsMouseWheelZoomFactorChanged,MouseWheelScrollFactorChanged,AutoDragChangedandHitTestRadiusChanged. These events are unneeded since the corresponding properties are not changed by library code.CanvasComponent: Removed the eventsGotFocusandLostFocus. These just duplicated the focus and blur events on theCanvasComponent.divelement. Use these events instead.-
The
CanvasComponent.animateScrollTomethod has been removed and is superseded by the newzoomToAnimatedmethods. -
GraphModelManager.useHierarchicNodeNestinghas been removed. Set the newhierarchicNestingPolicyproperty toHierarchicNestingPolicy.NONEto disable node nesting or to eitherHierarchicNestingPolicy.NODESorHierarchicNestingPolicy.NODES_AND_EDGESto use nesting. Similarly,GraphModelManager.useHierarchicEdgeNestinghas been removed. Use eitherHierarchicNestingPolicy.NODES_AND_EDGESto enable edge nesting or any other policy to disable it. -
ItemClickedEventArgsnow extendsClickEventArgs. -
The
GraphInputMode.canvasClickedevent now provides theGraphEditorInputModeor theGraphViewerInputModeas parent input mode in thecontextproperty of itsClickEventArgs. -
The
GraphEditorInputMode.createMoveUnselectedInputModemethod has been removed. Use the propertymoveUnselectedInputModeinstead. -
GraphEditorInputMode: Removed theshouldClickCreateNodeprotected method. -
CreateEdgeInputMode'sedgeCreatormight receive null astargetPortCandidateparameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null. -
The
CreateEdgeInputMode.showPortCandidatesproperty has now the enum typeShowPortCandidatesinstead ofboolean. -
The
OverviewInputMode.autoMouseWheelZoomproperty is superseded by the newmouseWheelBehaviorproperty. -
The protected factory method
MoveLabelInputMode.createLabelHitTestablehas been removed. Developers who want to set a custom instance need to set it directly to thehitTestableproperty. -
MoveViewportInputMode: The properties that controlled the inertia behavior have been removed since they no longer apply to the new algorithm. Instead, the new propertyinertiaDurationcan be used to specify the duration of the inertia scrolling. -
Replaced overloaded methods that are intended to be overwritten with non-overloading sets of
methods since the latter are easier to actually override one by one. See the migration guide for details. The
following methods are affected.
CreateEdgeInputMode.createEdge.CreateEdgeInputMode.getSourcePortCandidate.CreateEdgeInputMode.getSourcePortCandidateProvider.CreateEdgeInputMode.getTargetPortCandidateProvider.IPortCandidateProvider.getSourcePortCandidates.IPortCandidateProvider.getTargetPortCandidates.GraphClipboard.paste.GraphCopier.copyNode.
-
Removed unnecessary
Enabledparts from the following property names.EdgeSegmentLabelModel.autoRotationEnabledis nowautoRotation.EdgePathLabelModel.autoRotationEnabledis nowautoRotation.LabelLayoutTranslator.autoFlippingEnabledis nowautoFlipping.SingleCycleLayout.fromSketchModeEnabledis nowfromSketchMode.SliderEdgeLabelLayoutModel.autoRotationEnabledis nowautoRotation.DiscreteEdgeLabelLayoutModel.autoRotationEnabledis nowautoRotation.CanvasComponent.mouseCaptureEnabledis nowmouseCapture.
ReparentStripePositionHandler: All callback methods dealing with ghost objects have been renamed consistently:updateXyzVisualisationtoupdateXyzGhost.updateTargetVisualizationBoundstoupdateTargetGhostBounds.
-
Renamed all occurrences of
cleanuptocleanUpin API names. -
Renamed the enumeration value
ShowFocusPolicy.WHEN_FOCUSEDtoONLY_WHEN_FOCUSED. -
Renamed the method
SvgExport.getCliptocreateClip. -
Renamed the
Animator.destroymethod tostop. -
Renamed the methods
CanvasComponent.globalToLocaltotoViewFromPageandlocalToGlobaltotoPageFromView. -
The
ITable.relativeLocationproperty has been removed. UseITable.insetswith correspondingleftandtopvalues instead. -
The properties
layerConstraintFactoryandsequenceConstraintFactoryofHierarchicLayoutDatahave been marked as obsolete. The new propertieslayerConstraintsandsequenceConstraintsshould be used instead. Similarly, the extension methodsHierarchicLayout.createLayerConstraintFactory(IGraph)andHierarchicLayout.createSequenceConstraintFactory(IGraph)have been marked as obsolete.
Changes of Default Behavior
-
Previously, even if the
GraphModelManager.useHierarchicEdgeNestingproperty was set to true, canvas objects for edges were added to theGraphModelManager.edgeGroupas long as no group nodes were part of the graph. The corresponding newHierarchicNestingPolicyNODES_AND_EDGEShas no such behavior and thus,edgeGroupis empty by default. Use one of the other polices if canvas objects for edges should be part ofedgeGroup. -
ClickInputModenow dispatches the more specific eventsLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClickedbefore the generalClickedandDoubleClickedevents. Hence,ClickedandDoubleClickedwill only be triggered if the event wasn't handled before. -
The
CanvasComponent.dragSizeproperty no longer applies to touch input. Use the new propertydragSizeTouchfor controlling the drag size for touch input. -
The
CanvasComponent.hitTestRadiusproperty no longer applies to touch input. Use the new propertyhitTestRadiusTouchfor controlling the hit test radius of touch input. - 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
LayoutExecutor.updateContentRectproperty is now enabled by default. -
GraphBuilder,TreeBuilderandAdjacentNodesGraphBuilder: The values returned by a node or edgeIDbinding must now be astringornumber. -
If the
TreeBuilder.idBindingproperty is specified, thechildBindingmust now resolve to values that contain the nodeIDs. Previously, it was fine if the values contained either the business objects or theIDs. If yourchildBindingresolves to values that contain the business objects, simply don't set anidBinding. -
The
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 thevisualizationproperty toVisualization.GHOSTto restore the old mode. -
In
CreateEdgeInputModethe determination whether the mouse hovers over a valid end has changed. IfforceSnapToCandidateis disabled, theendHitTestablenow 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. - GraphML: Duplicate properties on XAML input are now considered an error in accordance with the XAML specification.
-
PolylineEdgeStyledefaults to an improved smoothing algorithm when using thesmoothingLengthproperty. This is especially apparent when using large values forsmoothingLength. - 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 default edge style of an
IGraphnow has a target arrowhead. This is in coherence with the default styling on other yFiles products. - Brightened the color of the marquee and lasso selection visualization.
- By default, stripe labels that are programmatically selected or highlighted don't show a selection or highlight indicator anymore.
-
Rect.isFiniteandSize.isFinitenow also consider empty instances as not finite.
Minor Incompatible Changes
The changes listed in this section are incompatible changes that we consider as unlikely to break customer code. For most of them it is unlikely that the corresponding API was used in customer code.
-
The return type of the
TextRenderSupport.measureTextmethod is nowRectinstead ofSize. -
The
AnchoredPortLocationModelExtensionclass has been moved to the GraphML compatibility demo where it was really needed. -
SolidColorFill,PatternFill, and all types related to gradients are nowfinal. They were never intended to be extended. Brush is nowabstractsince it is pointless to instantiate this base class. -
There is no constructor that only takes a renderer in
StringTemplateLabelStyleandStringTemplatePortStyleanymore. A renderer may still be specified in the existing constructor as second parameter together with an optional template string. -
The
Property.defaultValueproperty has been removed since it was not intended to be part of the public API. -
Removed the
GraphMLSupport.getGraphMLIOHandlerprotected method in favor of thegraphMLIOHandlerproperty. -
Removed the
LayoutGraphAdapter.applyLayoutstatic method which is the same as theIGraph.applyLayoutmethod. -
Removed the
TextDecorationsenum since it was an unused duplicate ofTextDecoration. -
Remove the unused
InteractiveOrganicLayout.workingRatioproperty. -
The protected method
CollapsibleNodeStyleDecorator.createSelectionInstallerhas been removed. -
Error messages don't start with the error name anymore. The error name can be obtained through
the dedicated
nameproperty of the error. -
The following static methods were available at two different types, one intended and documented
and one unintended and undocumented. The undocumented methods have been removed:
yfiles.graph.TableAnimation.createTableAnimation, useyfiles.view.IAnimation.createTableAnimation.yfiles.graph.Table.getCellBounds, useyfiles.graph.ITable.getCellBounds.yfiles.graph.Table.placeNodeInCell, useyfiles.graph.ITable.placeNodeInCell.yfiles.layout.PartitionLayout.createPolylineInterEdgeRouter, useyfiles.layout.IPartitionInterEdgeRouter.createPolylineInterEdgeRouter.
Most Notable Demo Improvements
- The renewed Angular demo demo shows how easy it is to integrate yFiles for HTML with Angular CLI. This is possible since this demo uses the ES6 module version of the library.
- The new Vue.js Node Template demo presents a template style for nodes powered by the Vue.js framework.
-
Instead of an AMD loader, the TypeScript
demo now uses
importstatements and webpack together with the ES6 module version of the library. Consequently, the previous version of the demo was renamed to TypeScript (AMD) demo. - A new step for the Getting Started Tutorial demonstrates the minimal source code to add drag and drop to an application.
- The graph-to-JSON converter of the demos now supports labels. This enhances the data exchange with other services and with code that runs as a web worker.
yFiles for HTML 2.0.1.4
This is the 4th bugfix release for 2.0.1. It includes more workarounds for browser bugs, brings support for passive event listeners, and corrects several errors. There is an incompatible change of the module dependencies.
Workarounds for Browser Issues
-
SVG rendering in Firefox can be slow due to a problem in Firefox's SVG rendering
engine. This can be prevented by enabling the already existing workaround
yfiles.workaroundCR320635which was originally added for a Chrome bug (more information on browser issue workarounds).In addition, the rendering of SVGs that contain nested <svg> elements is slow, too. Such nested <svg> elements are not used in library styles and should be replaced with <g> elements in custom styles whenever possible.
- In Edge 16 (Windows 10 Fall Creators Update), SVG <marker> elements may crash the current tab. The default demo styles use <path> elements instead of <marker> elements for arrows in this browser and custom styles should be changed in this way, too.
Find more details about these and other browser issues in the Known Issues document (of your local yFiles for HTML installation).
Improvements
-
Event listeners that invoke
preventDefaultare now registered with the optionpassive: falseto conform to the new DOM spec and to prevent warnings on the browser's console. - Images which cannot be exported due to cross origin restriction are now replaced with a fallback image instead of throwing an error. Additionally, an optional 'strict' mode can be enabled which will cause the export to fail for these types of errors. The resulting errors can be caught in the export promise.
Bugfixes
- In rare cases, ES6 classes that extend a yFiles class did not initialize correctly and threw errors on member access.
View
-
CanvasComponent: The value and the width of the scrollbar thumb sometimes were displayed incorrectly after the component was resized. -
Fixed missing drop shadow of
PanelNodeStyle. -
ImageNodeStyle: The fallback image for an unresolved image is now correctly displayed in Internet Explorer. -
The
NodeStyleStripeStyleAdapter.updateVisualmethod always created a new visual by delegating to thecreateVisualmethod. -
MoveViewportInputMode: TheDragging,Dragged,DragCanceling,DragCanceled,DragFinishingandDragFinishedevents did not fire reliably for touch input and when mouse inertia was active. -
The
ICommand.COPYcommand is no longer executed twice. -
Fixed a bug in
ViewportAnimationthat sometimes moved the viewport a bit before the animation started. - Pen input was not handled at all on Android devices. Now, it is treated as mouse input.
-
In Internet Explorer, users could interact with the viewport indicator of the
OverviewComponenteven if the component was set tovisibility="hidden".
Layout
-
HierarchicLayout: Fixed an error that occurred when both layering constraints and edge directedness (withHierarchicLayout.EDGE_DIRECTEDNESS_DP_KEY) were specified. -
HierarchicLayoutandSimplexNodePlacer: Fixed a rare error that could be triggered when the input graph had a partition grid andPortCandidatesorPortConstraints. -
HierarchicLayoutbetter adheres to the specified maximum duration by applying a suitable runtime restriction to classPortCandidateOptimizer. Previously, this class didn't have any runtime restrictions. -
HierarchicLayoutcreates better port assignments for edges incident to group nodes that are routed directly. Previously, such edges were often reversed. -
HierarchicLayoutno longer violates the specifiedPortCandidatesof edges with labels with preferred placement specifierLabelLayoutConstants.PLACE_AT_SOURCE_PORTorLabelLayoutConstants.PLACE_AT_TARGET_PORTwhen using an orientation other than top-to-bottom. -
HierarchicLayoutwith partition grid: Avoid unnecessarily large layer distances if an empty partition grid row with a minimum row height exists. -
HierarchicLayoutwith partition grid: Avoid an error when the layout algorithm is configured to stop after the layering or sequencing phase (seeHierarchicLayout.stopAfterLayeringandHierarchicLayout.stopAfterSequencing). -
EdgeRouter: Fixed an error that occurred for graphs with fixed edges and very short segments. -
OrthogonalLayout: Fixed a rare bug that caused node-edge overlaps. -
OrganicRemoveOverlapsStagebetter adheres to the specified maximum duration. -
SeriesParallelLayoutno longer misplaces edge labels for graphs with only a single edge.
Incompatible Change
-
The module
yfiles/view-graphmlno longer depends onyfiles/view-tableandyfiles/view-editor. These dependencies were undocumented and unintended. If you use the GraphML feature and the table or editor feature, make sure to require the corresponding module(s) explicitly.
Notable Demo Improvements
- Optimized several styles used in demos for better rendering performance in Firefox and iOS browsers. See the performance notices in the documentation for details and tips.
- Context menus now open on iOS devices.
- Enabled a workaround in the default demo styles that avoids a fatal error in Edge 16 (Windows 10 Fall Creators Update) that ultimately prevented the loading of the web page. For more details, see the Known Issues document (of your local yFiles for HTML installation).
yFiles for HTML 2.0.1.3
This is the 3rd bugfix release for 2.0.1. It includes two workarounds for browser bugs, brings support for TypeScript 2.5, corrects several errors, and contains two new demos. There are no incompatible changes since 2.0.1.2.
Additionally, we have released a TypeScript migration tool on GitHub that helps with the migration of TypeScript files that reference yFiles for HTML 1.x API to the yFiles for HTML 2.x API.
New Demos
- Decision Tree
- An interactive decision making app with automatic incremental layout. You can explore the existing samples, and create or load your own decision tree.
- Partition Grid
- An interactive explorer for the PartitionGrid class. A partition grid distributes the nodes into rows and/or columns during an automatic layout. This can be used, for example, to realize layouts of graphs with swimlanes or tables.
Workarounds for Browser Issues
-
Safari 11 and all WebKit browsers on iOS 11 are affected by a rendering issue that causes
missing or not correctly zoomed graph elements, seemingly broken user interaction, and other artifacts. This can
be prevented by enabling the already existing workaround
yfiles.workaroundCR320635which was originally added for a Chrome bug. See the related Knowledge Base article for more information on enabling this workaround and the WebKit bug report for more details on the issue. -
Added a workaround for a bug in
Internet Explorer's implementation of
Array.isArraywith GWT. To enable the workaround, set theyfiles.workaroundIE7766782variable totrue(more information on browser issue workarounds).
Find more details about these and other browser issues in the Known Issues document (of your local yFiles for HTML installation).
Improvements
-
TypeScript: Made the typings provided by
yfiles-api.d.tscompatible with TypeScript 2.5. -
yfiles.styles.IArrow.NONEandyfiles.input.HandleTypes.INVISIBLEinsert an empty<g>element into the DOM instead of an empty<use>element. The latter resulted in validation errors with exported SVG images in some SVG validators.
Bugfixes
View
-
In some cases, removing an event listener which was not created using
yfiles.lang.delegatecaused an error. - Creating an ES6 subclass of a subclass with overridden yFiles members resulted in incorrect run-time behavior when the lower subclass was instantiated before its super classes.
-
TouchEnterevent: The value of thelocationproperty was not correct. -
LayoutExecutor.stop()did not immediately stop the layout animation as it is supposed to. -
MoveInputModedid not correctly recognize move interactions when triggered using touch gestures in Edge and Internet Explorer. -
CreateEdgeInputModefired gesture cancel events even if it was not started before. -
DropInputMode: An error occurred if aDragEnterevent was recognized while another drag action was still running. -
StripeDropInputModeno longer callsitemCreatortwice. -
The
StripeDropInputMode.ItemCreatedevent was not raised. -
GeneralPath.IsVisibleoften returnedtruefor invisible paths.
Layout
-
OrthogonalLayout: Fixed rare bug that caused overlapping nodes. -
OrthogonalLayout: Improved from-sketch mode in conjunction with node labels or node halos. Previously, in the presence of the mentioned elements, the layout results did not always correctly resemble the sketch drawing, even if it was a good sketch. -
HierarchicLayout: Fixed edge ports lying outside the node boundaries when using the edge thickness feature (i.e. edges with thickness greater than zero) together with a (rather large) grid spacing value and the default port assignmentPortAssignmentMode.DEFAULT.
Notable Demo Improvements
- Improved printing support to prevent the initial print document from being empty in some browsers.
-
Flowchart node style: The
updateVisual()method now correctly handles changes of the flowchart type of a node. -
The demos use larger values for the
dragSizeand thehitTestRadiusif the input device is a touch device.
yFiles for HTML 2.0.1.2
This is the 2nd bugfix release for 2.0.1. It includes some improvements, corrects several errors, and brings a large number of new demos. There are two incompatible behavior changes since 2.0.1.1.
New Demos
- Flowchart Editor
- An editor for Flowchart diagrams that features interactive editing, tailored Flowchart node styles, and a specialized layout algorithm.
- Tree Layout Demo
- Shows how to use different node placers with the automatic tree layout.
- Clustering Algorithms Demo
-
Showcases a selection of clustering algorithms:
- Edge Betweenness Clustering
- k-Means
- Hierarchical Clustering
- Biconnected Components Clustering
- Neo4j Demo
- Shows how to load data from a Neo4j database and display it with yFiles for HTML.
- CSS3 Animations and Transition Demo
- Shows how CSS3 transformations and animations can be applied to graph items.
- Edge Bundling Demo
- Shows edge bundling which reduces visual clutter in dense graphs.
- Node Label Placement Demo
- Shows how to place edge labels at the preferred location with a labeling algorithm.
- Edge-to-edge Connections Demo
- Shows how edge-to-edge connections can be realized. More precisely, it shows how to configure the input mode to allow edges to be connected not only to nodes but also to other edges.
- Move Unselected Nodes Demo
- Shows a special input mode that allows moving nodes without selecting them first.
Improvements
- Improved performance when the webcomponents.js polyfill for the Shadow DOM API is used.
-
FilteredGraphWrappercan now deal with node and edge predicates that evaluate to truthy or falsy values. Previously, predicates that did not strictly return true or false resulted in an error with messages like "Node not in this graph". -
SvgExport: 'id' attributes are now copied to the wrapping<g>element of inlined images. This retains the possibility for the image to be referenced in the exported SVG document. This frequently occurs if the inlined image is part of the<defs>section of an<svg>element.By default,
SvgExportmodifies the copied 'id' attributes to make sure they are unique. This behavior can be switched off with the new propertySvgExport.ensureUniqueIds. -
TypeScript: The static
isInstancemethod of all yFiles classes and interfaces is now part of the typings and specified as user-defined type guard function to avoid superfluous type casts and improve coding experience in IDEs. -
TypeScript: The typings now use
anyinstead ofObjectfor property types and method parameters to allow usage of primitive types. Most prominently, theITagOwner.tagproperty can now be set to astringvalue without explicitly casting it toany. - Developer tool for type checking: Made error messages for wrong method parameters more clear.
Bugfixes
View
- During reparenting, the edges at reparenting nodes were drawn below the group(s) and thus they were not visible. If reparenting was canceled, these edges stayed behind the group(s) and remained invisible.
-
The promise returned by
GraphEditorInputMode.addLabelandTableEditorInputMode.addLabelnow fulfills withnullinstead of the label if the editing was canceled or the text did not validate. This is the documented behavior. -
CreateEdgeInputModedid not always start correctly for quick gestures on slow devices. -
CreateEdgeInputModedid not trigger theEdgeCreationStartedevent for programmatic initialization of the edge creation gesture. -
Setting
CreateEdgeInputMode.cancelRecognizercould potentially get the input mode into a broken state. -
In the unusual case that a
validBendHitTestableis used,CreateEdgeInputModewill no longer cancel edge creation when using touch and trying to create a bend at an invalid location. Therefore, touch input behaves now in the same way as mouse input. -
Fixed a possible error in
NodeDropInputModewhen snapping is enabled and preview is disabled. -
Drag and drop did not work if the
GraphComponentwas in a shadow DOM. -
Changing
HandleInputMode.pressedRecognizerTouchhad no effect if the input mode was already installed. -
HandleInputMode.currentHandlecould not always be obtained during theDragFinished,DragFinishing,DragCanceling, andDragCanceledevents. -
Switching the
GraphComponent'sinputModein a key event handler threw an exception. -
The 'S' and 'T' keys are now correctly reported as these keys by the
KeyEventArgs.keyproperty. Previously, they were swapped, 'S' was reported as 'T' and vice versa. -
FreeLabelModel.INSTANCE,FreeEdgeLabelModel.INSTANCE, andFreeNodeLabelModel.INSTANCEare now serialized correctly to GraphML even when not used as part of their parameters (e.g. withinCompositeLabelModel). -
Labels with
NinePositionsEdgeLabelModelnow disappear when the owner edge has no visible edge path. This can happen for example when nodes are moved onto each other. Previously they appeared at unexpected locations, including the origin (0,0) and the upper left corner of the source node. -
GeneralPath.getTangentnow returnsnullif there is no tangent at the requested position. Previously, it returned a bogus tangent. - Prevent errors with the message "TypeError:Attempting to change access mechanism for an unconfigurable property" in Safari 10. This error was thrown when a constructor was declared using the yFiles class framework in code that was not using "strict-mode".
- In Safari for macOS, changed the default shortcut for the Toggle Item Selection command from Command+Space to Control+Space. Command+Space is reserved for Spotlight.
- The last row and column of the grid were sometimes not display, especially after zooming and panning.
- Creating subclasses of subclasses with abstract yFiles members using the class framework resulted in incorrect runtime behavior when the lowest subclass was instantiated first.
-
GraphMLSupport.openFile: After a user canceled the file open dialog once, promises returned by this method stayed always in pending state and were never fulfilled. -
GraphML: Writing an item's
tagthrew an error if a value was an array. -
GraphML: The
TextTrimmingenum was erroneously obfuscated by the deployment tool and, as a result, the obfuscated name could have been used inGraphMLfiles in rare cases. Reading such a file with a new build of your app resulted in an error since the obfuscated name had likely changed. -
The following static methods internally called the wrong code and always threw an error:
IAnimation.createTableAnimation,ITable.getCellBounds, andITable.placeNodeInCell.
Layout
-
HierarchicLayout: PropertyHierarchicLayout.componentArrangementPolicywas not correctly considered when there are undirected edges. -
Tree layout:
DefaultNodePlacer.minLastSegmentLengtherroneously returned the value ofminFirstSegmentLength. -
Tree layout: Prevent a memory leak in
DefaultPortAssignment. -
If
PartialLayout.edgeRoutingStrategywas set toSTRAIGHTLINE, all edges were rerouted in the graph, instead of just the ones that were required. -
EdgeRouter: The minimum first and last segment length were sometimes not respected if they were set to relatively large values. -
OrthogonalLayout: Fixed rare bug that caused non-orthogonal line segments and bad port locations.
Incompatible Changes
-
CreateEdgeInputModenow triggers theEdgeCreationStartedevent for programmatic edge creation with thedoStartEdgeCreationmethod. -
The 'S' and 'T' keys are now correctly reported as these keys by the
KeyEventArgs.keyproperty. Previously, they were swapped, 'S' was reported as 'T' and vice versa.
yFiles for HTML 2.0.1.1
This is the 1st bugfix release for 2.0.1. It includes some improvements, corrects several errors, and brings a large number of new demos. There are no incompatible changes since 2.0.1.
New and Improved Demos
- Fraud Detection Demo
- A demo application that shows how to detect fraud cases in time-dependent data.
- Isometric Drawing Demo
- Displays graphs in an isometric fashion to create the impression of a 3-dimensional view.
- Logic Gates Demo
- An editor for digital systems consisting of logic gates.
- WebComponents and Vue.js Demos
- Show how yFiles for HTML can be used with Web Components v1 and Vue.js, respectively.
- Sankey Demo
- Illustrates a diagram used for visualizing flow information in which the thickness of the edges is proportional to the flow quantity.
- Maze Router Demo
- Shows how the automatic edge routing finds routes through a maze.
- Mixed Layout Demo
-
Shows how to apply different layouts to the contents of group nodes with the
RecursiveGroupLayout. - Partial Layout Demo
- Shows how to integrate (new) graph elements into an existing graph layout.
- Layer and Sequence Constraints Demos
- Show how to use layer and sequence constraints to prescribe and restrict the node layering and sequencing in hierarchic layouts.
- Custom Label Model and Port Location Model Demos
- Show how to create and use a custom label model and a custom port location model, respectively.
- Label Editing and Label Handle Provider Demos
- Show customizations of the interactive editing, resizing and rotating of labels.
- Notable Demo Improvements
-
- Graph Viewer Demo: Added a search box to query the desired term within the labels of the nodes of the graph.
- BPMN Editor Demo: Prevent the creation of dangling edges when connecting to pool nodes with SHIFT pressed.
- Neighborhood View Demo: Prevent redundant layout calls when selecting multiple graph items.
-
Context Menu Demo: Now supports the
longpressevent on iOS devices. - Image Export Demo: Added two workarounds for problems with Internet Explorer and current Firefox versions, respectively.
Improvements
- Improved rendering performance mostly in Chrome. In bad case scenarios, the frame rate now is up to three times as high.
-
InteractiveOrganicLayout: Significant performance improvements during interactive changes of the graph, for example when a user moves nodes. - Input modes that use a combination of mouse gestures and modifier key(s) can now be started by the key press. Previously, such an input mode was only started by the first mouse event, e.g. a mouse move. The main benefit is that the cursor changes instantly with the key down to the input mode's one.
-
CanvasComponent: Overridable methodsmaybePreventPointerDefaultandmaybePreventContextMenuDefaulthave been added to control which event's default behavior should be prevented by the component. -
Added the alias
yfiles.lang.Interfaceforyfiles.lang.Trait. Interface is the intended name since 2.0 and most documentation was already referring to Interface instead of Trait. Note that we keepyfiles.lang.Traitfor compatibility reasons for now.
Bugfixes
View
-
The event
StripeDropInputMode.StripeCreatedalways returned a wrong stripe instance. -
The
EditLabelcommand was not working directly on labels when aTableEditorInputModewas active. -
TableLayoutConfiguratorerroneously considered labels on the left side as top labels, and consequently might have created insets of incorrect size. - GraphML: Fixed deserialization of empty XML label nodes.
Layout
-
HierarchicLayout: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications. -
OrganicLayout,ClassicOrganicLayoutandInteractiveOrganicLayout: Fixed error that was triggered due to NaN values that could occur in case the input graph had a very large number of nodes. -
EdgeRouter: Fixed bug that caused violations of minimum first/last segment lengths of grouped edges when using different edge layout descriptors and, second, made the layout algorithm remove a user-registeredDataProviderwith keyEdgeRouter.EDGE_LAYOUT_DESCRIPTOR_DP_KEY. -
EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions. -
RecursiveGroupLayout: Fixed bug that caused edges to share the same port even though they should have been assigned to different ports. Note that this problem only appeared if the core layout algorithm was an instance of classHierarchicLayout. -
IsolatedGroupComponentLayout: Fixed bug that caused edge labels that intersected with group nodes even though optionComponentLayout.considerLabelswas enabled. -
ComponentLayout,IsolatedGroupComponentLayout, andBusRouter: Fix a problem with rounding that could result in erroneous layouts in rare cases.
Documentation Viewer Improvements
- The detailed descriptions of the methods for event registration and de-registration were not displayed.
- The inheritance hierarchy of a type was not properly displayed.
- In the code generator, corrected the generated code for events.
- Fixed the display of the sidebar in pinned mode.
- The documentation viewer can now be opened from the file system even if third-party cookies are disabled.
yFiles for HTML 2.0.1
This maintenance release for yFiles for HTML 2.0 contains several brand-new demos, brings back most demos that were part of yFiles for HTML 1.3 but not of 2.0, and the GWT extension is available again. In addition, we corrected several errors and included small improvements.
There are a small number of incompatible API changes.
New Demos
- Business Process Model Demo
- An editor for Business Process Diagrams that features interactive editing, BPMN node styles and a specialized BPMN layout algorithm.
- Network Monitoring Demo
- Example of a monitoring tool for computer networks.
- Network Flow Demo
- Presents three network flow graph analysis algorithms that are applied on a network of water pipes. Flow algorithms can be applied to various other problem domains from everyday life, for example electricity/power, internet, and transportation.
- Transitivity Demo
- Shows how transitivity graph analysis algorithms can be applied to graphs to answer reachability questions. The demo presents two example graphs: the dependencies between the yFiles for HTML modules and the dependents and the dependencies of an npm package.
- Mindmap Demo
- A Mindmap viewer and editor.
- React Demo
- Shows a React component that renders the yFiles for HTML graph component.
- Loading and Bundling Demos
-
-
AMD Loading: Loads the yFiles module resources using the
requirefunction that is defined in the AMD loading standard. -
Script Loading: Loads the yFiles modules using
<script>tags instead of an AMD loader. - Browserify: Shows how to bundle the yFiles library in a Browserify project.
- webpack: Shows how to integrate the yFiles library in a webpack 2 project.
-
AMD Loading: Loads the yFiles module resources using the
- Demos Migrated from yFiles for HTML 1.3
-
- The Edge Label Placement demo shows how to place labels at the desired location with an automatic edge labeling algorithm.
- The Multi-Page Layout demo shows how this layout algorithm divides a large graph into several smaller graphs that each fits on a page.
- The GraphML demo provides a live view of a graph's GraphML representation.
- The Bridges demo shows edges with bridges that highlight the edge routes at intersection points.
-
The Clipboard demo shows different ways of using
GraphClipboardfor copy and paste operations. - The Context Menu demo shows context menus for nodes, other graph items, and the canvas background.
- The Drag and Drop demo shows how to enable drag and drop from a separate palette of node templates into the graph component.
- The File Operations demo shows various ways to open and save a graph to a GraphML file.
- The Data Table demo shows a node style and a label style that display data in a tabular fashion.
- The HTML Label Style demo shows how HTML markup can be used in labels with a custom label style implementation.
- The jQuery Sparklines demo shows how to integrate visualizations generated by a third-party library with a custom node style.
Improvements
View
-
Added a
yfiles_namespacetype definition to theyfiles-api.d.tsfile. This can be used to annotate the return value of the yFiles modules to improve code completion in IDEs like Visual Studio Code. -
Added a constructor for RGBA color values to
SolidColorFill,StrokeandGradientStop. -
CreateEdgeInputModenow respects the settingssnapBendsToSnapLinesandsnapBendAdjacentSegmentsofGraphSnapContext. It also handles grid snapping according to the configuration for snapping. -
Resizing a table row or column now respects the value of the
GraphEditorInputMode.adjustContentRectPolicyproperty. - Nodes are now always drawn above their target group during reparenting.
-
Fixed some incorrect usages of errors in
IGraph. -
GraphMLIOHandlerhas two new events,QueryTypeandQueryName, that allow fine-grained control over XML namespace writing and parsing for certain types. -
Added the property
Exception.innerExceptionwhich preserves the original exception if it was wrapped and re-thrown.
Layout
-
The method
LayoutExtensions.applyLayoutnow supports layouting tables. -
BalloonLayoutData,HierarchicLayoutData,LabelingData,OrthogonalLayoutData,SeriesParallelLayoutData, andTreeLayoutDatanow have anedgeLabelPreferredPlacementproperty which supports anItemMappingfor edge labels to provide aPreferredPlacementDescriptor. This can replace mappers registered with the keyLayoutGraphAdapter.EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DP_KEY. -
PartitionGridData: It is now sufficient to specify one of row mapping and column mapping. The unspecified one will automatically be set to 0, resulting in a single row or column being used. -
The
ItemMapping.mapperproperty is now automatically set on first read-access to the property, enabling more convenient use of the mapper without first having to instantiate a matching instance. -
HierarchicLayout: Slightly reduced the number of bends when integrated edge labeling is enabled. -
HierarchicLayout: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to orientationsLayoutOrientation.LEFT_TO_RIGHT,LayoutOrientation.RIGHT_TO_LEFTandLayoutOrientation.BOTTOM_TO_TOP. Geometry information registered with data providers with keysHierarchicLayout.ALTERNATIVE_GROUP_BOUNDS_DP_KEYandHierarchicLayout.ALTERNATIVE_EDGE_PATH_DP_KEYis now automatically rotated according to the specified layout orientation.
Demos
- Layout Styles demo: Added special substructure detection for organic layout (e.g., cycles, chains, stars, and parallel substructures).
- Hierarchic Grouping demo: Improved the stability of the layout.
Bugfixes
General
- Fixed rest arguments not working when named option parameters where used and debug type information was present at runtime.
- Fixed ES6-style subclassing of yFiles classes that implement additional interfaces.
-
Added the flag
yfiles.workaroundIE7766782that enables a workaround for the Internet Explorer JIT bug 7766782, which can cause class initialization errors when using the yFiles for HTML GWT Overlay in Internet Explorer, especially when the GWT Overlay is used in combination with Smart GWT (more information on browser issue workarounds).
View
- Fixed missing browser prefix of certain cursors.
-
Fixed visibility of scrollbar handles of
CanvasComponent. The handles were not displayed forScrollBarVisibility.ALWAYS. -
Added the flag
yfiles.workaroundCR701075that enables a workaround for occasional render issues in Chrome 57. This is due to Chrome 57 not properly rendering the applied transform matrix (more information on browser issue workarounds). The workaround is automatically enabled in the yFiles demo applications when opened in Chrome 57. -
CanvasComponent: Key events had no effect if the component was part of a shadow DOM. The component's div element always lost the focus on keydown. -
GraphModelManagerdidn't update the child groups if a new ContentGroup was set. -
Fixed a problem that caused the viewport of
GraphOverviewComponentbeing set to an incorrect value when the component was resized. -
GraphOverviewControl: Setting a newOverviewInputModenow updates theInputModeproperty accordingly. -
Instances of
GraphEditorInputModeandGraphViewerInputModewere not garbage collected due to a non-removed event listener in theclickInputMode. -
CreateEdgeInputModehad a broken edge preview after the input mode was uninstalled and reinstalled again. -
CreateEdgeInputModedidn't show the edge preview for edges between a node and one of its ancestors. -
Fixed several issues with orthogonal edge editing.
- When dragging the source/target port/node of an orthogonal edge, the bends created during the drag were not cleaned up after canceling the gesture by pressing the ESC key.
- Orthogonal edges could be made non-orthogonal by re-connecting the source port to the target port location (creating a self-loop), or vice versa.
- Fixed reparent highlighting when multiple nodes are reparented together.
-
Fixed a bug in the
DropInputModewhich prevented proper assignment to a specific drop data type. -
Fixed a bug in
StripeDropInputModethat could result in nodes being moved to a wrong stripe when a new stripe was created or an existing one relocated. -
Hiding
INodeSnapResultProviderorIBendSnapResultProviderfrom the lookup no longer leads to a crash when nodes or bends are moved. -
The parameter finder of
FreeEdgeLabelModelcould not place the label correctly for self-loops. Labels always appeared at the port location in this case. -
SmartEdgeLabelModel: Once again, labels at the first segment snap properly at the layout of the source node. Since 1.3.0.6, some snap positions were overlapping with the source node. -
SmartEdgeLabelModel: Edge label snap lines have been too short for some positions that are far away from the edge path. -
SmartEdgeLabelModel: An exception was thrown if the path of the corresponding edge contained bends that were close together or at the same location. -
Fixed incorrect default value attribute for
SandwichLabelModelparameters. - When a node and its parent group node were both selected and moved with the SHIFT key held down the node was erroneously reparented to the root.
- Fixed a bug that resulted in folders with empty size when manually creating groups and the folding view is configured to collapse group nodes by default.
-
IGraph.addLabelignored an explicitly specified preferred size if folding was enabled. -
FilteredGraphWrapperno longer re-checks its predicates when labels or ports are removed nor when properties of graph items are changed. This prevents inconsistent filtering when the filtering predicate changed recently and changes are made to the graph beforenodePredicateChangedoredgePredicateChangedhave been called. -
Some styles erroneously called
IRenderContext.childVisualRemovedafter the visual was removed instead of just before the removal. - Fixed dispose callback invocation of custom visuals.
-
PolylineEdgeStyle: Toggling the pen between dashed and solid styles did only work once. Then, the SVG path stayed at solid regardless of the pen's dash style. -
Fixed missing
TemplateBindings forlabelText,isFlippedandisUpsideDownfor styles of typeTemplateLabelStyleBase. -
Fixed a bug that might occur when changing wrapped styles in
CollapsibleNodeStyleDecorator,ShadowNodeStyleDecorator,NodeStyleLabelStyleAdapterandNodeStylePortStyleAdapter. -
Rendering of
BevelNodeStyleinset rectangle position was wrong when inset value was changed. -
Fixed icon placement in
IconLabelStyle. - Fixed uncaught errors in promises during GraphML loading despite providing reject handlers.
-
GraphML: Actually uses namespaces that have been registered with
GraphMLIOHandler.addNamespace. - GraphML: Enum values that are used across different yFiles platforms are written in PascalCase instead of all upper case with underscores.
- GraphML: Enum values are not written as shared reference anymore.
- GraphML: Updated GraphML schema location.
-
Explicit
Arrowelements in GraphML were sometimes read back incorrectly. The new deserialization propertySerializationProperties.parseArrowElementAsDefaultArrowcan be used to work around this issue. -
Fixed exception when calling
OrientedRectangle.resizewith a size.
Layout
-
Fixed
OrganicLayoutignoring thegroupNodeModesettings. -
Fixed null reference errors in some of the
LayoutDataimplementations that could happen if some of the mappings where accessed but were never really used in client code. -
AspectRatioTreeLayoutDatadid not register the correct values with the graph for the root placement and the subtree routing policy. -
AspectRatioTreeLayout.ROOT_PLACEMENT_DP_KEYis now of typeNodeDpKey<RootPlacement>. -
AspectRatioTreeLayout.SUBTREE_ROUTING_POLICY_DP_KEYis now of typeNodeDpKey<SubtreeArrangement>. -
HierarchicLayout: Fixed bug that may lead to too large group nodes if there are grouped edges. -
HierarchicLayout: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled. -
HierarchicLayout: Fixed bug that caused that the directedness of edges incident to groups wasn't considered correctly (seeHierarchicLayout.EDGE_DIRECTEDNESS_DP_KEY). -
OrganicLayoutandClassicOrganicLayout: Fixed bug that caused the algorithm to not consider the specified customGroupBoundsCalculator. -
MultiPageLayout: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes. -
CircularLayoutandRadialLayout: Fixed bug that caused that always all edges were bundled if bundling is enabled for at least one single edge. More precisely, propertyEdgeBundleDescriptor.isBundledwasn't considered correctly. -
SingleCycleLayout: Fixed bug that could lead to an error if edge bundling is enabled and a custom node sequencer is specified. -
CircularLayout: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled. -
EdgeRouter: Fixed rare error that was triggered when having multiple target port candidates, where at least one must be fixed. Furthermore, to trigger the exception it is necessary that the path search algorithm tries to perform an early exit due to maximum duration restrictions or a stop request viaAbortHandler.
Incompatible Changes
Breaking API Changes
-
LabelStyleDecorationInstaller,NodeStyleDecorationInstallerandSvgExport: Renamed propertymargintomargins. -
Renamed method
IconLabelStyleRenderer.getInnerStyleInsetstogetWrappedStyleInsets. -
Renamed the following protected methods to enable separate overrides in custom
subclasses
-
GraphInputMode.marqueeSelect(IInputModeContext, Rect)toonMarqueeSelect -
GraphInputMode.marqueeSelect(IInputModeContext, Rect, IEnumerable, Predicate)toonMarqueeSelectItems -
NavigationInputMode.setCurrentItem(GraphComponent, IModelItem)toonSetCurrentItem -
GraphClipboard.copy(IGraph, Predicate, IGraph, INode, Callback)toonCopy -
GraphClipboard.paste(IGraph, Predicate, IGraph, INode, Callback, Predicate)toonPaste
-
-
Removed property
InteractiveOrganicLayout.automaticStructureUpdatesince this couldn't be used withLayoutExecutororLayoutGraphAdapter. -
Removed property
CanvasComponent.enabledsince it had the same effect as theautoDragproperty. -
Removed property
CanvasComponent.autoMouseWheelZoomsince it had no effect anyway. It was replaced by themouseWheelBehaviorproperty in release 2.0. -
Removed property
CanvasComponent.editablesince it had no effect on almost all input modes anyway. The preferred way to disable editing is usingGraphViewerInputModeorGraphEditorInputModewith suitable settings. -
Removed unused enum
yfiles.router.ChannelOrientation. -
VisualCachingPolicy.ALWAYSreplaces bothVisualCachingPolicy.WEAKandVisualCachingPolicy.STRONG. These two had the same effect. -
Removed optional constructor initialization parameters of type
Object. Affected are thetag/styleTagconstructor parameters ofDefaultGraphand thetemplate styles. -
Changed some API members of the
yfiles.graphml.Propertytype which is very rarely used in customer code.
Behavior Changes
-
IGraphand its implementations now always throw an ArgumentError for operations on elements which are not in the graph (was: ArgumentError, ArgumentOutOfRangeError, IllegalOperationError). -
IGraphand its implementations now always throw an IllegalOperationError for operations which are not allowed (was: ArgumentError). -
GraphML parsing: For properties which are renamed using the
GraphMLAttributeonly the explicitly set name is accepted. The property's actual name is no longer accepted as fallback. -
HierarchicLayoutmay now place source/target labels in layers that contain common nodes. In previous versions such labels were always placed in separate layers which often led to less compact drawings with superfluous bends. -
SingleCycleLayout.nodeSequencernow allows to specifynullto return to the default sequencer. In previous versions, specifyingnullled to an error. -
HierarchicLayout: Geometry information registered with data providers with keysHierarchicLayout.ALTERNATIVE_GROUP_BOUNDS_DP_KEYandHierarchicLayout.ALTERNATIVE_EDGE_PATH_DP_KEYis now automatically rotated according to the specified layout orientation. This fixes unstable from-sketch behavior in incremental layout mode when using an orientation other than top-to-bottom.
yFiles for HTML 2.0.0.1
This is the first bugfix release for 2.0. It focuses on new demos, performance improvements, and bugfixes. It contains one minor incompatible API change and two incompatible interaction behavior changes.
Most Notable Changes
- Better Layout Performance
- Performance improvements for most layout and analysis algorithms. Most layout algorithms are now between 15% and 70% faster than their 1.3 version counterparts. Speed-up varies depending on graph structure, settings, and graph size.
- Better GraphML I/O Performance
- Up to 80% improved writing performance and 25% improved reading performance in bad-case scenarios.
- Style Decorators Demo
- This demo shows decorator styles for nodes, labels, and edges that add a visual decoration to a base visualization, for example a status icon to a rectangular shape.
- Incremental Hierarchic Demo
- This demo shows the incremental mode of the hierarchic layout algorithm.
- HTML Popup Demo
- This demo shows pop-up panels that display additional information about a clicked node or edge. In general, such panels can contain any HTML elements.
Improvements
-
The class framework now also understands classes generated by the TypeScript compiler if the compiler target is
ES5. -
SvgVisualnow has two static members for helping with the efficient implementation of SVG transform manipulations:SvgVisual.setTranslateandSvgVisual.setScale -
The performance of
StripeControlStylewas improved substantially. - The AMD meta modules now only ever load the effective modules, resulting in less requests made for AMD loading.
-
The simple
Promiseshim included with the library now allows for chaining.catchcalls. -
The
yfiles-typeinfo.jsdebug helper code now adds theyfiles.debug()API. - On MacOS, the multi-selection feature, the pan viewport feature, and the force bend creation feature now also accept Command mouse clicks as an alternative gesture. This avoids conflicts with the default gesture to open the context menu, namely Ctrl mouse clicks.
- The default keyboard shortcuts for MacOS devices have been updated to follow MacOS conventions. Where previously the Ctrl key needed to be pressed for many of the default keyboard shortcuts, now the Command key will be used.
- The default keyboard shortcuts for cut, copy, and paste have been updated to also react to Shift+Delete, Ctrl+Insert, and Shift+Insert respectively. The exact behavior can be fine-tuned via resource customization.
Demo Improvements
-
The
require.jssample implementation for the demos now properly understands the AMDpathsconfiguration known from requirejs.org's implementation. -
In most demos, all JavaScript initialization code was moved to the main JavaScript file from the index.html
file. Note that if our simple
requireimplementation is used for loading the demos, the improved version of the same file is required now, too. - The demos now show a friendly warning if viewed in a browser that does not natively support ES6. It explains how to run the required pre-compilation step, first.
- The performance of the graph item styles used in the demos was improved.
- Visualization of self-loops of the demo edge style was improved.
- The layout style demo now show-cases the integrated edge-labeling feature for tree layouts.
- Many more fixes and improvements in the demos.
Bugfixes
- Loading a new GraphML file could result in an error when loading was initiated from inside a folder node.
- Table columns were read in the reverse order from GraphML. The file content itself is correct since GraphML writing was not affected.
- Subclassing yFiles types did not work properly for the second level of subclasses.
- Subclassing a yFiles type with abstract members and implementing interfaces at the same time did not work.
- Using folding on a filtered graph could result in errors, for example after calculating an automatic layout.
-
The TypeScript demo did not properly compile if
tsc'snoImplicitAnyoption was set. -
GraphML serialization of
ArcEdgeStyledid not work properly. -
The JavaScript code completion file in
ide-supportdid not properly mark constructors for generic types, possibly resulting in warnings in IDEs. -
The simple
Promiseshim included with the library could throw an error during promise resolution. -
Calling
contains(p:Point)on anIRectangleother than aRectdid not work. -
The simple constructor of
MapperInputHandlerdid not set the value type correctly. -
CircularLayoutproduced self-intersecting edges when edge bundling was enabled.
Incompatible Changes
-
The three static helper methods on
GraphItemTypeswere poorly named and the methodcontainsdid not behave according to the documentation.containsis now calledenumerableContainsTypes,notContainsis now calledenumerableNotContainsTypes, andisis now calleditemIsOfTypes. - On MacOS systems where previously the Ctrl key needed to be pressed for many of the default keyboard shortcuts, now the Command key will be used instead. This behavior can be fine-tuned via resource customization.
- Default keyboard shortcuts for cut, copy, and paste now also react to Shift+Delete, Ctrl+Insert, and Shift+Insert respectively. This behavior can be fine-tuned via resource customization.
yFiles for HTML 2.0
Major New Features Added
- The whole API has been thoroughly reviewed and refactored resulting in a massively improved user/developer experience. New features can be understood more quickly and are easier to implement on top of the existing APIs. Consistent API names and hierarchies can be memorized more easily. Infrequently used and inconvenient APIs have been removed from the public API which means a leaner framework. This results in a much improved learning curve.
- Improved the overall JavaScript experience throughout the API with function overloads, optional arguments, and option parameter objects. This adds more flexibility while at the same time enhances developer productivity.
- The API´s compatibility to third party class frameworks was improved, enabling convenient and efficient use of EcmaScript 6 and TypeScript classes. Not having to use the old class-framework anymore improves tooling support and enhances developer productivity.
- The API supports modern EcmaScript concepts and types like Promises and a collections API that is inline with the most recent EcmaScript Array and Iterable API.
- The performance of the view component has been improved on average between 20% and 35% for larger graphs where previously 60 FPS could not be achieved.
- The developer's guide has been rewritten and revised almost entirely. A lot more code examples and a whole set of new chapters that deal with the customization of the various features provided enable developers to more easily and more quickly implement their requirements. The layout documentation now also contains sample graphs that visually show the effects of the various settings.
- The yFiles modules have been restructured and are now smaller in total size. The complete layout demo now requires only slightly more than 1.5 megabytes of compressed code to be transferred to the client when loaded for the first time. In addition to that module dependencies have been optimized so that for many use-cases less modules need to be loaded for an application to work, resulting in quicker overall startup times.
- Support for Sankey diagrams. These diagrams visualize flow quantity between entities, for example cost or energy flow.
-
Support for edge bundling. 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:
Circular Layout: Edge bundling is applied to edges of the same circle.Radial Layout: Edge bundling is applied to non-tree edges.TreeReductionStage: Edge bundling is applied to non-tree edges.
-
HierarchicLayouthas now proper support for incremental layouts of groups with changing bounds. This is especially useful for hierarchic layout of graphs with expandable and collapsible groups. The new Hierarchic Grouping demo shows the improved behavior. -
HierarchicLayoutnow supports port grouping. Edges are bundled at their ports, but routed independently. SeePortConstraintKeys.SOURCE_PORT_GROUP_ID_DP_KEYandPortConstraintKeys.TARGET_PORT_GROUP_ID_DP_KEY. -
HierarchicLayoutnow allows to specify the directedness of edges, seeHierarchicLayout.EDGE_DIRECTEDNESS_DP_KEY. 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. -
HierarchicLayoutnow supports edges with specified thickness values. Minimum distances in the layout will consider these thicknesses, seeHierarchicLayout.EDGE_THICKNESS_DP_KEY. -
HierarchicLayoutnow 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. -
Added preferred placement specifiers
LabelLayoutConstants.PLACE_AT_SOURCE_PORTandLabelLayoutConstants.PLACE_AT_TARGET_PORTfor edge labels which express that the label should be placed directly at the source/target port of the edge. Currently, the specifiers are only considered by the integrated labeling of theHierarchicLayout. -
OrganicLayoutnow supports the detection of regular substructures in the graph and applies a specific layout style to them such that they can be better recognized. SeeOrganicLayout.ChainSubstructureStyle,OrganicLayout.StarSubstructureStyle,OrganicLayout.CycleSubstructureStyle, andOrganicLayout.ParallelSubstructureStyle. -
TreeReductionStagenow supports the automatic placement of labels of non-tree edges. Users do not need to take care of such edge labels themselves after using a tree layout algorithm on a non-tree input graph in conjunction with the reduction stage. See propertiesTreeReductionStage.NonTreeEdgeLabelingAlgorithmandTreeReductionStage.NonTreeEdgeLabelSelectionKey. -
SeriesParallelLayoutnow supports the automatic placement of labels of non-series-parallel edges. Users do not need to take care of such edge labels themselves after running the algorithm with a non-series-parallel input graph. See propertiesSeriesParallelLayout.NonSeriesParallelEdgeLabelingAlgorithmandSeriesParallelLayout.NonSeriesParallelEdgeLabelSelectionKey. - New API for working with the planar embedding of planar graphs. The API allows for easy iteration of the faces, darts, and consecutive edges of the embedding.
Major New Demos Added
- The 2.0 release contains a sophisticated new demo that shows the graph analysis features provided by yFiles for HTML. This demo also shows how to use modern CSS animations and transitions to achieve a better user experience.
- All provided demos have been refactored to not make use of the old demo framework anymore, making it much easier to reuse code from the demos in custom applications.
- The demos have been rewritten using EcmaScript 6 and a conversion tool has been added that shows how to code in EcmaScript 6 and deploy to older browsers (only Internet Explorer is affected) that do not support this level of EcmaScript.