- I
Remarks
See Also
Developer's Guide
Demos
- Shows the graph editing features of the graph component.
Members
Constructors
Creates a new instance that is optionally bound to the provided graphComponent.
graphComponent is provided, in order for this instance to be useful, either the graphComponent or the graph property need to be set.Parameters
- graphComponent?: GraphComponent
- The graphComponent to bind this instance to. If omitted, the property needs to be set to initialize the component.
Creates a new instance of GraphOverviewComponent using the HTMLElement that is optionally bound to the provided graphComponent.
HTMLElement that is optionally bound to the provided graphComponent.graphComponent is provided, in order for this instance to be useful, either the graphComponent or the graph property need to be set.Parameters
- htmlElement: HTMLElement
- The element to use for holding the canvas.
- graphComponent?: GraphComponent
- The optional graph control to bind this instance to. If omitted, the property needs to be set to initialize the component.
Throws
- Exception ({ name: 'ArgumentError' })
- if the
htmlElementelement is already used by another component.
Creates a new instance of GraphOverviewComponent using the HTMLElement that is specified by the selector and that is optionally bound to the provided graphComponent.
HTMLElement that is specified by the selector and that is optionally bound to the provided graphComponent.graphComponent is provided, in order for this instance to be useful, either the graphComponent or the graph property need to be set.Parameters
- selector: string
- The CSS selector or id for an existing
HTMLElement. - graphComponent?: GraphComponent
- The graphComponent to bind this instance to. If omitted, the property needs to be set to initialize the component.
Throws
- Exception ({ name: 'ArgumentError' })
- if the
HTMLElementspecified by theselectoris already used by another component.
Properties
Gets or sets a combination of viewport changes that should be performed in an animated fashion.
Property Value
Examples
graphComponent.animatedViewportChanges =
ViewportChanges.MOUSE_WHEEL_ZOOM | ViewportChanges.ZOOM_COMMANDSee Also
Developer's Guide
API
- getViewportAnimationDuration
Defined in
CanvasComponent.animatedViewportChangesGets the aria-live region of the CanvasComponent.
Elements appended to this region are read by screen readers.
The live region is initialized with aria-live="polite" and aria-atomic="false" and added to the DOM upon first access.
Defined in
CanvasComponent.ariaLiveRegionDefined in
CanvasComponent.autoScrollOnBoundsGets or sets the distance from the edge of the viewport, in which auto-scrolling should happen.
If the mouse is being dragged within the padding of the control specified using this property, the control will automatically scroll.
The default is (10,10,10,10)
Property Value
See Also
Defined in
CanvasComponent.autoScrollPaddingGets an implementation of ICanvasContext that describes the state of this CanvasComponent.
Property Value
true if all keyboard input is captured; otherwise, false.Defined in
CanvasComponent.captureAllKeyboardInputProperty Value
true if all pointer input is captured; otherwise, false.Defined in
CanvasComponent.captureAllPointerInputGets or sets the world coordinate at the center of the control.
Examples
console.log(
`Current center: ${graphComponent.center} , and view point: ${graphComponent.viewPoint}`,
)
graphComponent.center = new Point(150, 50)
console.log(`New center is: ${graphComponent.center}`)
console.log(
`The view point has also changed: ${graphComponent.viewPoint}`,
)See Also
Defined in
CanvasComponent.centerGets or sets an event recognizer that determines whether zooming with the mouse wheel should zoom to the center of the view instead of the mouse location.
Examples
graphComponent.centerZoomEventRecognizer = EventRecognizers.SHIFT_IS_DOWNgraphComponent.centerZoomEventRecognizer = EventRecognizers.NEVERSee Also
Developer's Guide
Gets and sets the rectangle in world coordinates that holds the contents.
See Also
Developer's Guide
Defined in
CanvasComponent.contentBoundsGets and sets the margins in view coordinates that should be used by the fitContent operation or zoom commands which zoom to a given rectangle.
This influences the amount of visible whitespace in the view coordinate system around the contentBounds after a fitContent operation. The default value is (10,10,10,10).
For the ZOOM_TO_CURRENT_ITEM on a GraphComponent, the margins define the visible whitespace around the rectangle in which the respective item is centered. This way it is also possible to get asymmetric whitespace around the item. The same applies to the ZOOM command with a Rect, IBoundsProvider, or an ILookup returning an IBoundsProvider as parameter.
Note limits that are enforced by the viewportLimiter have a higher priority than these margins.
The default is (10,10,10,10)
See Also
Developer's Guide
Defined in
CanvasComponent.contentMarginswindow.devicePixelRatio for crisp rendering on high DPI devices.Defined in
CanvasComponent.devicePixelRatioGets or sets the value of the double-click time.
Defined in
CanvasComponent.doubleClickTimeGets the dropTarget associated with this instance.
Property Value
Defined in
CanvasComponent.dropTargetGets a value indicating whether this CanvasComponent is currently focused.
Gets or sets the graph that is rendered in the overview.
Gets or sets the client control that will be used to retrieve the graph from and that will be used for navigating.
Gets or sets the IObjectRenderer<IGraph> that is used to render the overview.
See Also
Developer's Guide
Property Value
true if this instance has mouse capture; otherwise, false.Defined in
CanvasComponent.hasMouseCaptureGets or sets the radius of the area around the pointer in view coordinates in which an IHitTestable may lie to be considered a valid hit.
This value converted into world coordinates can be queried from within the IHitTestable implementation from the hitTestRadius property, which automatically takes the zoom level into account. Note that the context's property automatically switches between the value for mouse, touch, and stylus, based on the last input event.
The default value is 3 for MOUSE, 6 for PEN, and 12 for TOUCH.
See Also
Developer's Guide
Defined in
CanvasComponent.hitTestRadiusGets or sets the visibility policy for the horizontal scrollbar.
See Also
Developer's Guide
API
- MoveViewportInputMode, verticalScrollBarPolicy
This recognizer is only used if mouseWheelBehavior has the SCROLL flag.
The default is SHIFT_IS_DOWN.
Examples
graphComponent.horizontalScrollEventRecognizer =
EventRecognizers.CTRL_DOWNGets the HTMLElement that represents this instance.
HTMLElement that represents this instance.Defined in
CanvasComponent.htmlElementGets or sets the image-rendering type for this visual and its children.
Defined in
CanvasComponent.imageRenderingGets the size of the usable area in which the graph will be displayed.
Defined in
CanvasComponent.innerSizeGets or sets the single IInputMode instance that shall be installed for this canvas.
Examples
graphComponent.inputMode = new GraphEditorInputMode()// set a new instance - by default, a GraphViewerInputMode is already set
graphComponent.inputMode = new GraphViewerInputMode()See Also
Developer's Guide
Defined in
CanvasComponent.inputModeGets or sets the IInputModeContext instance that is used by the inputMode instance.
Defined in
CanvasComponent.inputModeContextGets the last location provided by a pointing device (for instance mouse or touch).
Defined in
CanvasComponent.lastEventLocationGets the last pointer event triggered by this instance.
Gets or sets a value indicating whether the maximum zoom level for fitContent and FIT_CONTENT is limited to 1.
If this property is true, fitContent and FIT_CONTENT will limit the maximum zoom level to 1. This can lead to very small graphs not filling the viewport. If this property is set to false, zooming will only be limited by maximumZoom.
The default value is true.
Defined in
CanvasComponent.limitFitContentZoomGets or sets the duration a pointing device must be held down without moving before the pointer-long-press event is raised.
context-menu event, we recommend lowering this value to, for exammple, 100ms because handling the context-menu event will stop other input modes from acting on the subsequent long-press event (e.g., edge creation). Therefore, lowering the longPressTime will extend the time frame between the long-press and the context-menu event.See Also
Defined in
CanvasComponent.longPressTimeGets or sets the duration a pointing device must not move before the pointer-long-rest event is raised.
Gets or sets the maximum zoom factor for this CanvasComponent.
100000.0 and the enforced maximum value is 1000000.0.Examples
graphComponent.maximumZoom = 4See Also
Developer's Guide
Defined in
CanvasComponent.maximumZoomGets or sets the minimum zoom factor for this CanvasComponent.
0.0001, the enforced minimum 0.0000001.Examples
graphComponent.minimumZoom = 1See Also
Developer's Guide
API
- zoom, maximumZoom
Defined in
CanvasComponent.minimumZoomDefined in
CanvasComponent.mouseCaptureGets or sets the action to perform when turning the mouse wheel.
Valid values for this property are as follows:
- NONE – No action is being taken when turning the mouse wheel.
- ZOOM – The zoom level of the viewport is adjusted when turning the mouse wheel or pinching on a touchpad.
- SCROLL – The viewport is scrolled vertically when turning the mouse wheel, and horizontally when turning the mouse wheel while pressing the Shift key. No modifier key is required if bidirectional wheel events are available (e.g. touchpad or two-axis mouse wheel).
- SCROLL, ZOOM – Both SCROLL and ZOOM can be combined to allow both scrolling and zooming. The default action without any modifiers pressed is zooming. Pressing the Shift key while turning the mouse wheel will scroll horizontally while pressing the Control key will result in vertically scrolling. This is the default.
- Any of the above options, except for NONE can be combined with ONLY_WHEN_FOCUSED to allow the interaction only when the CanvasComponent is focused.
The mouseWheelBehavior can be omitted by calling preventDefault on the event args of the wheel event.
Examples
// The mouse wheel should be used for scrolling.
graphComponent.mouseWheelBehavior = MouseWheelBehaviors.SCROLL
// The mouse wheel can be used either for scrolling or zooming, depending on the modifiers
// but only when the control is focused.
graphComponent.mouseWheelBehavior =
MouseWheelBehaviors.SCROLL |
MouseWheelBehaviors.ZOOM |
MouseWheelBehaviors.ONLY_WHEN_FOCUSEDSee Also
Developer's Guide
Defined in
CanvasComponent.mouseWheelBehaviorScrolling can work either a few lines at a time (per notch of the scroll wheel) or one page at a time. This is a system setting. This property controls how many pixels represent a line if scrolling is done by line. In case scrolling is done by page, this property has no effect.
The default value is 25 pixels. To speed up scrolling, set a larger value, to slow down scrolling, set a smaller value. Set negative values to invert the scrolling/panning behavior, e.g., for trackpads.
See Also
Developer's Guide
API
- mouseWheelZoomFactor, mouseWheelBehavior
Defined in
CanvasComponent.mouseWheelScrollFactorThis recognizer is only used if mouseWheelBehavior has both the SCROLL and ZOOM flags.
The default implementation detects whether ctrl or shift have been pressed separately or a precision trackpad is used for panning. In these cases, false will be returned, enabling zooming with the mouse both via scroll wheels and pinch zooming via trackpads.
Examples
graphComponent.mouseWheelZoomEventRecognizer =
EventRecognizers.ALT_IS_DOWNSee Also
Developer's Guide
See Also
Developer's Guide
Defined in
CanvasComponent.mouseWheelZoomFactorBy default this feature is enabled.
This property enables/disables the following commands:
Property Value
true if the commands are enabled; otherwise, false.Examples
graphComponent.navigationCommandsEnabled = falseGets or sets an event recognizer that temporarily enables mouse wheel events.
If ONLY_WHEN_FOCUSED is set but this CanvasComponent is currently not focused, events accepted by this recognizer will force this CanvasComponent to handle the mouse wheel events anyways.
The default is NEVER. A common use case is to set this recognizer to accept modifier keys such as CTRL_IS_DOWN.
Returns an HTML element that can be used to show arbitrary HTML content like overlays, fly-outs, or pop-ups on top of this CanvasComponent.
An HTML element that was added to the overlay panel is drawn above the content of this CanvasComponent but below its scrollbars. In contrast to labels or other model items, this element keeps its size when the canvas is zoomed. It should be placed with the CSS property position: absolute to prevent multiple overlay elements to interfere with each other.
If a container element is passed to the constructor of this CanvasComponent, all its child nodes are passed to this overlay panel. Apart from that, content may be added to and removed from this panel at any time.
Defined in
CanvasComponent.overlayPanelGets or sets the OverviewInputMode that is used to navigate the client control.
Setting this property will automatically update the canvasComponent property of the new OverviewInputMode.
This property is merely an alias for the inputMode property. Setting either this property or the inputMode property has the same effect if the input mode is an OverviewInputMode. On the other hand, if an input mode is set that is not an OverviewInputMode, then the value of this property is null.
null, the GraphOverviewRenderer is not notified about changes of the graphComponent's graph.See Also
Developer's Guide
Defined in
CanvasComponent.projectionBy default, the coordinates of input events are translated directly to world coordinates, which, with many zoom levels can end up with world coordinates like 326.76821937283548; this excessive precision is an artifact of the fact that every viewport pixel covers a fractional amount of world coordinates.
This option quantizes the coordinates depending on the zoom level so that above value may end up, e.g. as 326.75 instead. This is done in a way to minimize visual deviation from the exact value (much less than a pixel), so visually almost nothing changes. Zooming in will increase the precision as much as necessary, but not so far to be excessive. The benefit is that coordinates are easier to recognize in a debugger, graph elements end up with locations that are easier to read, GraphML files become smaller because less space is wasted on unnecessary floating point precision, and numerical instability in certain cases (e.g. some snapping scenarios) is eliminated.
The default value is true.
Defined in
CanvasComponent.quantizeInputCoordinatesGets the render tree for the canvas that holds all IRenderTreeElements that will be rendered by this instance.
Property Value
true if the main UI direction is right to left; otherwise, false.Defined in
CanvasComponent.rightToLeftGets or sets the shape-rendering type for this visual and its children.
Defined in
CanvasComponent.shapeRenderingReturns the size of the HTML element.
Defined in
CanvasComponent.sizeGets the control's svgDefsManager
Defined in
CanvasComponent.svgDefsManagerGets or sets the visibility policy for the vertical scrollbar.
See Also
Developer's Guide
API
- MoveViewportInputMode, horizontalScrollBarPolicy
Defined in
CanvasComponent.verticalScrollBarPolicyGets or sets the current viewpoint.
Examples
console.log(
`Current view point: ${graphComponent.viewPoint} , and center: ${graphComponent.center}`,
)
graphComponent.viewPoint = new Point(150, 50)
console.log(`New view point is: ${graphComponent.viewPoint}`)
console.log(`The center has also changed: ${graphComponent.center}`)See Also
Developer's Guide
Defined in
CanvasComponent.viewPointGets the smallest rectangle in world coordinates that encompasses the visible viewing region.
Gets or sets the ViewportLimiter instance that can be used to limit the explorable region.
By default, there are no limits set on the explorable region.
When a projection is set, the viewportLimiter is ignored.
See Also
Developer's Guide
Defined in
CanvasComponent.viewportLimiterGets or sets the policy for caching Visuals which are temporarily removed from the visual tree.
Visuals are temporarily removed when they are moved outside the visual part of the canvas (the viewport ) and re-added when they enter the viewport again. Caching prevents the need to re-build the visuals from scratch.
Visuals are only cached if this property is set to other value than NEVER and if a dispose visual callback is registered during creation.
Defined in
CanvasComponent.visualCachingGets or sets the zoom factor for this CanvasComponent.
A zoom level of 1.0 will make each unit in world-coordinate space appear exactly one unit in screen coordinates wide. The default is 1.0. When setting this property to change the zoom level, the center point will remain the same.
The valid range is bounded by minimumZoom and maximumZoom
Examples
console.log(
`Resetting the zoom level from ${graphComponent.zoom} to 100 %.`,
)
graphComponent.zoom = 1See Also
Developer's Guide
API
- zoom-changed, minimumZoom, maximumZoom, zoomTo, zoomToAnimated
Defined in
CanvasComponent.zoomMethods
Returns whether the given command can be executed with the given optional parameter.
command can be executed with the given optional parameter.See the documentation of the Command which parameter can be used with the given command.
It is strongly advised to query this method before calling executeCommand.
Some commands can only be executed if a GraphViewerInputMode or GraphEditorInputMode is installed.
Parameters
- command: Command
- The command to execute.
- parameter?: any
- An optional parameter to provide for the command.
Return Value
- boolean
- Returns
trueif the command can be executed, otherwisefalse.
See Also
Defined in
CanvasComponent.canExecuteCommandCleans up by removing any connection from the htmlElement element to the CanvasComponent instance and any associated element that was created during the lifetime of the component.
This method should be called when the component is not needed anymore and should be garbage collected. After calling this method the component must not be used anymore.
During this call, an immediate final visual tree update is performed. As a result, pending dispose callbacks for registered visuals are executed and associated resources can be released.
Overrides
CanvasComponent.cleanUpHelper method that ensures that the viewport limit as returned by the viewportLimiter is obeyed.
Parameters
- mode?: ViewportLimitingMode
- The mode defining how viewport limitations are applied. Defaults to PROGRAMMATIC_NAVIGATION.
See Also
Defined in
CanvasComponent.coerceViewportLimitsCreates an appropriate IRenderContext that can be used to create visuals using IVisualCreator implementations.
Return Value
- IRenderContext
- A new context instance that is bound to this instance.
Defined in
CanvasComponent.createRenderContextEnsures that the provided bounds in world coordinates are visible by adjusting the viewport accordingly.
Parameters
- bounds: Rect
- The bounds to make visible.
- viewportPadding?: Insets
- Padding in view coordinates to keep free around the content.
- mode?: ViewportLimitingMode
- The mode the viewport limiter should use.
Return Value
See Also
Developer's Guide
Defined in
CanvasComponent.ensureVisibleEnsures that the provided points in world coordinates are all visible by adjusting the viewport accordingly.
Parameters
- points: IEnumerable<Point>
- The points to make visible.
- viewportPadding?: Insets
- Padding in view coordinates to keep free around the content.
- mode?: ViewportLimitingMode
- The mode the viewport limiter should use.
Return Value
See Also
Developer's Guide
Defined in
CanvasComponent.ensureVisibleSee the documentation of the Command for which parameters can be used with the given command.
It is strongly advised to query canExecuteCommand whether the command can be executed.
Some commands can only be executed if a GraphViewerInputMode or GraphEditorInputMode is installed.
Parameters
- command: Command
- The command to execute.
- parameter?: any
- An optional parameter to provide for the command.
See Also
Defined in
CanvasComponent.executeCommandFires the size changed event.
Adjusts the viewport to fully encompass the contentBounds.
This is usually used to make sure a large graph fits into the viewport. The limitFitContentZoom property controls the behavior for small graphs. If limitFitContentZoom is true, the maximum zoom level is 1; setting the property to false will zoom in far enough so that even small graphs fit the viewport (limited to maximumZoom, though).
The viewportLimiter is taken into account.
If a projection is set, the bounding rectangle of the contentBounds is used and and viewportLimiter is ignored.
Parameters
- animated?: boolean
- Whether to change the viewport in an animated fashion.
Return Value
See Also
Developer's Guide
API
- updateContentBounds, zoom, zoomTo
Defined in
CanvasComponent.fitContentFocuses the htmlElement element that is backing this instance.
getInputModeContextDecoratorFor
<TInterface> (interfaceType: Constructor<TInterface>): LookupDecorator<IInputModeContext, TInterface>Gets the LookupDecorator<IInputModeContext, TInterface> that can be used to decorate the lookup call in the inputModeContext.
getInputModeContextDecoratorFor
<TInterface> (interfaceType: Constructor<TInterface>): LookupDecorator<IInputModeContext, TInterface>Parameters
- interfaceType: Constructor<TInterface>
Return Value
- LookupDecorator<IInputModeContext, TInterface>
- The LookupDecorator<IInputModeContext, TInterface> instance that can be used for decorating the lookup operation within the context.
Determines the animation duration for a viewport animation.
Parameters
- newCenter: Point
- The new center of the viewport.
- newZoom: number
- The new zoom factor.
- viewportChanges: ViewportChanges
- The kind of viewport change that triggered this method. Even though ViewportChanges supports multiple values as bitwise flags, only one of them is ever passed here.
Return Value
Examples
protected getViewportAnimationDuration(
newCenter: Point,
newZoom: number,
viewportChanges: ViewportChanges,
): TimeSpan {
if (
viewportChanges == ViewportChanges.MOUSE_WHEEL_SCROLL &&
this.center.distanceTo(newCenter) > 200
) {
// Use a duration between 100 and 500 ms depending on the distance scrolled
return TimeSpan.fromMilliseconds(
Math.max(Math.min(this.center.distanceTo(newCenter), 500), 100),
)
}
if (
(viewportChanges == ViewportChanges.ZOOM_COMMAND ||
viewportChanges == ViewportChanges.MOUSE_WHEEL_ZOOM) &&
newZoom > this.zoom
) {
// Use a shorter duration when zooming in
return TimeSpan.fromMilliseconds(100)
}
if (viewportChanges == ViewportChanges.FIT_CONTENT_COMMAND) {
// Never animate FIT_CONTENT or FIT_GRAPH_BOUNDS
return TimeSpan.ZERO
}
return super.getViewportAnimationDuration(
newCenter,
newZoom,
viewportChanges,
)
}See Also
Developer's Guide
API
- animatedViewportChanges
Ensures that the contentBounds encompasses the given rectangle.
Parameters
- rectangle: Rect
- The rectangle that should be included in the content bounds
Defined in
CanvasComponent.growContentBoundsUsed by the default implementation of inputModeContext to resolve lookup calls.
Parameters
- context: IInputModeContext
- The context.
- type: Constructor
- The Type to query
Return Value
- any
- The result of the query.
See Also
Defined in
CanvasComponent.inputModeContextLookupParameters
- intermediatePoint: Point
- the coordinates in the view coordinate system
Return Value
- Point
- The coordinates in pixels relative to the control's upper left corner in the view coordinate system
See Also
Developer's Guide
Parameters
- intermediatePoint: Point
- Coordinates expressed in the intermediate coordinate system
Return Value
- Point
- The coordinates expressed in the world coordinate system.
See Also
Developer's Guide
Invalidates this instance and marks it as in need for an update.
Calling this method is fast and will only mark the component as dirty for a future, asynchronously executed call to updateVisual.
Alternatively, updateVisualAsync can be used which returns a promise that is resolved once the component has been updated.
Defined in
CanvasComponent.invalidatenull implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.Parameters
- type: Constructor<T>
- the type for which an instance shall be returned
Return Value
- T
- an instance that is assignable to the type or
null
Defined in
CanvasComponent.lookupCalls evt.preventDefault() for each contextMenu event that occurs on this instance.
evt.preventDefault() for each contextMenu event that occurs on this instance.contextMenu event can be enabled.Parameters
- evt: Event
- The event.
Calls evt.preventDefault() if captureAllPointerInput is enabled.
evt.preventDefault() if captureAllPointerInput is enabled.Parameters
- evt: Event
- The event.
This method will be called when the mouse wheel was turned and if the mouseWheelBehavior property is set to SCROLL.
Parameters
- evt: PointerEventArgs
- The event describing the action
See Also
Defined in
CanvasComponent.mouseWheelScrollThis method will be called when the mouse wheel was turned and if the mouseWheelBehavior property is set to ZOOM.
Parameters
- evt: PointerEventArgs
- the event describing the action
See Also
Defined in
CanvasComponent.mouseWheelZoomConverts html page coordinates to view coordinates.
Parameters
- pageLocation: Point
- The html page coordinates to convert.
Return Value
- Point
- The view coordinates.
Defined in
CanvasComponent.pageToViewCoordinatesConverts html page coordinates to world coordinates.
Parameters
- pageLocation: Point
- The html page coordinates to convert.
Return Value
- Point
- The world coordinates.
Defined in
CanvasComponent.pageToWorldCoordinatestrue and a mouse down event is received, the control starts capturing all mouse events by registering handlers on the document element. Mouse capturing is normally stopped when the mouse button is released. Mouse capture can be manually stopped by calling this function.Defined in
CanvasComponent.stopMouseCaptureUpdates the contentBounds to encompass the bounds of all elements in the current scene graph plus the given margins.
Parameters
- margins?: Insets
- The additional margins to add to the calculated bounds.
- group?: IRenderTreeGroup
- The scene graph group to traverse. If none is specified, the contentGroup is used.
See Also
Developer's Guide
API
- IBoundsProvider, contentBounds
Defined in
CanvasComponent.updateContentBoundsCalling this method will synchronously update the visual tree and the SVG DOM and Canvas rendering.
This method will create or update the visuals that make up the visual tree.
Note that most of the time this method does not need to be called by client code. Instead calling invalidate will ultimately trigger this method. However invalidation calls will be coalesced and the actual execution of the update will be delayed until the next event dispatch.
See Also
Developer's Guide
Defined in
CanvasComponent.updateVisualReturn Value
Defined in
CanvasComponent.updateVisualAsyncConverts view coordinates to intermediate coordinates, effectively canceling any projection if set.
Parameters
- viewPoint: Point
- the coordinates in the view coordinate system
Return Value
- Point
- The coordinates in pixels relative to the control's upper left corner in the intermediate coordinate system
See Also
Developer's Guide
Converts view coordinates to the html page coordinates.
Parameters
- viewLocation: Point
- The view coordinates to convert.
Return Value
- Point
- The coordinates in the html document's coordinate system.
Defined in
CanvasComponent.viewToPageCoordinatesParameters
- viewPoint: Point
- the coordinates in pixels relative to the component's upper left corner
Return Value
- Point
- The coordinates expressed in the world coordinate system
See Also
Developer's Guide
Defined in
CanvasComponent.viewToWorldCoordinatesConverts world coordinates to the component's coordinate system before the projection is applied.
Parameters
- worldPoint: Point
- the coordinates in the world coordinate system
Return Value
- Point
- Coordinates expressed in pixels relative to the control's upper left corner in the intermediate coordinate system
See Also
Developer's Guide
Parameters
- worldPoint: Point
- Coordinates in the world coordinate system
Return Value
- Point
- The coordinates in pixels relative to the control's upper left corner
See Also
Developer's Guide
Defined in
CanvasComponent.worldToViewCoordinatesSets the zoom level and viewport center so that the given rectangle in world coordinates fits the viewport.
Parameters
- bounds: Rect
- The coordinates of the rectangle to zoom to.
Examples
graphComponent.zoomTo(new Rect(50, 30, 120, 75))See Also
Developer's Guide
API
- zoomTo, zoomToAnimated
Defined in
CanvasComponent.zoomToParameters
- zoom: number
- The new zoom level.
- center?: Point
- The optional new center of the viewport in world coordinates. If not specified, this implementation zooms to the current viewport center.
Examples
graphComponent.zoomTo(2, new Point(42, 42))See Also
Developer's Guide
API
- zoomTo, zoomToAnimated
Defined in
CanvasComponent.zoomToParameters
- bounds: Rect
- The coordinates of the rectangle to zoom to.
Return Value
- Promise<void>
- A Promise that resolves when the viewport has been adjusted.
Examples
await graphComponent.zoomToAnimated(new Rect(50, 30, 120, 75))
// Subsequent code runs after the animation completesSee Also
Developer's Guide
API
- zoomTo, zoomToAnimated
Defined in
CanvasComponent.zoomToAnimatedParameters
- zoom: number
- The new zoom level.
- center?: Point
- The optional new center of the viewport in world coordinates. If not specified, this implementation zooms to the current viewport center.
Return Value
- Promise<void>
- A Promise that resolves once the animation is finished.
Examples
await graphComponent.zoomToAnimated(2, new Point(42, 42))
// Subsequent code runs after the animation completesSee Also
Developer's Guide
API
- zoomToAnimated, zoomTo
Defined in
CanvasComponent.zoomToAnimatedEvents
Occurs when the executability state of a command might have changed.
Properties of
EventArgsSee Also
Defined in
CanvasComponent.can-execute-changedOccurs when the contentBounds have been changed.
Occurs when keys are being pressed, i.e., on keydown.
keydown.Properties of
KeyEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: KeyEventType
- Gets the type of the event.
- key: string
- Gets the key.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the modifiers.
- originalEvent: KeyboardEvent
- Gets the original DOM event associated with this event.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
Defined in
CanvasComponent.key-downOccurs when keys are being released, i.e., on keyup.
keyup.Properties of
KeyEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: KeyEventType
- Gets the type of the event.
- key: string
- Gets the key.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the modifiers.
- originalEvent: KeyboardEvent
- Gets the original DOM event associated with this event.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
Defined in
CanvasComponent.key-upOccurs when the mouse capture has been lost.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.lost-pointer-captureOccurs when the mouse capture has been lost.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-cancelOccurs when the user clicks the pointer.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
This happens if press and release happens at the same position.
This refers to all supported pointer clicks, i.e. mouse clicks, touch taps, and stylus clicks.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-clickOccurs when a mouse button has been pressed, i.e., on mousedown.
mousedown.Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-downOccurs when the mouse is being moved while at least one of the mouse buttons is pressed.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-dragOccurs when the mouse has entered the canvas.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
If the mouse enters this canvas control with a mouse button pressed, this event is fired instantly but the current button state reported by the PointerEventArgs does not include this button unless the browser supports the property MouseEvent.buttons. See the Known Issues for more details.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-enterOccurs when the mouse has exited the canvas.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
If the mouse leaves this canvas control with the mouse button pressed, this event is deferred until the mouse button is released. Thus, this event will not interfere with the typical mouse button event cycle.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-leaveOccurs when the user performed a long press gesture with a pointer device.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
This happens if the pointer is held in the same position for the duration specified in longPressTime after a pointer-down.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-long-pressOccurs during a DRAG or MOVE, when the pointer only moves a lit bit during the amount of time specified in longRestTime.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-long-restOccurs when the mouse has been moved in world coordinates.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
Move elements are delivered if no mouse button is pressed. This event will be fired, too, if the mouse does not move but the world coordinates to which the current mouse position maps change. E.g. this will happen if the zoom level or the view point is changed.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-moveOccurs when the mouse button has been released, i.e., on mouseup.
mouseup.Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.
Defined in
CanvasComponent.pointer-upOccurs before the visual tree is painted to prepare the IRenderContext.
Properties of
PrepareRenderContextEventArgs- context: IRenderContextwritable
- Gets or sets the context.
Defined in
CanvasComponent.prepare-render-contextOccurs when the size of this component is changed.
Properties of
SizeChangedEventArgs- oldSize: Size
- Gets or sets the old size of the control.
- source: HTMLElement
- Gets or sets the element whose size was changed.
Defined in
CanvasComponent.size-changedOccurs after the visual tree has been updated.
Occurs before the visual tree is updated.
Occurs when the viewport property has been changed.
Properties of
PropertyChangedEventArgs- propertyName: string
- The name of the changed property.
See Also
Developer's Guide
Defined in
CanvasComponent.viewport-changedOccurs when the mouse wheel has turned.
This event delivers PointerEventArgs in world coordinates using double precision floating points.
The default mouseWheelBehavior can be omitted by calling preventDefault on the event args.
Properties of
PointerEventArgs- altKey: boolean
- Gets a value indicating whether the alt modifier is pressed.
- buttons: PointerButtons
- Gets the state of the device buttons at the time of the event creation.
- changedButtons: PointerButtons
- Gets the mouse buttons that have changed for this event.
- changedModifiers: ModifierKeys
- Gets the modifier keys that have changed for this event.
- clickCount: number
- Gets the number of clicks the current event represents if it is of type CLICK.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier is pressed.
- defaultPrevented: boolean
- Gets a value indicating whether the default behaviors for this event have been prevented by a previous call to preventDefault.
- eventType: PointerEventType
- Gets the type of this event.
- isPrimary: boolean
- Indicates if the pointer represents the primary pointer of this type.
- location: Point
- Gets the coordinates in the world coordinate space associated with this event.
- metaKey: boolean
- Gets a value indicating whether the meta modifier is pressed.
- modifiers: ModifierKeys
- Gets the state of the modifier keys at the time of the event creation.
- originalEvent: any
- Gets the original DOM event associated with this event.
- pointerId: number
- The identifier assigned to the pointer causing the pointer event.
- pointerSize: Size
- The width and the height of the pointer's contact area.
- pointerType: PointerType
- Gets the device type that caused the pointer event.
- pressure: number
- The normalized pressure of the pointer input in the range of 0 to 1.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier is pressed.
- wheelDeltaX: number
- Gets the signed number of mouse wheel turn units in horizontal direction.
- wheelDeltaY: number
- Gets the signed number of vertical mouse wheel turn units.