blob: 395b0bf52d71a352c48c78423e73499e13f20aa3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
SVG.Poly = {
// Set polygon data with default zero point if no data is passed
plot: function(points) {
this.attr('points', points || '0,0');
return this;
}
};
SVG.Polyline = function Polyline() {
this.constructor.call(this, SVG.create('polyline'));
};
// Inherit from SVG.Shape
SVG.Polyline.prototype = new SVG.Shape();
// Add polygon-specific functions
SVG.extend(SVG.Polyline, SVG.Poly);
SVG.Polygon = function Polygon() {
this.constructor.call(this, SVG.create('polygon'));
};
// Inherit from SVG.Shape
SVG.Polygon.prototype = new SVG.Shape();
// Add polygon-specific functions
SVG.extend(SVG.Polygon, SVG.Poly);
|