From 6f22217f056e4fc52f6405f2af49596105aae150 Mon Sep 17 00:00:00 2001 From: vieron Date: Wed, 5 Mar 2014 17:36:11 +0100 Subject: [PATCH] feat(coords): allow both (left/x1) and (top/y1) attr keys --- src/jquery.coords.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jquery.coords.js b/src/jquery.coords.js index 58a70726..bf221804 100644 --- a/src/jquery.coords.js +++ b/src/jquery.coords.js @@ -59,6 +59,9 @@ var d = this.data; + typeof d.left === 'undefined' && (d.left = d.x1); + typeof d.top === 'undefined' && (d.top = d.y1); + this.coords.x1 = d.left; this.coords.y1 = d.top; this.coords.x2 = d.left + d.width;