Class Karma.kSvg
This object is the prototype for each svg element submitted to Karma in the
Karma() method
Defined in: karma.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Prototype object for each svg element submitted to Karma in the
Karma() method
|
Field Attributes | Field Name and Description |
---|---|
<static> |
Karma.kSvg.doc
Reference to the SVGDocument.
|
<static> |
Karma.kSvg.domId
Element ID for canvas element in html document.
|
<static> |
Karma.kSvg.height
height of element
|
<static> |
Karma.kSvg.name
name of instance, used internally
|
<static> |
Karma.kSvg.node
Reference to the DOM element.
|
<static> |
Karma.kSvg.root
Reference to the root element of the SVG Document
|
<static> |
Karma.kSvg.status
Status of element, either "loaded" or "error"
|
<static> |
Karma.kSvg.visible
Whether canvas is visible.
|
<static> |
Karma.kSvg.width
width of element
|
Class Detail
Karma.kSvg()
Prototype object for each svg element submitted to Karma in the
Karma() method
- Throws:
- {Error}
- if the name and domId for the svg element are not specified
Field Detail
<static>
{SVGDocument}
Karma.kSvg.doc
Reference to the SVGDocument. You can use the this.doc to manipulate
the SVG document
var myElem = Karma.svg.someSvg.doc.getElementById('foobar'); Karma.svg.someSvg.doc.createElement(...); Karma.svg.someSvg.doc.removeChild(someNode);
- Default Value:
- undefined
<static>
{String}
Karma.kSvg.domId
Element ID for canvas element in html document.
- Default Value:
- undefined
<static>
{number}
Karma.kSvg.height
height of element
- Default Value:
- 0
<static>
Karma.kSvg.name
name of instance, used internally
- Default Value:
- ""
<static>
{DOMElement}
Karma.kSvg.node
Reference to the DOM element.
//You can access all properties and methods of the underlying DOM element //using the 'node' property Karma.svg.someSvg.node.dispatchEvent; Karma.svg.someSvg.node.addEvenListener(...);
- Default Value:
- undefined
<static>
{DocumentElement}
Karma.kSvg.root
Reference to the root element of the SVG Document
// The root element is equivalent to "document" in a regular html document // The root attribute is used frequently with the jQuery SVG plugin for CSS selectors $('#someId', Karma.svg.someSvg.root).css(.. manipulate css attributes ...);
- Default Value:
- undefined
<static>
{string}
Karma.kSvg.status
Status of element, either "loaded" or "error"
- Default Value:
- ""
<static>
{boolean}
Karma.kSvg.visible
Whether canvas is visible. This value is read-only
- Default Value:
- true
<static>
{number}
Karma.kSvg.width
width of element
- Default Value:
- 0