Skip to content

Commit 6a26696

Browse files
committed
hide axis indicator on compound bodies
1 parent ca75fde commit 6a26696

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/render/Render.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,12 @@ var Render = {};
643643
}
644644
}
645645
} else {
646-
// render a single axis indicator
647-
c.moveTo(body.position.x, body.position.y);
648-
c.lineTo((body.vertices[0].x + body.vertices[body.vertices.length-1].x) / 2,
649-
(body.vertices[0].y + body.vertices[body.vertices.length-1].y) / 2);
646+
if (body.parts.length === 1) {
647+
// render a single axis indicator
648+
c.moveTo(body.position.x, body.position.y);
649+
c.lineTo((body.vertices[0].x + body.vertices[body.vertices.length-1].x) / 2,
650+
(body.vertices[0].y + body.vertices[body.vertices.length-1].y) / 2);
651+
}
650652
}
651653
}
652654

0 commit comments

Comments
 (0)