Function Namespace vonline.Canvas
Defined in: canvas.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Class for managing the svg elements
|
Method Attributes | Method Name and Description |
---|---|
add(obj)
|
|
clear()
Deletes all object from canvas
|
|
createObject(data)
|
|
getObjectById(id)
|
|
getPaper()
|
|
getZoom()
|
|
load(json)
loads a document from its json representation
|
|
normalizeEvent(event)
normalizes the event.offsetX and event.offsetY value
|
|
<inner> |
onResize()
|
remove(obj)
|
|
setOffset(x, y)
|
|
setZoom(zoom)
|
Method Detail
add(obj)
- Parameters:
- {vonline.Base} obj
clear()
Deletes all object from canvas
createObject(data)
- Parameters:
- data
exportJSON()
{vonline.Base}
getObjectById(id)
- Parameters:
- {number} id
- Returns:
- {vonline.Base} object
getObjects()
getPaper()
getZoom()
initDragging()
initRectangleSelection()
load(json)
loads a document from its json representation
- Parameters:
- {array} json
- array containing the components
normalizeEvent(event)
normalizes the event.offsetX and event.offsetY value
- Parameters:
- event
<inner>
onResize()
remove(obj)
- Parameters:
- {vonline.Base} obj
setOffset(x, y)
- Parameters:
- x
- y
setZoom(zoom)
- Parameters:
- zoom