blob: f83243c985f53b50a3299b15de26aedc4a26f415 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import Base from './Base.js'
import {nodeOrNew, extend} from './tools.js'
import * as EventTarget from './EventTarget.js'
import * as Element from './Element.js'
import * as Parent from './Parent.js'
export default class Rect extends Base {
// Initialize node
constructor (node) {
super(nodeOrNew('rect', node), Rect)
}
}
extend(Rect, [EventTarget, Element, Parent])
Rect.constructors = {
Container: {
// Create a rect element
rect (width, height) {
return this.put(new Rect()).size(width, height)
}
}
}
|