diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-09 22:51:17 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-09 22:51:17 +0100 |
commit | 1e6af7da2fbe0904a116e3fc0a6f4726660f3d63 (patch) | |
tree | 992c988aeb46c8e6355438b0fe405077d711ec0c /src | |
parent | 8fae69fd8f66592a5001f03b043c40f8a2bfc8bd (diff) | |
download | svg.js-1e6af7da2fbe0904a116e3fc0a6f4726660f3d63.tar.gz svg.js-1e6af7da2fbe0904a116e3fc0a6f4726660f3d63.zip |
fix bug in box when box with top and left is given which is 0 (#632)
Diffstat (limited to 'src')
-rw-r--r-- | src/boxes.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boxes.js b/src/boxes.js index 3a373b8..3db523e 100644 --- a/src/boxes.js +++ b/src/boxes.js @@ -2,7 +2,7 @@ SVG.Box = SVG.invent({ create: function(x, y, width, height) { if (typeof x == 'object' && !(x instanceof SVG.Element)) { // chromes getBoundingClientRect has no x and y property - return SVG.Box.call(this, x.left || x.x, x.top || x.y, x.width, x.height) + return SVG.Box.call(this, x.left != null ? x.left : x.x , x.top != null ? x.top : x.y, x.width, x.height) } else if (arguments.length == 4) { this.x = x this.y = y |