VMLPieSlice.js revision bbd1285cbb2183b7f89010412ad97ae1680b4b5e
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp/**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Draws pie slices
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippVMLPieSlice = function()
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp{
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp VMLPieSlice.superclass.constructor.apply(this, arguments);
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp};
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippVMLPieSlice.NAME = "svgPieSlice";
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippY.extend(VMLPieSlice, Y.VMLPath, {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Indicates the type of shape
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @property _type
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @readOnly
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type String
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp _type: "shape",
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Change event listener
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @private
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @method _updateHandler
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp _updateHandler: function(e)
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp var x = this.get("cx"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp y = this.get("cy"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp startAngle = this.get("startAngle"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp arc = this.get("arc"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp radius = this.get("radius");
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp this.clear();
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp this.drawWedge(x, y, startAngle, arc, radius)
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp this._draw();
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp }
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp });
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippVMLPieSlice.ATTRS = Y.mix(Y.VMLPath.ATTRS, {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp cx: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp cy: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Starting angle in relation to a circle in which to begin the pie slice drawing.
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @attribute startAngle
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp startAngle: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Arc of the slice.
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @attribute arc
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp arc: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Radius of the circle in which the pie slice is drawn
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @attribute radius
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp radius: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp }
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp});
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippY.VMLPieSlice = VMLPieSlice;