Interface: EditorContext

utilities.EditorContext

An object that creates SVG elements for the canvas.

Properties:
Name Type Description
pathActions module:path.pathActions
Source:

Methods

addSVGElementsFromJson(data) → {Element}

Create a new SVG element based on the given object keys/values and add it to the current layer. The element will be run through cleanupElement before being returned.

Parameters:
Name Type Description
data module:utilities.SVGElementJSON
Source:
Returns:

The new element

Type
Element

getBaseUnit() → {string}

Source:
Returns:
Type
string

getDOMContainer() → {HTMLElement}

Source:
Returns:
Type
HTMLElement

getDOMDocument() → {HTMLDocument}

Source:
Returns:
Type
HTMLDocument

getSelectedElements() → {Array.<Element>}

Source:
Returns:

the array with selected DOM elements

Type
Array.<Element>

getSnappingStep() → {Float|string}

Source:
Returns:
Type
Float | string

getSvgContent() → {SVGSVGElement}

Source:
Returns:
Type
SVGSVGElement

getSvgRoot() → {SVGSVGElement}

Source:
Returns:
Type
SVGSVGElement