This commit is contained in:
Rachel Fenichel
2019-08-19 13:21:23 -07:00
parent 50b55971d4
commit 2e77f1903f

View File

@@ -92,6 +92,8 @@ CustomFields.FieldTurtle.prototype.CURSOR = 'pointer';
// May change if the turtle gets fancy enough.
CustomFields.FieldTurtle.prototype.TEXT_OFFSET_X = 80;
// Padding that the border rect adds around the turtle and its name.
CustomFields.FieldTurtle.prototype.PADDING = Blockly.Field.X_PADDING;
// These are the different options for our turtle. Being declared this way
// means they are static, and not translatable. If you want to do something
@@ -320,8 +322,8 @@ CustomFields.FieldTurtle.prototype.renderEditor_ = function() {
CustomFields.FieldTurtle.prototype.updateSize_ = function() {
var size = this.movableGroup_.getBBox();
if (this.borderRect_) {
size.width += Blockly.Field.X_PADDING;
size.height += Blockly.Field.X_PADDING;
size.width += this.PADDING;
size.height += this.PADDING;
this.borderRect_.setAttribute('width', size.width);
this.borderRect_.setAttribute('height', size.height);
}