jQuery object
 Properties
Properties
.download
Shorthand method to initiate download
 Methods
Methods
.dialog($dialog, actions)
Shorthand method to open a dialog
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| $dialog | jQuery | Dialog element. Must be appended to the body in order for it to show | |||||||||||||||
| actions | object | Actions performed by dialog 
 | 
.doc() Returns: Vecta.Document
Shorthand method to get current document
Returns:
Returns Vecta.Document
Examples:
var document = $.doc(); //get current document.page([id]) Returns: Vecta.Page
Shorthand method to get a page by ID
| Name | Type | Attributes | Description | 
|---|---|---|---|
| id | string | optional | ID of page. If not provided, returns current activePage | 
Returns:
Returns Vecta.Page
Examples:
var page = $.page(); //get current active page.shape(name, [all]) Returns: null|Vecta.Shape|Vecta.Shape[]
Get a shape with a given name, or get all shapes starting with given name, by ignoring post fixes.
Names in Vecta must be unique, and therefore, if there is a duplicate, the name will be post fixed with an id. For example, 'A' will be post fixed to 'A.XXXXXXXX'.
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
| name | string | The name to find. | ||
| all | boolean | optional | false | False to get a single shape, or true to get all shapes. | 
Returns:
Returns null if the shape cannot be found, a single Vecta.Shape if all is false, or an array of Vecta.Shape if all is true.
If nothing is found with all === true, a zero length array will be returned.
Examples:
$.shape('A'); //returns a single shape with name = 'A'
$.shapes('A'); //returns all shapes starting with name = 'A', including 'A.123' but not 'AA'..shapes([name]) Returns: *
Get direct child shapes on the page or shapes with name
| Name | Type | Attributes | Description | 
|---|---|---|---|
| name | string | optional | Get direct child shapes if undefined or child shapes with name if supplied. | 
Returns:
Returns direct child shapes in an array of Vecta.Shape objects.
If none is found, a zero length array is returned.
Examples:
$.shapes(); //returns all immediate child shapes on the page.