Class: WhiteboardSurface

Constructor

new WhiteboardSurface(whiteboard, whiteboardService)

Whiteboard surface is a single "page" of Whiteboard.

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

Methods

addCircle(circle) → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Adds a circle to the whiteboard surface.

Parameters:
Name Type Description
circle AvayaClientServices.Services.Collaboration.Circle
Returns:

addShape(shape) → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Adds a shape to the whiteboard surface.

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

addText(whiteboardText) → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Adds text to the whiteboard surface.

Parameters:
Name Type Description
whiteboardText AvayaClientServices.Services.Collaboration.WhiteboardText
Returns:

clearContent() → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Clears a content of the whiteboard.

Returns:

finishShape(shape) → {AvayaClientServices.Base.Promise.<(Boolean|Undefined)>}

Finishes received shape.

Parameters:
Name Type Description
shape AvayaClientServices.Services.Collaboration.AbstractShape
Returns:
{ AvayaClientServices.Base.Promise.<(Boolean|Undefined)> }

getAllowedPrimitiveShapes() → {Number}

Returns number of allowed primitive shapes to draw
Primitive shape for each of the following shape
Reactangle - four
Circle - one
Line - one
Stamp - five
Text - one
Pen/Marker - number of points drawn

Returns:
{ Number }

getShapes() → {Object.<number, AvayaClientServices.Services.Collaboration.AbstractShape>}

Returns the map that contains shapes belonging to the surface.
ShapeId is a key and shape of type AbstractShape is a value.

Returns:

getSurfaceId() → {String}

Returns the surface unique ID.

Returns:
{ String }

isActive() → {boolean}

Determines whether the surface is active or not.

Returns:
{ boolean }

removeShape(shape) → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Removes shape with given SDK Shape.

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

setAsActive() → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

Sets this surface as current (active).

Returns:

updateShape(shape) → {AvayaClientServices.Base.Promise.<(Undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

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

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

Managing callbacks

addOnShapeAddedCallback(callback) → {void}

Adds new onShapeAddedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeAddedCallback
Returns:
{ void }

addOnShapeDeletedCallback(callback) → {void}

Adds new onShapeDeletedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeDeletedCallback
Returns:
{ void }

addOnShapeUpdatedCallback(callback) → {void}

Adds new onShapeUpdatedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeUpdatedCallback
Returns:
{ void }

addOnSurfaceClearedCallback(callback) → {void}

Adds new onSurfaceClearedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onSurfaceClearedCallback
Returns:
{ void }

removeOnShapeAddedCallback(callback) → {void}

Removes existing onShapeAddedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeAddedCallback
Returns:
{ void }

removeOnShapeDeletedCallback(callback) → {void}

Removes existing onShapeDeletedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeDeletedCallback
Returns:
{ void }

removeOnShapeUpdatedCallback(callback) → {void}

Removes existing onShapeUpdatedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onShapeUpdatedCallback
Returns:
{ void }

removeOnSurfaceClearedCallback(callback) → {void}

Removes existing onSurfaceClearedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Collaboration.WhiteboardSurface#onSurfaceClearedCallback
Returns:
{ void }

Type Definitions

onShapeAddedCallback(whiteboardSurface, shape) → {void}

Interface for callback function invoked when a new shape is added.

Parameters:
Name Type Description
whiteboardSurface AvayaClientServices.Services.Collaboration.WhiteboardSurface

Whiteboard instance.

shape AvayaClientServices.Services.Collaboration.AbstractShape

Shape that has been added.

Returns:
{ void }

onShapeDeletedCallback(whiteboardSurface, shape) → {void}

Interface for callback function invoked when a shape is deleted from a surface.

Parameters:
Name Type Description
whiteboardSurface AvayaClientServices.Services.Collaboration.WhiteboardSurface

Whiteboard instance.

shape AvayaClientServices.Services.Collaboration.AbstractShape

Shape that has been deleted.

Returns:
{ void }

onShapeUpdatedCallback(whiteboardSurface, shape) → {void}

Interface for callback function invoked when the shape has been updated.

Parameters:
Name Type Description
whiteboardSurface AvayaClientServices.Services.Collaboration.WhiteboardSurface

Whiteboard instance.

shape AvayaClientServices.Services.Collaboration.AbstractShape

Shape that has been updated.

Returns:
{ void }

onSurfaceClearedCallback(whiteboardSurface) → {void}

Interface for callback function invoked when the surface is cleared.

Parameters:
Name Type Description
whiteboardSurface AvayaClientServices.Services.Collaboration.WhiteboardSurface

Whiteboard instance.

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