Constructor
-
new KonvaTextTool()
-
Describes the whiteboard text tool.
Methods
-
endInput(event, canvas, textInput, scale) → {Konva.Text}
-
Removes an input text element and creates konvaText which is going to be rendered.
Function is being invoked when the user triggers mousedown event
on the whiteboard canvas when a text tool is selected and the user
is typing text.Parameters:
Name Type Description eventobject HTML DOM mousedown event.
canvasCanvas Whiteboard canvas where the text should be rendered on.
textInputstring Text that is going to be rendered.
scalenumber Scale which currently applies to the whiteboard canvas.
Returns:
{ Konva.Text }
-
startInput(event, canvas, mode, scale) → {void}
-
Creates an input text element where the user can type text.
Function is being invoked when the user triggers mousedown event
on the whiteboard canvas when a text tool is selected.Parameters:
Name Type Description eventobject HTML DOM mousedown event.
canvasCanvas Whiteboard canvas where the text should be rendered on.
modestring Tool mode: filled or stroke.
scalenumber Scale which currently applies to the whiteboard canvas.
Returns:
{ void }