Merge pull request #277 from nathan/procedure-editor-label-overflow

Fixed overlap of labels in procedure editor in certain languages
This commit is contained in:
Nathan Dinsmore 2014-06-24 16:57:29 -04:00
commit 6242cbd14e

View file

@ -350,12 +350,18 @@ public class ProcedureSpecEditor extends Sprite {
moreLabel.x = 10;
moreLabel.y = moreButton.y - 4;
var labelX:int = blockShape.x + 45;
var buttonX:int = 240;
for each (var l:TextField in buttonLabels) {
buttonX = Math.max(buttonX, labelX + l.textWidth + 10);
}
var rowY:int = blockShape.y + blockShape.height + 30;
for (var i:int = 0; i < buttons.length; i++) {
var label:TextField = buttonLabels[i];
buttonLabels[i].x = blockShape.x + 45;
buttonLabels[i].x = labelX;
buttonLabels[i].y = rowY;
buttons[i].x = 240;
buttons[i].x = buttonX;
buttons[i].y = rowY - 4;
rowY += 30;
}