Home > @jsplumbtoolkit/browser-ui-angular > jsPlumbService > getSurface
jsPlumbService.getSurface() method
Gets the surface with the given id, passing it to the supplied callback function. If a surface with the given ID does not exist, the request is queued, and then if a surface with the given ID is subsequently registered, each callback for that surface registered via this method is executed in turn.
Signature:
getSurface(id: string, callback: (surface: Surface) => void, _params?: SurfaceOptions): void;
Parameters
Parameter | Type | Description |
---|---|---|
id | string | ID of the surface to retrieve |
callback | (surface: Surface) => void | Function to call when the surface has been retrieved. |
_params | SurfaceOptions | Optional parameters to pass back into the callback upon successful retrieval of the surface. |
Returns:
void