Skip to content

Commit

Permalink
feat(coords): allow both (left/x1) and (top/y1) attr keys
Browse files Browse the repository at this point in the history
  • Loading branch information
vieron committed Mar 5, 2014
1 parent fdeee4f commit 6f22217
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jquery.coords.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6f22217

Please sign in to comment.