Class: WhiteboardRenderer

Constructor

<abstract> new WhiteboardRenderer()

WhiteboardRenderer class is an interface for whiteboard renderers.
Each new renderer should extend this class.

Members

possibleColors :Array.<string>

This is suggested set of HEX colors that the user can choose from while drawing on the whiteboard.
It is possible to customize this set of colors.

Type:
  • Array.<string>

Methods

<abstract> clearContent() → {void}

Deletes all the shapes from the whiteboard surface.

Returns:
{ void }

<abstract> drawShape(shape) → {void}

Draws given shape on the whiteboard surface.

Parameters:
Name Type Description
shape AvayaClientServices.Services.Collaboration.AbstractShape
Returns:
{ void }

<abstract> end(containerId) → {void}

Ends the whiteboard renderer.

Parameters:
Name Type Description
containerId string

ID of DOM element with the whiteboard canvas which is going to be removed.

Returns:
{ void }

init(whiteboard, containerId) → {void}

Initializes the whiteboard renderer.

Parameters:
Name Type Description
whiteboard AvayaClientServices.Services.Collaboration.Whiteboard

Whiteboard instance.

containerId string

ID of DOM element where whiteboard will be append to.

Returns:
{ void }

<abstract> prepareSurface() → {void}

Prepares the whiteboard renderer surface.

Returns:
{ void }

<abstract> removeShape(shape) → {void}

Removes given shape from the whiteboard surface.

Parameters:
Name Type Description
shape AvayaClientServices.Services.Collaboration.AbstractShape
Returns:
{ void }

<abstract> start(containerId) → {void}

Starts the whiteboard renderer.

Parameters:
Name Type Description
containerId string

ID of DOM element where whiteboard will be append to.

Returns:
{ void }

<abstract> updateShape(shape, moveX, moveY) → {void}

Updates given shape position.
This function is being invoked when the shape is moved by the selection tool.

Parameters:
Name Type Description
shape AvayaClientServices.Services.Collaboration.AbstractShape
moveX Number | undefined
moveY Number | undefined
Returns:
{ void }

Managing callbacks

addOnDrawShapeErrorCallback(callback) → {void}

Adds new onDrawShapeErrorCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardRenderer#onDrawShapeErrorCallback
Returns:
{ void }

addOnShowShapeAnnotationCallback(callback) → {void}

Adds new onShowShapeAnnotationCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardRenderer#onShowShapeAnnotationCallback
Returns:
{ void }

removeOnDrawShapeErrorCallback(callback) → {void}

Removes existing onWhiteboardStartedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardRenderer#onDrawShapeErrorCallback
Returns:
{ void }

removeOnShowShapeAnnotationCallback(callback) → {void}

Removes existing onWhiteboardStartedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardRenderer#onShowShapeAnnotationCallback
Returns:
{ void }

Type Definitions

onDrawShapeErrorCallback(tool, exception) → {void}

Interface for callback function to be invoked when error in drawing shapes.

Parameters:
Name Type Description
tool AvayaClientServices.Services.Collaboration.WhiteboardToolTypes

whiteboard tool type
AvayaClientServices.Services.Collaboration.WhiteboardToolTypes

exception AvayaClientServices.Services.Collaboration.RendererException

renderer exception
AvayaClientServices.Services.Collaboration.RendererException
AvayaClientServices.Services.Collaboration.RendererError

Returns:
{ void }

onShowShapeAnnotationCallback(shape) → {void}

Interface for callback function to be invoked when annotation about shape owner should appear.

Parameters:
Name Type Description
shape AvayaClientServices.Services.Collaboration.Shape

Shape object

Returns:
{ void }
©2016 Avaya Inc. All Rights Reserved.