Class Biojs.RaphaelCanvas
Version
1.0.0.
Extends
Biojs.
Defined in: Biojs.RaphaelCanvas.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Biojs.RaphaelCanvas(options)
This is the description of the RaphaelCanvas component.
|
| Field Attributes | Field Name and Description |
|---|---|
| <inner> |
Array containing the supported event names
|
| <inner> |
Default values for the options
|
| Method Attributes | Method Name and Description |
|---|---|
|
constructor(options)
|
|
|
init()
|
|
|
setVbox(x, y, dim)
|
|
|
zoompan(e)
|
|
- Methods borrowed from class Biojs:
- addListener, extend, getId, listen, raiseEvent, setEventHandlers, setOptions
| Event Attributes | Event Name and Description |
|---|---|
|
onClick(actionPerformed)
|
|
|
onHelloSelected(actionPerformed)
|
Class Detail
Biojs.RaphaelCanvas(options)
This is the description of the RaphaelCanvas component. This component provides pan/zoom functionality over Raphael's paper object,
and saves repitition of development effort involved in pan/zoom in other components.
Author: Swanand Gore.
Author: Swanand Gore.
var instance = new Biojs.RaphaelCanvas({
divid:"YourOwnDivId", dimension:500
});
instance.testSetup();
- Parameters:
- {Object} options
- An object with the options for RaphaelCanvas component.
- Options detailed:
- {String} divid
- the div in which the canvas should be created.
- {Number} dimension
- the side of the square canvas
- Requires:
- Raphael 2.1.0
- jQuery Core 1.7.2
Field Detail
<inner>
eventTypes
Array containing the supported event names
<inner>
opt
Default values for the options
Method Detail
constructor(options)
- Parameters:
- options
event2paperxy(e)
- Parameters:
- e
init()
makeZoomPannable()
recordMousedown(e)
- Parameters:
- e
setVbox(x, y, dim)
- Parameters:
- x
- y
- dim
testSetup()
zoompan(e)
- Parameters:
- e
zoompanMouseactivity(e)
- Parameters:
- e
Event Detail
onClick(actionPerformed)
instance.onClick(
function( objEvent ) {
alert("The character " + objEvent.selected + " was clicked.");
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {Object} source
- The component which did triggered the event.
- {string} type
- The name of the event.
- {int} selected
- Selected character.
onHelloSelected(actionPerformed)
instance.onHelloSelected(
function( objEvent ) {
alert("The word " + objEvent.textSelected + " was selected.");
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {Object} source
- The component which did triggered the event.
- {string} type
- The name of the event.
- {int} textSelected
- Selected text, will be 'Hello' obviously.