Skip to content

Commit

Permalink
Merge pull request arthur-e#56 from devdattaT/master
Browse files Browse the repository at this point in the history
Solution for Issue arthur-e#55
  • Loading branch information
arthur-e committed Oct 7, 2014
2 parents 3186b91 + 2cab33d commit fbf5a9e
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions wicket.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,21 @@
subcomponents = []; // Holds the outer ring and any inner rings (holes)
for (j = 0; j < ring.length; j += 1) {
// Split on the empty space or '+' character (between coordinates)
subcomponents.push({
x: parseFloat(ring[j].split(this.regExes.spaces)[0]),
y: parseFloat(ring[j].split(this.regExes.spaces)[1])
});
var split=ring[j].split(this.regExes.spaces);
if(split.length>2){
//remove the elements which are blanks
split = split.filter(function(n){ return n != "" });
}
if(split.length===2){
var x_cord=split[0];
var y_cord=split[1];

//now push
subcomponents.push({
x: parseFloat(x_cord),
y: parseFloat(y_cord)
});
}
}
components.push(subcomponents);
}
Expand Down

0 comments on commit fbf5a9e

Please sign in to comment.