diff --git a/.gitmodules b/.gitmodules index 8024368..05095de 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "deps/node-canvas"] path = deps/node-canvas url = https://github.com/LearnBoost/node-canvas.git +[submodule "deps/node-overload"] + path = deps/node-overload + url = https://github.com/bmeck/node-overload.git diff --git a/deps/node-overload b/deps/node-overload new file mode 160000 index 0000000..f51beb2 --- /dev/null +++ b/deps/node-overload @@ -0,0 +1 @@ +Subproject commit f51beb2e1479cfe591e8bcd3346da884d89dd454 diff --git a/lib/canvas-svg/patch.js b/lib/canvas-svg/patch.js index 633fb2c..20891aa 100644 --- a/lib/canvas-svg/patch.js +++ b/lib/canvas-svg/patch.js @@ -1,53 +1,27 @@ -// hack hack hack -var DOMPatch = exports.DOM = function DOMPatch(elem, rules) { - var that = this; - rules = rules || {}; - this.__children = []; - for(var key in elem) { - if (rules.hasOwnProperty(key)) { - rules[key](this, key, elem); - - } else if (key === "childNodes") { - this.__defineGetter__(key, function () { - return that.__children; - }); - var children = elem.childNodes; - for(var n=0,l=children.length;n