CanvasGraphic.js revision 9eaaa502227248d304ac9170902697d02158c1d9
225N/A * CanvasGraphic is a simple drawing api that allows for basic drawing operations. 225N/A * Gets the current position of the node in page coordinates. 225N/A * @return Array The XY position of the shape. 225N/A * Indicates whether or not the instance will size itself based on its contents. 225N/A * Indicates whether or not the instance will automatically redraw after a change is made to a shape. 225N/A * This property will get set to false when batching operations. 225N/A * Initializes the class. 225N/A * Sets the size of the graphics object. 225N/A * @param w {Number} width to set for the instance. 225N/A * @param h {Number} height to set for the instance. * Updates the size of the graphics object * @param {Number} w width * @param {Number} h height * Sets the positon of the graphics object. * @param {Number} x x-coordinate for the object. * @param {Number} y y-coordinate for the object. * Adds the graphics node to the dom. * @param {HTMLElement} parentNode node in which to render the graphics node into. * Shows and and hides a the graphic instance. * @param val {Boolean} indicates whether the instance should be visible. * Adds a shape instance to the graphic instance. * @param {Shape} shape The shape instance to be added to the graphic. * Generates a shape instance by type. * @param {String} type type of shape to generate. * @param {Object} cfg attributes for the shape * Allows for creating multiple shapes in order to batch appending and redraw operations. * @param {Function} method Method to execute. * Removes all child nodes. * @method _removeChildren * @param {HTMLElement} node