diff options
author | Wout Fierens <wout@impinc.co.uk> | 2013-04-14 09:10:04 -0700 |
---|---|---|
committer | Wout Fierens <wout@impinc.co.uk> | 2013-04-14 09:10:04 -0700 |
commit | 874a935d7bff9647d7e459dc18e0dce2996d0455 (patch) | |
tree | 7c99b274a9c2d72bd07c65c30165707a7c83bcbd | |
parent | 4154cf975a9a458dab4af4610010c3faddbdcad4 (diff) | |
parent | ec00f8b7ad7761c67999969b8de120b8c4645bb4 (diff) | |
download | svg.js-874a935d7bff9647d7e459dc18e0dce2996d0455.tar.gz svg.js-874a935d7bff9647d7e459dc18e0dce2996d0455.zip |
Merge pull request #24 from robwalch/master
Keyword 'default' throws errors in some browsers
-rw-r--r-- | src/default.js | 2 | ||||
-rw-r--r-- | src/element.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/default.js b/src/default.js index 4efc226..1dbe9c0 100644 --- a/src/default.js +++ b/src/default.js @@ -1,5 +1,5 @@ -SVG.default = { +SVG.defaults = { // Default matrix matrix: '1,0,0,1,0,0' diff --git a/src/element.js b/src/element.js index 269d61b..fcf8f3c 100644 --- a/src/element.js +++ b/src/element.js @@ -4,13 +4,13 @@ // SVG.Element = function(node) { /* make stroke value accessible dynamically */ - this._stroke = SVG.default.attrs.stroke + this._stroke = SVG.defaults.attrs.stroke /* initialize style store */ this.styles = {} /* initialize transformation store with defaults */ - this.trans = SVG.default.trans() + this.trans = SVG.defaults.trans() /* keep reference to the element node */ if (this.node = node) { @@ -130,7 +130,7 @@ SVG.extend(SVG.Element, { } else { v = this.node.getAttribute(a) return v == null ? - SVG.default.attrs[a] : + SVG.defaults.attrs[a] : SVG.regex.test(v, 'isNumber') ? parseFloat(v) : v } @@ -226,7 +226,7 @@ SVG.extend(SVG.Element, { o = this.trans /* add matrix */ - if (o.matrix != SVG.default.matrix) + if (o.matrix != SVG.defaults.matrix) transform.push('matrix(' + o.matrix + ')') /* add rotation */ |