From 8b80921347cc1c183d00f442877453aad22ff672 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Tue, 1 May 2018 23:51:35 +0200 Subject: make morphing work, fix inheritance, animations now work --- src/svg.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/svg.js') diff --git a/src/svg.js b/src/svg.js index 9b3bfd6..2ec5908 100644 --- a/src/svg.js +++ b/src/svg.js @@ -52,12 +52,13 @@ SVG.invent = function (config) { // Create element initializer var initializer = typeof config.create === 'function' ? config.create : function (node) { - this.constructor(node || SVG.create(config.create)) + SVG.Element.call(this, node || SVG.create(config.create)) } // Inherit prototype if (config.inherit) { initializer.prototype = new config.inherit() + initializer.prototype.constructor = initializer } // Extend with methods -- cgit v1.2.3