diff options
author | wout <wout@impinc.co.uk> | 2013-03-06 21:17:37 +0000 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-03-06 21:17:37 +0000 |
commit | b75df7a1c5b0260070de9bc535e9917c100c6035 (patch) | |
tree | 076b8aa8227d17894a4c9f0e6e175802a6b08937 /src/svg.js | |
parent | 5e3ff072994d3d9b224c62d71ca1331951249bac (diff) | |
download | svg.js-b75df7a1c5b0260070de9bc535e9917c100c6035.tar.gz svg.js-b75df7a1c5b0260070de9bc535e9917c100c6035.zip |
Animatable fill() and stroke()
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -36,9 +36,19 @@ this.SVG = { return element } // Method for extending objects -, extend: function(object, module) { - for (var key in module) - object.prototype[key] = module[key] +, extend: function() { + var modules, methods, key, i + + /* get list of modules */ + modules = Array.prototype.slice.call(arguments) + + /* get object with extensions */ + methods = modules.pop() + + for (i = modules.length - 1; i >= 0; i--) + if (modules[i]) + for (key in methods) + modules[i].prototype[key] = methods[key] } } |