Rendering hint for configuring the canvas.
Specifies the spacing to be added to the bottom spacing. Default is 0. Use the value 1 here to get the same label positions as in mxGraph 1.x.
Specifies the spacing to be added to the left spacing. Default is 0.
Specifies the spacing to be added to the right spacing. Default is 0.
Specifies the spacing to be added to the top spacing. Default is 0. Use the value 5 here to get the same label positions as in mxGraph 1.x.
Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.
Holds the Rectangle that specifies the bounds of this shape.
Specifies if caching for HTML labels should be enabled. Default is true.
Holds the dialect in which the shape is to be painted. This can be one of the DIALECT constants in Constants.
Specifies if the string size should be measured in
Specifies if the actual string size should be measured. If disabled the
boundingBox will not ignore the actual size of the string, otherwise
Contains the last rendered text value. Used for caching.
Minimum stroke width for SVG output.
Holds the outermost DOM node that represents this shape.
Specifies if the shape should be drawn as an outline. This disables all
fill colors and can be used to disable other drawing states that should
not be painted for outlines. Default is false. This should be set before
calling
Specifies if pointer events should be handled. Default is true.
Holds the array of
Switch to preserve image aspect.
Specifies if linefeeds in HTML labels should be replaced with BR tags. Default is true.
Holds the scale in which the shape is being painted.
Specifies if pointer events outside of shape should be handled. Default is false.
Optional reference to the corresponding
Holds the StencilShape that defines the shape.
Specifies if pointer events outside of stencils should be handled. Default is false. Set this to true for backwards compatibility with the 1.x branch.
Optional reference to the style of the corresponding
Specifies if pointer events should be handled. Default is true.
Event-tolerance for SVG strokes (in px).
This is only passed to the canvas in createSvgCanvas if pointerEvents is true
.
Allows to use the SVG bounding box in SVG. Default is false for performance reasons.
Rotation for vertical text. Default is -90 (bottom to top).
Specifies if the shape is visible. Default is true.
Paints the given points with rounded corners.
Extends mxShape to update the text styles.
Augments the bounding box with the strokewidth and shadow offsets.
Returns true if the bounds are not null and all of its variables are numeric.
Removes all child nodes and resets all CSS.
Sets the state of the canvas for drawing the shape.
Creates and returns the DOM node for the shape.
This implementation assumes that maxGraph
produces SVG elements.
Returns a new rectangle that represents the bounding box of the bare shape with no shadows or strokewidths.
Creates a new canvas for drawing this shape. May return null.
Creates and returns an SvgCanvas2D for rendering this shape.
Adds a transparent rectangle that catches all events.
Destroys the shape by removing it from the DOM and releasing the DOM node associated with the shape using Event#release.
Destroys the given canvas which was used for drawing. This implementation increments the reference counts on all shared gradients used in the canvas.
Returns the arc size for the given dimension.
Returns the node that contains the rendered input.
Returns the current cursor.
Returns the bounding box for the gradient box for this shape.
Private helper function to create SVG elements
Returns the rotation from the style.
Returns 0 to avoid using rotation in the canvas via updateTransform.
Disables offset in IE9 for crisper image output.
Private helper function to create SVG elements
Returns the rotation for the text label of the corresponding shape.
Initializes the shape by creaing the DOM node using
DOM node that will contain the shape.
Sets the styles to their default values.
Returns true if HTML is allowed for this shape. This implementation always returns false.
Inverts the bounds if Shape#isBoundsInverted returns true or if the horizontal style is false.
Hook for subclassers.
Hook for subclassers. This implementation is empty.
Hook for subclassers. This implementation is empty.
Hook for subclassers. This implementation is empty.
Paints the glass gradient effect.
Paints the vertex shape.
Renders the text using the given DOM nodes.
Updates the HTML node(s) to reflect the latest bounds and scale.
Updates the SVG or VML shape.
Resets all styles.
Sets the cursor on the given shape.
The cursor to be used.
Sets a transparent background CSS style to catch all events.
Paints the line shape.
Updates the
Updates the bounds based on the points.
Updates the HTML node(s) to reflect the latest bounds and scale.
Sets the inner HTML of the given element to the
Returns the spacing as an Point.
Updates the HTML node(s) to reflect the latest bounds and scale.
Sets the scale and rotation on the given canvas.
Updates the HTML node(s) to reflect the latest bounds and scale.
Extends Shape to implement a text shape.
To change vertical text from "bottom to top" to "top to bottom", the following code can be used: