API Docs for: 3.8.0
Show:

File: graphics/js/VMLPieSlice.js

  1. /**
  2.  * Draws pie slices
  3.  *
  4.  * @module graphics
  5.  * @class VMLPieSlice
  6.  * @constructor
  7.  */
  8. VMLPieSlice = function()
  9. {
  10.         VMLPieSlice.superclass.constructor.apply(this, arguments);
  11. };
  12. VMLPieSlice.NAME = "vmlPieSlice";
  13. Y.extend(VMLPieSlice, Y.VMLShape, Y.mix({
  14.     /**
  15.      * Indicates the type of shape
  16.      *
  17.      * @property _type
  18.      * @type String
  19.      * @private
  20.      */
  21.     _type: "shape",

  22.         /**
  23.          * Change event listener
  24.          *
  25.          * @private
  26.          * @method _updateHandler
  27.          */
  28.         _draw: function(e)
  29.         {
  30.         var x = this.get("cx"),
  31.             y = this.get("cy"),
  32.             startAngle = this.get("startAngle"),
  33.             arc = this.get("arc"),
  34.             radius = this.get("radius");
  35.         this.clear();
  36.         this.drawWedge(x, y, startAngle, arc, radius);
  37.                 this.end();
  38.         }
  39.  }, Y.VMLDrawing.prototype));
  40. VMLPieSlice.ATTRS = Y.mix({
  41.     cx: {
  42.         value: 0
  43.     },

  44.     cy: {
  45.         value: 0
  46.     },
  47.     /**
  48.      * Starting angle in relation to a circle in which to begin the pie slice drawing.
  49.      *
  50.      * @config startAngle
  51.      * @type Number
  52.      */
  53.     startAngle: {
  54.         value: 0
  55.     },

  56.     /**
  57.      * Arc of the slice.
  58.      *
  59.      * @config arc
  60.      * @type Number
  61.      */
  62.     arc: {
  63.         value: 0
  64.     },

  65.     /**
  66.      * Radius of the circle in which the pie slice is drawn
  67.      *
  68.      * @config radius
  69.      * @type Number
  70.      */
  71.     radius: {
  72.         value: 0
  73.     }
  74. }, Y.VMLShape.ATTRS);
  75. Y.VMLPieSlice = VMLPieSlice;

  76.