Migrating to 2.1 from 2.0.1
See the change log for a list of all incompatible changes.
Changed Module Dependencies
The module yfiles/view-graphml
no longer depends on yfiles/view-table
and yfiles/view-editor
.
If you use the GraphML feature and the table or editor feature, make sure that you explicitly require
the corresponding module(s).
Renamed API Members
Type | Member name in 2.0.1 | Member name in 2.1 |
---|---|---|
All occurrences of cleanup
have been consistently renamed to cleanUp
in any API name.
The overloaded methods with the following signatures have been renamed to make overriding easier. The other overload with the same name is still part of the API.
CreateEdgeInputMode.getSourcePortCandidateProvider(IPortOwner)
renamed tolookupSourcePortCandidateProvider
CreateEdgeInputMode.getTargetPortCandidateProvider(IPortCandidate, IPortOwner, Point)
renamed tolookupTargetPortCandidateProvider
IPortCandidateProvider.getSourcePortCandidates(IInputModeContext)
renamed togetAllSourcePortCandidates
IPortCandidateProvider.getTargetPortCandidates(IInputModeContext)
renamed togetAllTargetPortCandidates
GraphClipboard.paste(IGraph, IGraphSelection)
renamed topasteAndSelect
GraphCopier.copyNode(IGraph, IGraph, INode, INode, Point)
renamed tocopyChildNode
Removed API Members
CanvasComponent.animateScrollTo
method- Use the
ZoomToAnimated
methods instead. CanvasComponent.GotFocus
andLostFocus
events- These just duplicated the focus and blur events on the CanvasComponent.div element. Use these events instead.
CanvasComponent.MouseWheelZoomFactorChanged
,MouseWheelScrollFactorChanged
,AutoDragChanged
andHitTestRadiusChanged
events- These events are unneeded since library code does not change the corresponding properties.
CollapsibleNodeStyleDecorator.createSelectionInstaller
protected method- Use the
NodeDecorator.selectionDecorator
decorator instead. GraphEditorInputMode.createMoveUnselectedInputMode
method- Use the
moveUnselectedInputMode
property instead. GraphEditorInputMode.shouldClickCreateNode
protected method- Override the
clickCreateNode
method instead. GraphMLSupport.getGraphMLIOHandler
protected method- Use the
graphMLIOHandler
property instead. GraphModelManager.useHierarchicEdgeNesting
property- Use either
HierarchicNestingPolicy.NODES_AND_EDGES
to enable edge nesting or any other policy to disable it. GraphModelManager.useHierarchicNodeNesting
property- Use
HierarchicNestingPolicy.NONE
to disable node nesting and eitherHierarchicNestingPolicy.NODES
orHierarchicNestingPolicy.NODES_AND_EDGES
depending on yourGraphModelManager.useHierarchicEdgeNesting
setting to use nesting. ITable.relativeLocation
property- Use the
ITable.insets
with corresponding left and top values instead. LayoutGraphAdapter.applyLayout
static method- Use the
IGraph.applyLayout
method instead. MoveLabelInputMode.createLabelHitTestable
protected method- Set the
MoveLabelInputMode.hitTestable
property instead. MoveViewportInputMode.inertiaDamping
,MoveViewportInputMode.inertiaFactor
andMoveViewportInputMode.inertiaThreshold
properties- Use the new
inertiaDuration
property instead. InteractiveOrganicLayout.workingRatio
property- Had no usages.
TextDecorations
enum- Was an unused duplicate of
TextDecoration
. - The overloaded methods with the following signatures have been removed to make overriding easier. The other overload with the same name is still part of the API and should be used instead.
CreateEdgeInputMode.createEdge()
CreateEdgeInputMode.getSourcePortCandidate(Point)
GraphClipboard.paste(IInputModeContext, IGraph, predicate, callback, predicate)
GraphClipboard.paste(IGraph, predicate, callback)
PortDefaults.getStyleInstance()
Deprecated API Members
HierarchicLayoutData.layerConstraintFactory
property and method HierarchicLayout.createLayerConstraintFactory(IGraph)
Use the new layerConstraints
property instead.
HierarchicLayoutData.sequenceConstraintFactory
property and method HierarchicLayout.createSequenceConstraintFactory(IGraph)
Use the new sequenceConstraints
property instead.
Other API Changes
- The
IEnumerable.reduce
method now uses the same argument order and semantics as the default Array.prototype.reduce method. This means the initialValue parameter is now the (optional) last parameter, and the first element of the enumerable becomes the initialValue if that is undefined. Previously, these two parameters were reversed. - The return type of the
TextRenderSupport.measureText
method is nowRect
instead ofSize
. - The
CanvasComponent.sizeChangedTimerInterval
property in now is a proper yfiles.lang.TimeSpan
instead of a simple number. CanvasComponent.dragSize
no longer applies to touch input. Use the new propertydragSizeTouch
for controlling the drag size for touch input.- The
CanvasComponent.hitTestRadius
no longer applies to touch input. Use the new propertyhitTestRadiusTouch
for controlling the hit test radius for touch input. ClickInputMode
now dispatches the more specific eventsLeftClicked
,RightClicked
,LeftDoubleClicked
andRightDoubleClicked
before the generalClicked
andDoubleClicked
events.- The stroke thickness is now considered for calculation of the origin of the default arrow renderings. This can result in a slightly different rendering of the arrows.
- Moved
AnchoredPortLocationModelExtension
to the GraphML compatibility demo where it was really needed. - The
CanvasClicked
event now provides theGraphEditorInputMode
or theGraphViewerInputMode
as parent input mode in theContext
property of itsClickEventArgs
. ItemClickedEventArgs
now extendsClickEventArgs
.CreateEdgeInputMode’s `EdgeCreator
might receive null astargetPortCandidate
parameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null.- The
StripeSubregion.targetTableNode
property is now read-only. MoveLabelInputMode
: the moved label now is visualized as a preview instead of a symbolic rectangle. Set theVisualization
property toVisualization.Ghost
to restore the old mode.- The
CreateEdgeInputMode.ShowPortCandidates
property has now the enum typeShowPortCandidates
instead ofboolean
and allows for a more specific setting. - The
OverviewInputMode.autoMouseWheelZoom
property is superseded by the newmouseWheelBehavior
property. - The following static methods were available in 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
instead.yfiles.graph.Table.getCellBounds
, useyfiles.graph.ITable.getCellBounds
instead.yfiles.graph.Table.placeNodeInCell
, useyfiles.graph.ITable.placeNodeInCell
instead.yfiles.layout.PartitionLayout.createPolylineInterEdgeRouter
, useyfiles.layout.IPartitionInterEdgeRouter.createPolylineInterEdgeRouter
instead.
TypeScript Definition File Changes
The TypeScript definition file now declares the modules of the ES module variant of the library instead of the UMD module variant. The ES Modules section of the Developer’s Guide gives an overview of the available modules.