From 1e6af7da2fbe0904a116e3fc0a6f4726660f3d63 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 9 Mar 2017 22:51:17 +0100 Subject: fix bug in box when box with top and left is given which is 0 (#632) --- src/boxes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3