draw fairway first

master
Jason Dekarske 2022-04-07 17:45:51 -07:00
parent de95714784
commit cc28f5f8dd
1 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,13 @@ function drawHole(l) {
rotate: hole.angle - Math.PI / 2.0, // angle in radians (default 0)
};
// draw the fairways first
hole.features.sort((a, b) => {
if (a.type === "fairway") {
return -1;
}
})
for (var feature of hole.features) {
//console.log(Object.keys(feature));
if (feature.type === "fairway") {