Canvas implementation of the
CanvasGraphic is not intended to be used directly. Instead, use the
If the browser lacks SVG capabilities but has
Canvas capabilities, the
class will point to the
Adds a shape instance to the graphic instance.
The shape instance to be added to the graphic.
Determines the value for either an x or y value to be used for the
translate of the Graphic.
Returns a document fragment to for attaching shapes.
Returns a shape class. Used by
Recalculates and returns the
contentBounds for the
Redraws all shapes.
Removes all child nodes.
Inserts shape as the first child of the content node.
Inserts shape on the top of the tree.
Generates a shape instance by type.
attributes for the shape
Adds a shape to the redraw queue and calculates the contentBounds. Used internally
shape The shape instance to add to the queue
Allows for creating multiple shapes in order to batch appending and redraw operations.
Method to execute.
Clears the graphics object.
Removes all nodes.
Returns a shape based on the id of its dom node.
Dom id of the shape's node attribute.
Gets the current position of the graphic instance in page coordinates.
Array The XY position of the shape.
Initializes the class.
Removes all shape instances from the dom.
Removes a shape instance from from the graphic instance.
Adds the graphics node to the dom.
node in which to render the graphics node into.
Sets the value of an attribute.
Look up for shape classes. Used by
addShape to retrieve a class for instantiation.
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.
Determines the sizing of the Graphic.
heightattributes 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
preserveAspectRatioattribute will determine how the contents are sized.
heightattributes or are determined by the dimensions of the parent element. The contents of the Graphic instance are not affected by this setting.
Object containing size and coordinate data for the content of a Graphic in relation to the graphic instance's position.
Indicates the height of the
Unique id for class instance.
The outermost html element of the Graphic instance.
Determines how content is sized when
autoSize is set to
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.
The contentBounds will resize to greater values but not smaller values. (for performance) When resizing the contentBounds down is desirable, set the resizeDown value to true.
Key value pairs in which a shape instance is associated with its id.
Indicates whether the
Graphic and its children are visible.
Indicates the width of the
Indicates the x-coordinate for the instance.
Indicates the y-coordinate for the instance.