Symbol

Vecta.Symbol

new Vecta.Symbol(node)

Vecta symbol object.

NameTypeDescription
nodestring|SVGElement

ID or node of symbol

Properties

.$jQuery

The jQuery wrapped node for the symbol.

NameTypeDescription
$jQuery

jQuery wrapper for symbol node.

Methods

.delete()

Delete a symbol.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only.

Note that there is no return value because the symbol is deleted.

.desc([desc]) Returns: string|Vecta.Symbol

Get or set the symbol description.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only.

NameTypeAttributesDescription
descstringoptional

Undefined to get, valid description to set.

Returns:

Returns the description when get and Vecta.Symbol for chaining.

.drop(x, y) Returns: Vecta.Shape

Drop or insert a symbol onto a drawing.

NameTypeDescription
xnumber

X coordinate to drop symbol.

ynumber

Y coordinate to drop symbol.

Returns:

Returns the dropped symbol as a shape in the drawing.

.icon([shape]) Returns: string|Vecta.Symbol

Get or set icon for symbol.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only. Line ends, custom fonts and gradients (Linear or Radial) will be saved into the icon correctly.

NameTypeAttributesDescription
shapeVecta.Shapeoptional

Undefined if get, null to reset to default icon or valid Vecta.Shape if set.

Returns:

Returns the icon string if get or Vecta.Symbol if set, for chaining.

.id() Returns: string

Returns the symbol's id. Read only.

.index([index]) Returns: number|Vecta.Symbol

Reindex or get the index of a symbol. Index returned is zero-based.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only.

NameTypeAttributesDescription
indexnumberoptional

Undefined to get or a valid index number to set.

Returns:

Returns the index or Vecta.Symbol if set, for chaining.

.name([name]) Returns: string|Vecta.Symbol

Get or set the symbol name.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only.

NameTypeAttributesDescription
namestringoptional

Undefined to get, valid name to set.

Returns:

Returns the symbol name when get and Vecta.Symbol when set for chaining.

.stencil() Returns: Vecta.Stencil|null

Get the containing stencil, if any.

Returns:

Returns the containing stencil or null if not found.

.tags([tags]) Returns: string|Vecta.Symbol

Get or set the symbol tags.

User must have access to the stencil to write, with the exception for saved search stencil, which is read only.

NameTypeAttributesDescription
tagsstringoptional

Undefined to get, valid tags to set.

To set multiple tags, pass in a string of tags separated with commas, eg: "colors, icons, brands"

Returns:

Returns tags if get, or Vecta.Symbol when set, for chaining.