pureweb.client.collaboration. CollaborationLayer

Renders markup on the acetate layer for a given view.

Method Summary

clear
Removes all markup with the associated view.
clearMarkup
Clears markup for the view to which this collaboration layer is attached.
drawMarkup
Renders all markup for the view to which this collaboration layer is attached.
getAcetateToolset
Returns the acetate toolset.
getContext
Returns the graphics context for the acetate layer.
getLocalSessionId
Returns the unique identifier of the local session, used when determining if the markup is created by the session.
getViewSize
Returns the size of the associated view.
normalizedToLocal
Converts x and y coordinates from normalized space (float values from 0-1) to local space (for the associated view).
setAcetateToolset
Sets the specified acetate toolset.

Constructor

new CollaborationLayer(view, canvas)

Initializes a new instance of CollaborationLayer.
Parameters:
Name Type Description
view pureweb.client.View The associated view.
canvas Object The Canvas to use to render the acetate overlay.

Method Detail

clear()

Removes all markup with the associated view.

clearMarkup()

Clears markup for the view to which this collaboration layer is attached.

drawMarkup()

Renders all markup for the view to which this collaboration layer is attached.

getAcetateToolset() → {pureweb.client.collaboration.AcetateToolset}

Returns the acetate toolset.

getContext() → {Object}

Returns the graphics context for the acetate layer.

getLocalSessionId() → {string}

Returns the unique identifier of the local session, used when determining if the markup is created by the session.

getViewSize() → {Object}

Returns the size of the associated view.

normalizedToLocal(x, y) → {Object}

Converts x and y coordinates from normalized space (float values from 0-1) to local space (for the associated view).
Parameters:
Name Type Description
x number The x coordinate in normalized space.
y number The y coordinate in normalized space.

setAcetateToolset(toolset)

Sets the specified acetate toolset.
Parameters:
Name Type Description
toolset pureweb.client.collaboration.AcetateToolset The toolset to set.