VMLPath.js revision 14bfa36e35102dbf271dcff98f773a01c75bd503
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix/**
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Path.html">`Path`</a> class.
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * `VMLPath` is not intended to be used directly. Instead, use the <a href="Path.html">`Path`</a> class.
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a>
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * capabilities, the <a href="Path.html">`Path`</a> class will point to the `VMLPath` class.
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix *
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @module graphics
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @class VMLPath
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @extends VMLShape
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix */
b320a8d186114a5122ddc3afbe95110eb6cb10cecilixVMLPath = function()
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix{
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix VMLPath.superclass.constructor.apply(this, arguments);
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix};
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix
b320a8d186114a5122ddc3afbe95110eb6cb10cecilixVMLPath.NAME = "vmlPath";
b320a8d186114a5122ddc3afbe95110eb6cb10cecilixY.extend(VMLPath, Y.VMLShape);
b320a8d186114a5122ddc3afbe95110eb6cb10cecilixVMLPath.ATTRS = Y.merge(Y.VMLShape.ATTRS, {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix /**
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * Indicates the width of the shape
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix *
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @config width
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @type Number
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix */
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix width: {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix getter: function()
25ad3718fb4b96b39930af8e043c8ee1e624fd10cilix {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix var val = Math.max(this._right - this._left, 0);
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix return val;
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix }
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix },
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix /**
25ad3718fb4b96b39930af8e043c8ee1e624fd10cilix * Indicates the height of the shape
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix *
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @config height
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @type Number
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix */
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix height: {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix getter: function()
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix return Math.max(this._bottom - this._top, 0);
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix }
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix },
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix
79d46cc367c4181803d9a7a327b163643f23e8a7cilix /**
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * Indicates the path used for the node.
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix *
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @config path
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @type String
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix * @readOnly
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix */
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix path: {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix readOnly: true,
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix getter: function()
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix {
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix return this._path;
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix }
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix }
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix});
b320a8d186114a5122ddc3afbe95110eb6cb10cecilixY.VMLPath = VMLPath;
b320a8d186114a5122ddc3afbe95110eb6cb10cecilix