Bind an event listener. This method can be used with a type parameter by call sites; although it's not necessary it can be helpful to use this to ensure you've thought about what the payload to your event handler is going to be.
Unbind the given event listener, or all listeners. If you call this method with no arguments then all event listeners are unbound.
Optional
eventOrListener: string | FunctionEither an event name, or an event handler function
Optional
listener: FunctionIf eventOrListener
is defined, this is the event handler to unbind.
An overlay that draws some text. By default this overlay will use an HTML element, and that element's parent will be the surface canvas. You can set
useHTMLElement:false
in the options if you want the overlay to use an SVG element instead - this is a choice you might make if you had a UI that you wanted to export to SVG.