summaryrefslogtreecommitdiffstats
path: root/src/Bare.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bare.js')
-rw-r--r--src/Bare.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/Bare.js b/src/Bare.js
index 783fa6a..b70f329 100644
--- a/src/Bare.js
+++ b/src/Bare.js
@@ -1,10 +1,9 @@
import {nodeOrNew} from './tools.js'
-import Parent from './Parent.js'
-export default function Bare (element, inherit) {
- return class Custom extends inherit {
+export default function Bare (element, inherit = {}) {
+ let custom = class Custom extends inherit {
constructor (node) {
- super(nodeOrNew(element, node))
+ super(nodeOrNew(element, node), Custom)
}
words (text) {
@@ -19,16 +18,18 @@ export default function Bare (element, inherit) {
return this
}
}
-}
-export let constructors = {
- // Create an element that is not described by SVG.js
- element: function (element, inherit) {
- let custom = createCustom(element, inherit)
- return this.put(new custom())
- }
+ extend(custom, inherit)
}
+// export let constructors = {
+// // Create an element that is not described by SVG.js
+// element: function (element, inherit) {
+// let custom = createCustom(element, inherit)
+// return this.put(new custom())
+// }
+// }
+
// extend(Parent, {
// // Create an element that is not described by SVG.js
// element: function (element, inherit) {