Class SurfaceComponent<VO, RO>

Provides a component that manages a surface.

Type Parameters

Properties

data?: Record<string, any>

Optional data to load after the view has been initialised.

renderParams: RO

Options for the underlying surface widget.

runInsideAngular: boolean = false

Set this to false if you do not want the Surface to set itself up inside a runOutsideAngular call. We do not recommend this. When the Surface setup is run inside Angular all of the event bindings from the surface's pan/zoom/drag handlers are piped through Angular, causing change detection events, which can result in a performance hit. We've only added this in case there is an unforeseen backwards compatibility issue in someone's app, but all of our testing of this change suggests that is unlikely.

surface: Surface
surfaceId?: string = DEFAULT_ANGULAR_SURFACE_ID

ID to use for the created surface. If you do not provide this a default value will be used. You only need to provide this if you are rendering a JsPlumb instance to more than one surface.

toolkitId?: string = DEFAULT_ANGULAR_TOOLKIT_ID

ID of the Toolkit to which to attach the surface. If you do not provide this a default value will be used. You only really need to provide this if your page has more than one instance of JsPlumb.

toolkitParams?: JsPlumbToolkitOptions

Optional parameters for the underlying Toolkit. These will be used only if the Toolkit instance with the given ID has not yet been created somewhere else in the app.

url?: string

Optional url from which to load data after the view has been initialised.

useLegacyOverlayCreation: boolean = false

From 6.90.0 this component creates angular overlays using a new technique, which has been tested and appears to work exactly like the previous method, but if you run into any issues you can set this to true to revert to the way angular overlays were created prior to 6.90.0. The previous method for creating overlay components does not work in Angular 18, though, so this flag is deprecated as we will not support this forever.

view: VO

Options for the view - mappings of components and behaviour to model object types.

Version :