From 6a26696fc7159a73fc47146df9bc88362c0b6b88 Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 28 Feb 2015 16:00:05 +0000 Subject: [PATCH] hide axis indicator on compound bodies --- src/render/Render.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/render/Render.js b/src/render/Render.js index aa59604..0b4d896 100644 --- a/src/render/Render.js +++ b/src/render/Render.js @@ -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); + } } }