new Button(params)
Button [TextBox]
This:
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1334
Properties:
Name | Type | Description |
---|---|---|
x |
number | x coordinate of left upper end |
y |
number | y coordinate of left upper end |
width |
number | width of button [pixels] |
height |
number | height of button [pixels] |
bgColor |
color | background color of button |
bgColorWhenClicked |
color | background color of button when clicked |
text |
Raphael.text | object of receiver |
cover |
Raphael.rect | transparent rectangle responsible for clicking events |
Extends
Methods
-
onClick()
-
What to do when clicked. Initially empty function, overwrite it by desired actions
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1353
-
setStr(str)
-
Sets new text of receiver
Parameters:
Name Type Description str
string new string - Inherited From:
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1290
-
setX(x)
-
Sets new x position of receiver (this.x = x)
Parameters:
Name Type Description x
number new x coordinate [pixel] - Inherited From:
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1274
-
setXY(x, y)
-
Sets new x and y position of receiver (this.x = x; this.y = y)
Parameters:
Name Type Description x
number new x coordinate [pixel] y
number new y coordinate [pixel] - Inherited From:
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1265
-
setY(y)
-
Sets new y position of receiver (this.y = y)
Parameters:
Name Type Description y
number new y coordinate [pixel] - Inherited From:
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1282
-
update()
-
Update receiver
- Inherited From:
- Source:
- /var/www/html/software/raphaeltools/raphaeltools.src.js, line 1256