VMLPieSlice.js revision b08d5c81743759d32bccaf4bec55aa102491026e
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp/**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Draws pie slices
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippVMLPieSlice = function()
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp{
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp VMLPieSlice.superclass.constructor.apply(this, arguments);
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp};
237a5d2c3e6985a3e7b58e79b9fa64ee2bcd2e0cTrippVMLPieSlice.NAME = "vmlPieSlice";
b08d5c81743759d32bccaf4bec55aa102491026eTrippY.extend(VMLPieSlice, Y.VMLShape, Y.mix({
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 */
b08d5c81743759d32bccaf4bec55aa102491026eTripp _draw: 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();
cff2b8ec796b9316395b305e8867408a6d7c3549Tripp this.drawWedge(x, y, startAngle, arc, radius);
b08d5c81743759d32bccaf4bec55aa102491026eTripp this.end();
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp }
b08d5c81743759d32bccaf4bec55aa102491026eTripp }, Y.VMLDrawing.prototype));
b08d5c81743759d32bccaf4bec55aa102491026eTrippVMLPieSlice.ATTRS = Y.mix({
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 }
b08d5c81743759d32bccaf4bec55aa102491026eTripp}, Y.VMLShape.ATTRS);
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippY.VMLPieSlice = VMLPieSlice;