Update polygon.class.js

!options..left would fail in case of left = 0.
This commit is contained in:
Andrea Bogazzi 2014-09-05 23:04:12 +02:00
parent 67a4be50a2
commit c2820bfcd5

View file

@ -60,10 +60,10 @@
this.points = points;
this.callSuper('initialize', options);
this._calcDimensions();
if (!options.top) {
if (!('top' in options)) {
this.top = this.minY;
}
if (!options.left) {
if (!('left' in options)) {
this.left = this.minX;
}
},