* Puts the given `text` into a 'label' tooltip. The text is given a default style according to @g.txtattr. See @Element.label
**
> Parameters
**
- x (number) x coordinate of the center of the label
- y (number) y coordinate of the center of the label
- text (string) text to place inside the label
**
= (object) set containing the label path and the text element
> Usage
| paper.label(50, 50, "$9.99");
\*/
Raphael.fn.label=function(x,y,text){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.label(),text);
};
/*\
* Paper.popup
[ method ]
**
* Puts the given `text` into a 'popup' tooltip. The text is given a default style according to @g.txtattr. See @Element.popup
*
* Note: The `dir` parameter has changed from g.Raphael 0.4.1 to 0.5. The options `0`, `1`, `2`, and `3` has been changed to `'down'`, `'left'`, `'up'`, and `'right'` respectively.
**
> Parameters
**
- x (number) x coordinate of the popup's tail
- y (number) y coordinate of the popup's tail
- text (string) text to place inside the popup
- dir (string) location of the text relative to the tail: `'down'`, `'left'`, `'up'` [default], or `'right'`.
- size (number) amount of padding around the Element [default: `5`]
**
= (object) set containing the popup path and the text element
> Usage
| paper.popup(50, 50, "$9.99", 'down');
\*/
Raphael.fn.popup=function(x,y,text,dir,size){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.popup(dir,size),text);
};
/*\
* Paper.tag
[ method ]
**
* Puts the given text into a 'tag' tooltip. The text is given a default style according to @g.txtattr. See @Element.tag
**
> Parameters
**
- x (number) x coordinate of the center of the tag loop
- y (number) y coordinate of the center of the tag loop
- text (string) text to place inside the tag
- angle (number) angle of orientation in degrees [default: `0`]
- r (number) radius of the loop [default: `5`]
**
= (object) set containing the tag path and the text element
> Usage
| paper.tag(50, 50, "$9.99", 60);
\*/
Raphael.fn.tag=function(x,y,text,angle,r){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.tag(angle,r),text);
};
/*\
* Paper.flag
[ method ]
**
* Puts the given `text` into a 'flag' tooltip. The text is given a default style according to @g.txtattr. See @Element.flag
**
> Parameters
**
- x (number) x coordinate of the flag's point
- y (number) y coordinate of the flag's point
- text (string) text to place inside the flag
- angle (number) angle of orientation in degrees [default: `0`]
**
= (object) set containing the flag path and the text element
> Usage
| paper.flag(50, 50, "$9.99", 60);
\*/
Raphael.fn.flag=function(x,y,text,angle){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.flag(angle),text);
};
/*\
* Paper.drop
[ method ]
**
* Puts the given text into a 'drop' tooltip. The text is given a default style according to @g.txtattr. See @Element.drop
**
> Parameters
**
- x (number) x coordinate of the drop's point
- y (number) y coordinate of the drop's point
- text (string) text to place inside the drop
- angle (number) angle of orientation in degrees [default: `0`]
**
= (object) set containing the drop path and the text element
> Usage
| paper.drop(50, 50, "$9.99", 60);
\*/
Raphael.fn.drop=function(x,y,text,angle){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.drop(angle),text);
};
/*\
* Paper.blob
[ method ]
**
* Puts the given text into a 'blob' tooltip. The text is given a default style according to @g.txtattr. See @Element.blob
**
> Parameters
**
- x (number) x coordinate of the blob's tail
- y (number) y coordinate of the blob's tail
- text (string) text to place inside the blob
- angle (number) angle of orientation in degrees [default: `0`]
**
= (object) set containing the blob path and the text element
> Usage
| paper.blob(50, 50, "$9.99", 60);
\*/
Raphael.fn.blob=function(x,y,text,angle){
varset=this.set();
text=this.text(x,y,text).attr(Raphael.g.txtattr);
returnset.push(text.blob(angle),text);
};
/**
* Brightness functions on the Element prototype
*/
/*\
* Element.lighter
[ method ]
**
* Makes the context element lighter by increasing the brightness and reducing the saturation by a given factor. Can be called on Sets.