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 |
|---|---|---|
Animator |
destroy |
stop |
CanvasComponent |
globalToLocal |
toViewFromPage |
CanvasComponent |
localToGlobal |
toPageFromView |
CanvasComponent |
mouseCaptureEnabled |
mouseCapture |
SvgExport |
getClip |
createClip |
DiscreteEdgeLabelLayoutModel |
autoRotationEnabled |
autoRotation |
EdgePathLabelModel |
autoRotationEnabled |
autoRotation |
EdgeSegmentLabelModel |
autoRotationEnabled |
autoRotation |
KeyEventType |
PRESSED |
DOWN |
KeyEventType |
TYPED |
PRESS |
KeyEventType |
RELEASED |
UP |
KeyEventRecognizers |
DELETE_PRESSED |
DELETE_DOWN |
KeyEventRecognizers |
ESCAPE_PRESSED |
ESCAPE_DOWN |
KeyEventRecognizers |
ESCAPE_TYPED |
ESCAPE_PRESS |
KeyEventRecognizers |
ESCAPE_RELEASED |
ESCAPE_UP |
KeyEventRecognizers |
KEY_PRESSED |
KEY_DOWN |
KeyEventRecognizers |
KEY_TYPED |
KEY_PRESS |
KeyEventRecognizers |
KEY_RELEASED |
KEY_UP |
KeyEventRecognizers |
ALT_PRESSED |
ALT_IS_DOWN |
KeyEventRecognizers |
CONTROL_PRESSED |
CTRL_IS_DOWN |
KeyEventRecognizers |
SHIFT_PRESSED |
SHIFT_IS_DOWN |
KeyEventRecognizers |
META_PRESSED |
META_IS_DOWN |
LabelLayoutTranslator |
autoFlippingEnabled |
autoFlipping |
MouseEventRecognizers |
LEFT_PRESSED |
LEFT_DOWN |
MouseEventRecognizers |
RIGHT_PRESSED |
RIGHT_DOWN |
MouseEventRecognizers |
PRESSED |
DOWN |
MouseEventRecognizers |
LEFT_RELEASED |
LEFT_UP |
MouseEventRecognizers |
RIGHT_RELEASED |
RIGHT_UP |
MouseEventRecognizers |
RELEASED |
UP |
MouseEventRecognizers |
CLICKED |
CLICK |
MouseEventRecognizers |
DRAGGED |
DRAG |
MouseEventRecognizers |
ENTERED |
ENTER |
MouseEventRecognizers |
EXITED |
LEAVE |
MouseEventRecognizers |
LEFT_CLICKED |
LEFT_CLICK |
MouseEventRecognizers |
LEFT_DOUBLE_CLICKED |
LEFT_DOUBLE_CLICK |
MouseEventRecognizers |
LEFT_DRAGGED |
LEFT_DRAG |
MouseEventRecognizers |
MIDDLE_CLICKED |
MIDDLE_CLICK |
MouseEventRecognizers |
MIDDLE_DOUBLE_CLICKED |
MIDDLE_DOUBLE_CLICK |
MouseEventRecognizers |
MIDDLE_DRAGGED |
MIDDLE_DRAG |
MouseEventRecognizers |
MOVED |
MOVE |
MouseEventRecognizers |
MOVED_OR_DRAGGED |
MOVE_OR_DRAG |
MouseEventRecognizers |
MULTI_CLICKED |
MULTI_CLICK |
MouseEventRecognizers |
RIGHT_CLICKED |
RIGHT_CLICK |
MouseEventRecognizers |
RIGHT_DOUBLE_CLICKED |
RIGHT_DOUBLE_CLICK |
MouseEventRecognizers |
RIGHT_DRAGGED |
RIGHT_DRAG |
ReparentStripePositionHandler |
createSourceGhostVisualization |
createSourceGhost |
ReparentStripePositionHandler |
createTargetGhostVisualization |
createTargetGhost |
ReparentStripePositionHandler |
updateSourceVisualization |
updateSourceGhost |
ReparentStripePositionHandler |
updateTargetVisualization |
updateTargetGhost |
ReparentStripePositionHandler |
updateTargetVisualizationBounds |
updateTargetGhostBounds |
ShowFocusPolicy |
WHEN_FOCUSED |
ONLY_WHEN_FOCUSED |
SingleCycleLayout |
fromSketchModeEnabled |
fromSketchMode |
SliderEdgeLabelLayoutModel |
autoRotationEnabled |
autoRotation |
TouchEventRecognizers |
TOUCH_DOUBLE_TAPPED_PRIMARY |
TOUCH_DOUBLE_TAP_PRIMARY |
TouchEventRecognizers |
TOUCH_DOUBLE_TAPPED_SECONDARY |
TOUCH_DOUBLE_TAP_SECONDARY |
TouchEventRecognizers |
TOUCH_ENTERED_PRIMARY |
TOUCH_ENTER_PRIMARY |
TouchEventRecognizers |
TOUCH_ENTERED_SECONDARY |
TOUCH_ENTER_SECONDARY |
TouchEventRecognizers |
TOUCH_EXITED_PRIMARY |
TOUCH_LEAVE_PRIMARY |
TouchEventRecognizers |
TOUCH_EXITED_SECONDARY |
TOUCH_LEAVE_SECONDARY |
TouchEventRecognizers |
TOUCH_LONG_PRESSED_PRIMARY |
TOUCH_LONG_PRESS_PRIMARY |
TouchEventRecognizers |
TOUCH_LONG_PRESSED_SECONDARY |
TOUCH_LONG_PRESS_SECONDARY |
TouchEventRecognizers |
TOUCH_MOVED_PRIMARY |
TOUCH_MOVE_PRIMARY |
TouchEventRecognizers |
TOUCH_MOVED_SECONDARY |
TOUCH_MOVE_SECONDARY |
TouchEventRecognizers |
TOUCH_MULTI_TAPPED_PRIMARY |
TOUCH_MULTI_TAP_PRIMARY |
TouchEventRecognizers |
TOUCH_MULTI_TAPPED_SECONDARY |
TOUCH_MULTI_TAP_SECONDARY |
TouchEventRecognizers |
TOUCH_TAPPED_PRIMARY |
TOUCH_TAP_PRIMARY |
TouchEventRecognizers |
TOUCH_TAPPED_SECONDARY |
TOUCH_TAP_SECONDARY |
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.animateScrollTomethod-
Use the
ZoomToAnimatedmethods instead. CanvasComponent.GotFocusandLostFocusevents-
These just duplicated the focus and blur events on the CanvasComponent.div element. Use these events instead.
CanvasComponent.MouseWheelZoomFactorChanged,MouseWheelScrollFactorChanged,AutoDragChangedandHitTestRadiusChangedevents-
These events are unneeded since library code does not change the corresponding properties.
CollapsibleNodeStyleDecorator.createSelectionInstallerprotected method-
Use the
NodeDecorator.selectionDecoratordecorator instead. GraphEditorInputMode.createMoveUnselectedInputModemethod-
Use the
moveUnselectedInputModeproperty instead. GraphEditorInputMode.shouldClickCreateNodeprotected method-
Override the
clickCreateNodemethod instead. GraphMLSupport.getGraphMLIOHandlerprotected method-
Use the
graphMLIOHandlerproperty instead. GraphModelManager.useHierarchicEdgeNestingproperty-
Use either
HierarchicNestingPolicy.NODES_AND_EDGESto enable edge nesting or any other policy to disable it. GraphModelManager.useHierarchicNodeNestingproperty-
Use
HierarchicNestingPolicy.NONEto disable node nesting and eitherHierarchicNestingPolicy.NODESorHierarchicNestingPolicy.NODES_AND_EDGESdepending on yourGraphModelManager.useHierarchicEdgeNestingsetting to use nesting. ITable.relativeLocationproperty-
Use the
ITable.insetswith corresponding left and top values instead. LayoutGraphAdapter.applyLayoutstatic method-
Use the
IGraph.applyLayoutmethod instead. MoveLabelInputMode.createLabelHitTestableprotected method-
Set the
MoveLabelInputMode.hitTestableproperty instead. MoveViewportInputMode.inertiaDamping,MoveViewportInputMode.inertiaFactorandMoveViewportInputMode.inertiaThresholdproperties-
Use the new
inertiaDurationproperty instead. InteractiveOrganicLayout.workingRatioproperty-
Had no usages.
TextDecorationsenum-
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.reducemethod 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.measureTextmethod is nowRectinstead ofSize. -
The
CanvasComponent.sizeChangedTimerIntervalproperty in now is a proper yfiles.lang.TimeSpaninstead of a simple number. -
CanvasComponent.dragSizeno longer applies to touch input. Use the new propertydragSizeTouchfor controlling the drag size for touch input. -
The
CanvasComponent.hitTestRadiusno longer applies to touch input. Use the new propertyhitTestRadiusTouchfor controlling the hit test radius for touch input. -
ClickInputModenow dispatches the more specific eventsLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClickedbefore the generalClickedandDoubleClickedevents. -
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
AnchoredPortLocationModelExtensionto the GraphML compatibility demo where it was really needed. -
The
CanvasClickedevent now provides theGraphEditorInputModeor theGraphViewerInputModeas parent input mode in theContextproperty of itsClickEventArgs. -
ItemClickedEventArgsnow extendsClickEventArgs. -
CreateEdgeInputMode’s `EdgeCreatormight 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
StripeSubregion.targetTableNodeproperty is now read-only. -
MoveLabelInputMode: the moved label now is visualized as a preview instead of a symbolic rectangle. Set theVisualizationproperty toVisualization.Ghostto restore the old mode. -
The
CreateEdgeInputMode.ShowPortCandidatesproperty has now the enum typeShowPortCandidatesinstead ofbooleanand allows for a more specific setting. -
The
OverviewInputMode.autoMouseWheelZoomproperty is superseded by the newmouseWheelBehaviorproperty. -
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.createTableAnimationinstead. -
yfiles.graph.Table.getCellBounds, useyfiles.graph.ITable.getCellBoundsinstead. -
yfiles.graph.Table.placeNodeInCell, useyfiles.graph.ITable.placeNodeInCellinstead. -
yfiles.layout.PartitionLayout.createPolylineInterEdgeRouter, useyfiles.layout.IPartitionInterEdgeRouter.createPolylineInterEdgeRouterinstead.
-
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.