Skip to content

Commit

Permalink
hide axis indicator on compound bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Feb 28, 2015
1 parent ca75fde commit 6a26696
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,12 @@ var Render = {};
}
}
} else {
// render a single axis indicator
c.moveTo(body.position.x, body.position.y);
c.lineTo((body.vertices[0].x + body.vertices[body.vertices.length-1].x) / 2,
(body.vertices[0].y + body.vertices[body.vertices.length-1].y) / 2);
if (body.parts.length === 1) {
// render a single axis indicator
c.moveTo(body.position.x, body.position.y);
c.lineTo((body.vertices[0].x + body.vertices[body.vertices.length-1].x) / 2,
(body.vertices[0].y + body.vertices[body.vertices.length-1].y) / 2);
}
}
}

Expand Down

0 comments on commit 6a26696

Please sign in to comment.