blob: 84eed5417d5c38e445c8b1c117dd03984c1a5e41 (
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
|
SVG.G = function() {
this.constructor.call(this, SVG.create('g'))
}
// Inherit from SVG.Container
SVG.G.prototype = new SVG.Container
//
SVG.extend(SVG.G, {
// Move over x-axis
x: function(x) {
return x == null ? this.trans.x : this.transform('x', x)
}
// Move over y-axis
, y: function(y) {
return y == null ? this.trans.y : this.transform('y', y)
}
})
//
SVG.extend(SVG.Container, {
// Create a group element
group: function() {
return this.put(new SVG.G)
}
})
|