graphics-vml-debug.js revision 9ef05fa33949a0e91fa62aea328cc344e8a606ca
e07d9cb85217949d497b02d7211de8a197d2f2ebzffunction VMLDrawing() {}
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * Draws a bezier curve.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method curveTo
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cp1x x-coordinate for the first control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cp1y y-coordinate for the first control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cp2x x-coordinate for the second control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cp2y y-coordinate for the second control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf x = Math.round(x);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf y = Math.round(y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._path += ' c ' + Math.round(cp1x) + ", " + Math.round(cp1y) + ", " + Math.round(cp2x) + ", " + Math.round(cp2y) + ", " + x + ", " + y;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws a quadratic bezier curve.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method quadraticCurveTo
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cpx x-coordinate for the control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} cpy y-coordinate for the control point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws a rectangle.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method drawRect
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} w width
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} h height
e07d9cb85217949d497b02d7211de8a197d2f2ebzf drawRect: function(x, y, w, h) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.moveTo(x, y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.lineTo(x + w, y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.lineTo(x + w, y + h);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.lineTo(x, y + h);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.lineTo(x, y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws a rectangle with rounded corners.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method drawRect
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} w width
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} h height
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} ew width of the ellipse used to draw the rounded corners
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} eh height of the ellipse used to draw the rounded corners
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws a wedge.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate of the wedge's center point
020c47705d28102a8df83a43ddf08e34dde21f22ql * @param {Number} y y-coordinate of the wedge's center point
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} startAngle starting angle in degrees
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} arc sweep of the wedge. Negative values draw clockwise.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} radius radius of wedge. If [optional] yRadius is defined, then radius is the x radius.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} yRadius [optional] y radius for wedge.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf drawWedge: function(x, y, startAngle, arc, radius, yRadius)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._path += this._getWedgePath({x:x, y:y, startAngle:startAngle, arc:arc, radius:radius, yRadius:yRadius});
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Generates a path string for a wedge shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _getWedgePath
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Object} config attributes used to create the path
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf path = " m " + x + " " + y + " ae " + x + " " + y + " " + radius + " " + yRadius + " " + startAngle + " " + arc;
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * Completes a drawing operation.
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * @method end
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer end: function() {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws a line segment using the current line style from the current drawing position to the specified x and y coordinates.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method lineTo
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} point1 x-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} point2 y-coordinate for the end point.
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang if (typeof point1 === 'string' || typeof point1 === 'number') {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._path += ' ' + Math.round(args[i][0]) + ', ' + Math.round(args[i][1]);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Moves the current drawing position to specified x and y coordinates.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method moveTo
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate for the end point.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf moveTo: function(x, y) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._path += ' m ' + Math.round(x) + ', ' + Math.round(y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._trackSize(x, y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Updates the size of the graphics object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _trackSize
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} w width
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} h height
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf _trackSize: function(w, h) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if (w > this._right) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if(w < this._left)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if (h < this._top)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if (h > this._bottom)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Base class for creating shapes.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @class VMLShape
e07d9cb85217949d497b02d7211de8a197d2f2ebzfVMLShape = function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf init: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Initializes the shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * @method _initialize
e07d9cb85217949d497b02d7211de8a197d2f2ebzf var host = this,
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf createNode: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf classString = 'vml' + type + ' yui3-vmlShape yui3-' + this.constructor.NAME;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf nodestring = '<' + type + ' xmlns="urn:schemas-microsft.com:vml" id="' + id + '" class="' + classString + '" style="behavior:url(#default#VML);display:inline-block;position:absolute;left:' + x + 'px;top:' + y + 'px;width:' + w + 'px;height:' + h + 'px;"';
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang nodestring += ' stroked="t" strokecolor="' + stroke.strokeColor + '" strokeWeight="' + stroke.strokeWeight + 'px"';
e07d9cb85217949d497b02d7211de8a197d2f2ebzf strokestring = '<stroke class="vmlstroke" xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;"';
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Add a class name to each node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method addClass
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} className the class name to add to the node's class attribute
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Removes a class name from each node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method removeClass
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} className the class name to remove from the node's class attribute
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Gets the current position of the node in page coordinates.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method getXY
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Array The XY position of the shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getXY: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Set the position of the shape in page coordinates, regardless of how the node is positioned.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method setXY
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Array} Contains X & Y values for new position (coordinates are page-based)
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method contains
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {VMLShape | HTMLElement} needle The possible node or descendent
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Boolean Whether or not this shape is the needle or its ancestor.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Compares nodes to determine if they match.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Node instances can be compared to each other and/or HTMLElements.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method compareTo
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {HTMLElement | Node} refNode The reference node to compare to the node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return {Boolean} True if the nodes match, false if they do not.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Test if the supplied node matches the supplied selector.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method test
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} selector The CSS selector to test against.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Boolean Wheter or not the shape matches the selector.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf stroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Adds a stroke to the shape node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _strokeChangeHandler
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf stroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf fillstring = '<fill xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;" opacity="' + fillOpacity + '"';
e07d9cb85217949d497b02d7211de8a197d2f2ebzf props.node = '<fill xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;" opacity="' + fillOpacity + '" color="' + fill.color + '"/>';
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Adds a fill to the shape node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _fillChangeHandler
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if(this._fillNode && this._fillNode.getAttribute("type") == "solid")
e07d9cb85217949d497b02d7211de8a197d2f2ebzf fillstring = '<fill xmlns="urn:schemas-microsft.com:vml" class="vmlfill" opacity="' + fillOpacity + '" color="' + fill.color + '"/>';
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._fillNode = null;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf gradientProps.focussize = (gradientBoxWidth/w)/10 + "% " + (gradientBoxHeight/h)/10 + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //gradientProps.focusSize = ((r - cx) * 10) + "% " + ((r - cy) * 10) + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf gradientProps.focusposition = Math.round(fx * 100) + "% " + Math.round(fy * 100) + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf for(;i < len; ++i) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._fillNode.focussize = (gradientBoxWidth/w)/10 + "% " + (gradientBoxHeight/h)/10 + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //this._fillNode.focusSize = ((r - cx) * 10) + "% " + ((r - cy) * 10) + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._fillNode.focusposition = Math.round(fx * 100) + "% " + Math.round(fy * 100) + "%";
e07d9cb85217949d497b02d7211de8a197d2f2ebzf for(;i < len; ++i) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._transformArgs[type] = Array.prototype.slice.call(args, 0);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf var host = this,
e07d9cb85217949d497b02d7211de8a197d2f2ebzf sinRadians = parseFloat(parseFloat(Math.sin(absRot * radCon)).toFixed(8));
e07d9cb85217949d497b02d7211de8a197d2f2ebzf cosRadians = parseFloat(parseFloat(Math.cos(absRot * radCon)).toFixed(8));
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Storage for translateX
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Storage for translateY
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies translate transformation.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method translate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x The x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y The y-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf translate: function(x, y)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies a skew to the x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method skewX:q
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf skewX: function(x)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //var node = this.node;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies a skew to the x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method skewX:q
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf skewY: function(y)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //var node = this.node;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies a rotation.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method rotate
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies a scale transform
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method scale
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} val
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //var node = this.node;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Applies a matrix transformation
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method matrix
e07d9cb85217949d497b02d7211de8a197d2f2ebzf matrix: function(a, b, c, d, e, f)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //var node = this.node;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if(type.indexOf('mouse') > -1 || type.indexOf('click') > -1)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return true;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return false;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf _updateHandler: function(e)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Creates a graphic node
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _createGraphicNode
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} type node type to create
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} specified pointer-events value
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return HTMLElement
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return document.createElement('<' + type + ' xmlns="urn:schemas-microsft.com:vml" class="vml' + type + '"/>');
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Value function for fill attribute
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _getDefaultFill
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf _getDefaultFill: function() {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Value function for stroke attribute
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _getDefaultStroke
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf set: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf var host = this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Returns the bounds for a shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method getBounds
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getBounds: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Destroys shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method destroy
e07d9cb85217949d497b02d7211de8a197d2f2ebzf destroy: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf var parentNode = this._graphic && this._graphic._node ? this._graphic._node : null,
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * An array of x, y values which indicates the transformOrigin in which to rotate the shape. Valid values range between 0 and 1 representing a
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * fraction of the shape's corresponding bounding box dimension. The default value is [0.5, 0.5].
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute transformOrigin
ff3124eff995e6cd8ebd8c6543648e0670920034ff * @type Array
e07d9cb85217949d497b02d7211de8a197d2f2ebzf valueFn: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * The rotation (in degrees) of the shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute rotation
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._rotation;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Performs a translate on the x-coordinate. When translating x and y coordinates,
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * use the <code>translate</code> method.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute translateX
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._translateX;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._addTransform("translate", [val, this._translateY]);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Performs a translate on the y-coordinate. When translating x and y coordinates,
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * use the <code>translate</code> method.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute translateX
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._translateY;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._addTransform("translate", [this._translateX, val]);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the x position of shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute x
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the y position of shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute y
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Unique id for class instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute id
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf valueFn: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return Y.guid();
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute width
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute height
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates whether the shape is visible.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute visible
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Boolean
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Contains information about the fill of the shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>color</dt><dd>The color of the fill.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the fill. The default value is 1.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>type</dt><dd>Type of fill.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>solid</dt><dd>Solid single color fill. (default)</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>linear</dt><dd>Linear gradient fill.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>radial</dt><dd>Radial gradient fill.</dd>
fe3e6e3a98f98e7ab1a751934c0116fb914b9c82Quaker Fang * <p>If a gradient (linear or radial) is specified as the fill type. The following properties are used:
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>stops</dt><dd>An array of objects containing the following properties:
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>color</dt><dd>The color of the stop.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stop. The default value is 1. Note: No effect for IE <= 8</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>offset</dt><dd>Number between 0 and 1 indicating where the color stop is positioned.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt></dt><dd></dd>
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * <dt></dt><dd></dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt></dt><dd></dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute fill
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf //ensure, fill type is solid if color is explicitly passed.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Contains information about the stroke of the shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>color</dt><dd>The color of the stroke.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>weight</dt><dd>Number that indicates the width of the stroke.</dd>
ff3124eff995e6cd8ebd8c6543648e0670920034ff * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stroke. The default value is 1.</dd>
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * <dt>dashstyle</dt>Indicates whether to draw a dashed stroke. When set to "none", a solid stroke is drawn. When set to an array, the first index indicates the
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * length of the dash. The second index indicates the length of gap.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute stroke
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Object
fb91fd8a302dfb13e250bbefb6a3970c2edc3ae3zf * Indicates whether or not the instance will size itself based on its contents.
fb91fd8a302dfb13e250bbefb6a3970c2edc3ae3zf * @attribute autoSize
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Boolean
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Determines whether the instance will receive mouse events.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute pointerEvents
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type string
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Reference to the container Graphic.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute graphic
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Graphic
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._graphic;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * The VMLPath class creates a graphic object with editable
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * properties.
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * @class VMLPath
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @extends VMLShape
e07d9cb85217949d497b02d7211de8a197d2f2ebzfVMLPath = function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzfY.extend(VMLPath, Y.VMLShape, Y.merge(Y.VMLDrawing.prototype, {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the type of shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @property _type
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @readOnly
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws the graphic.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _draw
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf _draw: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf if(w && h)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Completes a drawing operation.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method end
e07d9cb85217949d497b02d7211de8a197d2f2ebzf end: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Clears the path.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method clear
e07d9cb85217949d497b02d7211de8a197d2f2ebzf clear: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the width of the shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute width
ff3124eff995e6cd8ebd8c6543648e0670920034ff * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._width;
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * Indicates the height of the shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute height
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._height;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the path used for the node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute path
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._path;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws rectangles
e07d9cb85217949d497b02d7211de8a197d2f2ebzfVMLRect = function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the type of shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @property _type
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @readOnly
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws an ellipse
e07d9cb85217949d497b02d7211de8a197d2f2ebzfVMLEllipse = function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf VMLEllipse.superclass.constructor.apply(this, arguments);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the type of shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @property _type
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @readOnly
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Horizontal radius for the ellipse.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute xRadius
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Vertical radius for the ellipse.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute yRadius
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Draws an circle
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the type of shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @property _type
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @readOnly
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Horizontal radius for the circle.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute radius
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Width of the circle
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute width
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Width of the circle
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute width
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * VMLGraphic is a simple drawing api that allows for basic drawing operations.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @class VMLGraphic
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @constructor
e07d9cb85217949d497b02d7211de8a197d2f2ebzfVMLGraphic = function() {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf VMLGraphic.superclass.constructor.apply(this, arguments);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Unique id for class instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute id
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type String
e07d9cb85217949d497b02d7211de8a197d2f2ebzf valueFn: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return Y.guid();
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Key value pairs in which a shape instance is associated with its id.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute shapes
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @readOnly
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._shapes;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Object containing size and coordinate data for the content of a Graphic in relation to the coordSpace node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute contentBounds
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Object
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._contentBounds;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * The html element that represents to coordinate system of the Graphic instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute node
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type HTMLElement
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._node;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Determines how the size of instance is calculated. If true, the width and height are determined by the size of the contents.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * If false, the width and height values are either explicitly set or determined by the size of the parent node's dimensions.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute autoSize
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Boolean
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @default false
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * When overflow is set to true, by default, the viewBox will resize to greater values but not values. (for performance)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * When resizing the viewBox down is desirable, set the resizeDown value to true.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute resizeDown
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Boolean
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._resizeDown;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the x-coordinate for the instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute x
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._x;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates the y-coordinate for the instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute y
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Number
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getter: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._y;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Indicates whether or not the instance will automatically redraw after a change is made to a shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * This property will get set to false when batching operations.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @attribute autoDraw
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @type Boolean
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @default true
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Gets the current position of the graphic instance in page coordinates.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method getXY
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Array The XY position of the shape.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf getXY: function()
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * @property _resizeDown
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * @type Boolean
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * Initializes the class.
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * @method initializer
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Adds the graphics node to the dom.
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * @method render
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * @param {HTMLElement} parentNode node in which to render the graphics node into.
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer w = this.get("width") || parseInt(parentNode.getComputedStyle("width"), 10),
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer h = this.get("height") || parseInt(parentNode.getComputedStyle("height"), 10);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this.setSize(w, h);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Removes all nodes.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method destroy
e07d9cb85217949d497b02d7211de8a197d2f2ebzf destroy: function()
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Generates a shape instance by type.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method getShape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} type type of shape to generate.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Object} cfg attributes for the shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Adds a shape instance to the graphic instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method addShape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Shape} shape The shape instance to be added to the graphic.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Removes a shape instance from from the graphic instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method removeShape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Shape|String}
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Removes all shape instances from the dom.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method removeAllShapes
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Removes all child nodes.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _removeChildren
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param node
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Clears the graphics object.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method clear
e07d9cb85217949d497b02d7211de8a197d2f2ebzf clear: function() {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Toggles visibility
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _toggleVisible
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {HTMLElement} node element to toggle
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Boolean} val indicates visibilitye
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
5644143a6cf1e70bc2e78d5140970830aae0e8cdQuaker Fang * Sets the size of the graphics object.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method setSize
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param w {Number} width to set for the instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param h {Number} height to set for the instance.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf setSize: function(w, h) {
e07d9cb85217949d497b02d7211de8a197d2f2ebzf w = Math.round(w);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf h = Math.round(h);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Sets the positon of the graphics object.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method setPosition
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} x x-coordinate for the object.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Number} y y-coordinate for the object.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf setPosition: function(x, y)
e07d9cb85217949d497b02d7211de8a197d2f2ebzf x = Math.round(x);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf y = Math.round(y);
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Creates a group element
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method _createGraphic
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
fe3e6e3a98f98e7ab1a751934c0116fb914b9c82Quaker Fang var group = document.createElement('<group xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:block;zoom:1;" />');
fe3e6e3a98f98e7ab1a751934c0116fb914b9c82Quaker Fang * Creates a graphic node
fe3e6e3a98f98e7ab1a751934c0116fb914b9c82Quaker Fang * @method _createGraphicNode
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} type node type to create
fe3e6e3a98f98e7ab1a751934c0116fb914b9c82Quaker Fang * @param {String} pe specified pointer-events value
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return HTMLElement
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return document.createElement('<' + type + ' xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;zoom:1;" />');
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Returns a shape based on the id of its dom node.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method getShapeById
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {String} id Dom id of the shape's node attribute.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @return Shape
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @private
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang * Allows for creating multiple shapes in order to batch appending and redraw operations.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method batch
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param {Function} method Method to execute.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf return this._frag;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * Adds a shape to the redraw queue and calculates the contentBounds.
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @method addToRedrawQueue
e07d9cb85217949d497b02d7211de8a197d2f2ebzf * @param shape {SVGShape}
e07d9cb85217949d497b02d7211de8a197d2f2ebzf box.left = box.left < shapeBox.left ? box.left : shapeBox.left;
1a932f2eab9b00d713acc4205d96ca2485bf2712Quaker Fang box.top = box.top < shapeBox.top ? box.top : shapeBox.top;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf box.right = box.right > shapeBox.right ? box.right : shapeBox.right;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf box.bottom = box.bottom > shapeBox.bottom ? box.bottom : shapeBox.bottom;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf var box = this.get("resizeDown") ? this._getUpdatedContentBounds() : this._contentBounds;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf this._frag = null;
e07d9cb85217949d497b02d7211de8a197d2f2ebzf}, '@VERSION@' ,{requires:['graphics'], skinnable:false});