Class: KonvaPenTool

Constructor

new KonvaPenTool()

Describes the whiteboard pen tool.

Methods

drawFunction(evt, konvaShape) → {void}

Draws the pen line shape on the whiteboard canvas.
Function is being invoked when the user triggers mousemove event
on the whiteboard canvas when a pen tool is selected.

Parameters:
Name Type Description
evt object

HTML DOM mousemove event.

konvaShape Konva.Shape

Shape that is goint to be drawn.

Returns:
{ void }

endFunction() → {void}

Finishes drawing line with pen tool on the whiteboard canvas.
Function is being invoked when the user triggers mouseup or mouseleave event
on the whiteboard canvas when a pen tool is selected.

Returns:
{ void }

startFunction(event, scale) → {Konva.Shape}

Starts drawing the pen line shape on the whiteboard canvas.
Function is being invoked when the user triggers mousedown event
on the whiteboard canvas when a pen tool is selected.

Parameters:
Name Type Description
event object

HTML DOM mousedown event.

scale number

Scale which currently applies to the whiteboard canvas.

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