feat(coords): allow both (left/x1) and (top/y1) attr keys

This commit is contained in:
vieron
2014-03-05 17:36:11 +01:00
parent fdeee4f636
commit 6f22217f05

View File

@ -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;