graphics/js/SVGGraphic.js:1
SVG implementation of the Graphic class.
SVGGraphic is not intended to be used directly. Instead, use the Graphic class.
If the browser has SVG capabilities, the Graphic
class will point to the SVGGraphic class.
_appendShapeshape
Defined in
graphics/js/SVGGraphic.js:460
Adds a shape instance to the graphic instance.
shape
Shape
The shape instance to be added to the graphic.
_createGraphicNodetype
pe
Defined in
graphics/js/SVGGraphic.js:822
Creates a graphic node
HTMLElement
_getDocFrag
Defined in
graphics/js/SVGGraphic.js:649
Returns a document fragment to for attaching shapes.
DocumentFragment
_getShapeClassval
Defined in
graphics/js/SVGGraphic.js:589
Returns a shape class. Used by addShape.
Function
_getUpdatedContentBounds
Defined in
graphics/js/SVGGraphic.js:770
Recalculates and returns the contentBounds for the Graphic instance.
_removeChildrennode
Defined in
graphics/js/SVGGraphic.js:527
Removes all child nodes.
node
HTMLElement
_toBackShape
Defined in
graphics/js/SVGGraphic.js:900
Inserts shape as the first child of the content node.
Shape
SVGShape
to add.
_toFrontShape
Defined in
graphics/js/SVGGraphic.js:880
Inserts shape on the top of the tree.
Shape
SVGShape
to add.
_toggleVisibleval
Defined in
graphics/js/SVGGraphic.js:557
Toggles visibility
val
Boolean
indicates visibilitye
addShapecfg
Defined in
graphics/js/SVGGraphic.js:440
Generates a shape instance by type.
cfg
Object
attributes for the shape
Shape
addToRedrawQueueshape
Defined in
graphics/js/SVGGraphic.js:739
Adds a shape to the redraw queue and calculates the contentBounds. Used internally
by Shape instances.
shape
SVGShape
batchmethod
Defined in
graphics/js/SVGGraphic.js:635
Allows for creating multiple shapes in order to batch appending and redraw operations.
method
Function
Method to execute.
getGradientNodekey
type
Defined in
graphics/js/SVGGraphic.js:842
Returns a reference to a gradient definition based on an id and type.
HTMLElement
getShapeByIdid
Defined in
graphics/js/SVGGraphic.js:622
Returns a shape based on the id of its dom node.
id
String
Dom id of the shape's node attribute.
Shape
getXY
Defined in
graphics/js/SVGGraphic.js:337
Gets the current position of the graphic instance in page coordinates.
Array The XY position of the shape.
removeAllShapes
Defined in
graphics/js/SVGGraphic.js:508
Removes all shape instances from the dom.
removeShapeshape
Defined in
graphics/js/SVGGraphic.js:481
Removes a shape instance from from the graphic instance.
renderparentNode
Defined in
graphics/js/SVGGraphic.js:386
Adds the graphics node to the dom.
parentNode
HTMLElement
node in which to render the graphics node into.
_shapeClass
Defined in
graphics/js/SVGGraphic.js:607
Look up for shape classes. Used by addShape to retrieve a class for instantiation.
autoDraw
Defined in
graphics/js/SVGGraphic.js:238
Indicates whether or not the instance will automatically redraw after a change is made to a shape. This property will get set to false when batching operations.
Default: true
autoSize
Defined in
graphics/js/SVGGraphic.js:132
Determines the sizing of the Graphic.
width and height attributes or are determined by the dimensions of the parent element. The
content contained in the Graphic will be sized to fit with in the Graphic instance's dimensions. When using this
setting, the preserveAspectRatio attribute will determine how the contents are sized.width
and height attributes or are determined by the dimensions of the parent element. The contents of the
Graphic instance are not affected by this setting.Default: false
contentBounds
Defined in
graphics/js/SVGGraphic.js:66
Object containing size and coordinate data for the content of a Graphic in relation to the coordSpace node.
node
Defined in
graphics/js/SVGGraphic.js:82
The html element that represents to coordinate system of the Graphic instance.
preserveAspectRatio
Defined in
graphics/js/SVGGraphic.js:156
Determines how content is sized when autoSize is set to sizeContentToGraphic.
Default: xMidYMid
render
Defined in
graphics/js/SVGGraphic.js:18
Whether or not to render the Graphic automatically after to a specified parent node after init. This can be a Node
instance or a CSS selector string.
resizeDown
Defined in
graphics/js/SVGGraphic.js:181
The contentBounds will resize to greater values but not to smaller values. (for performance) When resizing the contentBounds down is desirable, set the resizeDown value to true.
shapes
Defined in
graphics/js/SVGGraphic.js:50
Key value pairs in which a shape instance is associated with its id.