documentationfor yFiles for HTML 3.0.0.3

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 to lookupSourcePortCandidateProvider

  • CreateEdgeInputMode.getTargetPortCandidateProvider(IPortCandidate, IPortOwner, Point) renamed to lookupTargetPortCandidateProvider

  • IPortCandidateProvider.getSourcePortCandidates(IInputModeContext) renamed to getAllSourcePortCandidates

  • IPortCandidateProvider.getTargetPortCandidates(IInputModeContext) renamed to getAllTargetPortCandidates

  • GraphClipboard.paste(IGraph, IGraphSelection) renamed to pasteAndSelect

  • GraphCopier.copyNode(IGraph, IGraph, INode, INode, Point) renamed to copyChildNode

Removed API Members

CanvasComponent.animateScrollTo method

Use the ZoomToAnimated methods instead.

CanvasComponent.GotFocus and LostFocus events

These just duplicated the focus and blur events on the CanvasComponent.div element. Use these events instead.

CanvasComponent.MouseWheelZoomFactorChanged, MouseWheelScrollFactorChanged, AutoDragChanged and HitTestRadiusChanged 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 either HierarchicNestingPolicy.NODES or HierarchicNestingPolicy.NODES_AND_EDGES depending on your GraphModelManager.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 and MoveViewportInputMode.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 now Rect instead of Size.

  • 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 property dragSizeTouch for controlling the drag size for touch input.

  • The CanvasComponent.hitTestRadius no longer applies to touch input. Use the new property hitTestRadiusTouch for controlling the hit test radius for touch input.

  • ClickInputMode now dispatches the more specific events LeftClicked, RightClicked, LeftDoubleClicked and RightDoubleClicked before the general Clicked and DoubleClicked 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 the GraphEditorInputMode or the GraphViewerInputMode as parent input mode in the Context property of its ClickEventArgs.

  • ItemClickedEventArgs now extends ClickEventArgs.

  • CreateEdgeInputMode’s `EdgeCreator might receive null as targetPortCandidate 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 the Visualization property to Visualization.Ghost to restore the old mode.

  • The CreateEdgeInputMode.ShowPortCandidates property has now the enum type ShowPortCandidates instead of boolean and allows for a more specific setting.

  • The OverviewInputMode.autoMouseWheelZoom property is superseded by the new mouseWheelBehavior 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, use yfiles.view.IAnimation.createTableAnimation instead.

    • yfiles.graph.Table.getCellBounds, use yfiles.graph.ITable.getCellBounds instead.

    • yfiles.graph.Table.placeNodeInCell, use yfiles.graph.ITable.placeNodeInCell instead.

    • yfiles.layout.PartitionLayout.createPolylineInterEdgeRouter, use yfiles.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.