Class Index | File Index

Classes


Namespace vonline.Base


Defined in: base.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Base class for canvas objects
Field Summary
Field Attributes Field Name and Description
<static>  
vonline.Base.defaultData
default values and json format specification
Method Summary
Method Attributes Method Name and Description
 
sets the correct position of the inlined text
 
changeText(text)
 
 
returns the object id
 
creates a text within the object
 
catches the mouse events
 
fitsIn(bounding)
Checks if bounding contains the current object
 
 
tests if an object with given id is connected to the current object
 
 
show annotation handles
 
 
setCanvas(canvas)
Displays the element on the canvas
 
 
setColor(color)
 
show connection handles
 
setDragEventMode(objects, ondrag)
 
Set the position of the component Note that this function sets the absolute position by the top-left corner of the bounding box
 
 
 
setScale(x, y, origX, origY)
 
setSelection(active, selected)
 
setTextMode(active)
enables/disables the object text show/hide event
 
Translates the object by the given values
 
Returns the JSON representation of the object
 
 
 
 
updates rotation-circle and rotation-handle on object changes
 
updateSelection(controls)
Namespace Detail
vonline.Base
Base class for canvas objects
Field Detail
<static> vonline.Base.defaultData
default values and json format specification
Method Detail
adjustText()
sets the correct position of the inlined text

changeText(text)
Parameters:
{string} text

clickEventHandler(event)
Parameters:
event

createObjectId()
returns the object id

createText()
creates a text within the object

dragEventHandler(event)
catches the mouse events
Parameters:
event

fitsIn(bounding)
Checks if bounding contains the current object
Parameters:
{object} bounding
Specified by (x, y, width, height)

getId()

isConnectedTo(obj)
tests if an object with given id is connected to the current object
Parameters:
{vonline.Base} obj

isResizeable()

setAnnotationMode(active)
show annotation handles
Parameters:
active

setBorder()

setCanvas(canvas)
Displays the element on the canvas
Parameters:
{vonline.Canvas} canvas

setClickEventMode(active)
Parameters:
{boolean} active

setColor(color)
Parameters:
{string} color
See:
http://raphaeljs.com/reference.html#colour

setConnectionMode(active)
show connection handles
Parameters:
active

setDragEventMode(objects, ondrag)
Parameters:
{vonline.Base / array} objects
{function} ondrag
(optional) is executed on drag (e.g. for updating interface)

setPosition(x, y)
Set the position of the component Note that this function sets the absolute position by the top-left corner of the bounding box
Parameters:
{integer} x
{integer} y

setRotation(deg)
Parameters:
{int} deg
Degree between 0...360°

setRotationMode(active)
Parameters:
{boolean} active

setScale(x, y, origX, origY)
Parameters:
{float} x
{float} y
{number} origX
{number} origY

setSelection(active, selected)
Parameters:
{boolean} active
{number} selected
Number of selected objects

setTextMode(active)
enables/disables the object text show/hide event
Parameters:
active

setTranslation(x, y)
Translates the object by the given values
Parameters:
{integer} x
{integer} y

{json} toJSON()
Returns the JSON representation of the object
Returns:
{json} this.data

updateAnnotationHandle()

updateConnectionHandles()

updateInlineTextHandle()

updateRotationHandles()
updates rotation-circle and rotation-handle on object changes

updateSelection(controls)
Parameters:
{boolean} controls
Show controls

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Mar 03 2011 22:07:38 GMT+0100 (MEZ)