summaryrefslogtreecommitdiffstats
path: root/src/rect.js
blob: 313c96da30c7aec6248ffebd2a7bac00a6d85615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
SVG.Rect = SVG.invent({
	// Initialize node
  create: 'rect'

	// Inherit from
, inherit: SVG.Shape
	
	// Add parent method
, construct: {
  	// Create a rect element
  	rect: function(width, height) {
  	  return this.put(new SVG.Rect().size(width, height))
  	}
  	
	}
	
})