Fix a bug with Segment constructor where two passed points with the first one having an x-coordinate of 0 would accidentaly be considered the two coordinate values for the point property.

This commit is contained in:
Jürg Lehni 2011-06-05 18:41:58 +01:00
parent b3d771a870
commit caec7599be

View file

@ -67,7 +67,7 @@ var Segment = this.Segment = Base.extend({
point = arg0;
}
} else if (count < 6) {
if (count == 2 && !arg1.x) {
if (count == 2 && arg1.x === undefined) {
point = [ arg0, arg1 ];
} else {
point = arg0;