aboutsummaryrefslogtreecommitdiffstats
path: root/src/boxes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/boxes.js')
-rw-r--r--src/boxes.js2
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