OC.L10N.register( "user_ldap", { "_%s group found_::_%s groups found_" : ["",""], "_%s user found_::_%s users found_" : ["",""] }, "nplurals=2; plural=(n != 1);"); nate' title='Atom feed' href='https://source.dussan.org/svg.js.git/atom/src/inventor.js?h=2.0.5' type='application/atom+xml'/>
summaryrefslogtreecommitdiffstats
path: root/src/inventor.js
blob: f8244f55b6237b35b56ef64039579eeb57f8bf22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Invent new element
SVG.invent = function(config) {
	/* create element initializer */
	var initializer = typeof config.create == 'function' ?
		config.create :
		function() {
			this.constructor.call(this, SVG.create(config.create))
		}

	/* inherit prototype */
	if (config.inherit)
		initializer.prototype = new config.inherit

	/* extend with methods */
	if (config.extend)
		SVG.extend(initializer, config.extend)

	/* attach construct method to parent */
	if (config.construct)
		SVG.extend(config.parent || SVG.Container, config.construct)

	return initializer
}