Skip to content

Commit

Permalink
Additional centering of agents when arrow is small and has conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Apr 18, 2016
1 parent 99f911f commit 937f107
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ public ReactionDepiction(RendererModel model,
double xAdjust = (minArrowWidth - middleRequired) / 2;
for (int i = 0; i < xOffsetSide.length; i++)
xOffsetSide[i] += xAdjust;
// need to recenter agents
if (conditions.width() > prelimSideDim.w) {
for (int i = 0; i < xOffsetSide.length; i++)
xOffsetSide[i] += (conditions.width() - prelimSideDim.w) / 2;
}
// update side dims
this.sideDim = new Dimensions(minArrowWidth, prelimSideDim.h);
this.condDim = new Dimensions(minArrowWidth, conditions.height());
Expand Down

0 comments on commit 937f107

Please sign in to comment.