Methods
addConnections(_cInfo)
This Function adds connections between two shapes
Parameters:
| Name | Type | Description |
|---|---|---|
_cInfo |
Object | Has the following format {"beginShape":shape,"endShape":shape,pos:{x1:0,y1:0,x2:100,y2:100}} |
- Source:
Returns:
- nothing
addShape(_shape)
This Function adds shapes and registers it for the sheet
Parameters:
| Name | Type | Description |
|---|---|---|
_shape |
Shape |
- Source:
Returns:
- nothing
drawConnections()
This Function draws or paint all the connecting lines between the Shapes
This function has undergone changes hence may not be working at this point. Will fix it in the next release
- Source:
Returns:
- nothing
getCanvas()
This Function returns symbolic canvas. A Canvas does not necessarily be an HTML Canvas element.
- Source:
Returns:
- nothing
getImage() → {DataURL}
This Function converts the Sheet into an image
- Source:
Returns:
- dataURL
- Type
- DataURL
init()
This Function is for internal use only, it initalizes the Sheet
- Source:
Returns:
- nothing
redo()
This Function redoes the last undo invokation
Upto 5 redos are allowed and this is controled by maxRedo variable
- Source:
Returns:
- nothing
reDraw()
This Function redraws (or repaints) the Sheet
- Source:
Returns:
- nothing
refreshConnections()
This Function rebuilds the connections (connecting lines between Shapes)
- Source:
Returns:
- nothing
removeConnections(_shape)
This Function removes any connection to the shape. The connection can be incoming or outgoing
Parameters:
| Name | Type | Description |
|---|---|---|
_shape |
Shape |
- Source:
Returns:
- nothing
removeLastShape()
This Function removes the last added Shape in the Sheet
- Source:
Returns:
- nothing
removeShape(_shape)
This Function removes a given Shape from the SheetBook
Parameters:
| Name | Type | Description |
|---|---|---|
_shape |
Shape |
- Source:
Returns:
- nothing
save() → {Object}
This function returns saved json format
- Source:
Returns:
saved JSON
- Type
- Object
totalShapeArea() → {float}
This Function Calculates and Aggregates the area of all the shapes within a Sheet
Underconstruction
- Source:
Returns:
- - area
- Type
- float
undo()
This Function undoes the last added or deleted Shape
Property changes are undone yet, will be added in the next upcoming versions
- Source:
Returns:
- nothing
wipe()
This Function wipes any drawing, object etc within a Sheet
- Source:
Returns:
- nothing