Skip to content

Commit 6f22217

Browse files
committed
feat(coords): allow both (left/x1) and (top/y1) attr keys
1 parent fdeee4f commit 6f22217

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/jquery.coords.js

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959

6060
var d = this.data;
6161

62+
typeof d.left === 'undefined' && (d.left = d.x1);
63+
typeof d.top === 'undefined' && (d.top = d.y1);
64+
6265
this.coords.x1 = d.left;
6366
this.coords.y1 = d.top;
6467
this.coords.x2 = d.left + d.width;

0 commit comments

Comments
 (0)