name of the button
the function to execute when button is clicked
Optional
opt_image: Nodethe image to show in the button; if undefined then the name is displayed as text.
Optional
button: HTMLButtonElementthe button to use; if not provided, then a button is created.
Private
clickfunction to call when the button is clicked
function to call when the button is clicked
Private
label_the name of the button
When button is held down we fire the clickFunction
repeatedly. This is the delay
in milliseconds between firing of the clickFunction
. Zero means only fire once.
The default is zero.
The first repeatDelay
should be longer to avoid unwanted held-button repeats.
This is the multiplier used on the first delay.
Private
timeoutID_the ID used to cancel the callback
Private
handlePrivate
handlePrivate
holdReturns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.
For an object whose main purpose is to represent another Printable object, it is
recommended to include the result of calling toStringShort
on that other object.
For example, calling toStringShort()
on a DisplayShape might return something like
this:
DisplayShape{polygon:Polygon{'chain3'}}
a minimal string representation of this object.
Generated using TypeDoc
A button input element which executes a function when the button is pressed. Displays an image if provided, otherwise the text name is displayed. The button is assigned classname
icon
for CSS scripting.Can be configured so the function is executed repeatedly when the button is held down. See repeatDelay and repeatFirst.