Add TODOs with github issue number

This commit is contained in:
Rachel Fenichel
2019-07-22 16:29:44 -07:00
parent f469a388ed
commit fc4372dbc2
7 changed files with 12 additions and 1 deletions

View File

@@ -650,6 +650,7 @@ Blockly.Field.prototype.getSize = function() {
* @package
*/
Blockly.Field.prototype.getCorrectedSize = function() {
// TODO (#2562): Remove getCorrectedSize.
return this.getSize();
};

View File

@@ -218,6 +218,8 @@ Blockly.FieldCheckbox.prototype.convertValueToBool_ = function(value) {
*/
Blockly.FieldCheckbox.prototype.getCorrectedSize = function() {
this.getSize();
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(this.size_.width + Blockly.BlockSvg.SEP_SPACE_X,
Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT);
};

View File

@@ -351,6 +351,7 @@ Blockly.FieldColour.prototype.getCorrectedSize = function() {
// getSize also renders and updates the size if needed. Rather than duplicate
// the logic to figure out whether to rerender, just call getSize.
this.getSize();
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(
this.size_.width + Blockly.BlockSvg.SEP_SPACE_X,
Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT - 1);

View File

@@ -556,6 +556,9 @@ Blockly.FieldDropdown.prototype.getCorrectedSize = function() {
// getSize also renders and updates the size if needed. Rather than duplicate
// the logic to figure out whether to rerender, just call getSize.
this.getSize();
// This extra 9 was probably to add padding between rows.
// It's also found in render_, renderSelectedImage_, and renderSelectedText_.
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(this.size_.width + Blockly.BlockSvg.SEP_SPACE_X,
this.size_.height - 9);
};

View File

@@ -201,7 +201,7 @@ Blockly.FieldImage.prototype.getCorrectedSize = function() {
// Old rendering adds an extra pixel under the image. We include this in the
// height of the image in new rendering, rather than having the spacer below
// know that there was an image in the previous row.
// TODO: Remove.
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(this.size_.width, this.height_ + 1);
};

View File

@@ -109,6 +109,9 @@ Blockly.FieldLabel.prototype.getCorrectedSize = function() {
// getSize also renders and updates the size if needed. Rather than duplicate
// the logic to figure out whether to rerender, just call getSize.
this.getSize();
// This extra 5 was probably to add padding between rows.
// It's also found in the constructor and in initView.
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(this.size_.width, this.size_.height - 5);
};

View File

@@ -441,6 +441,7 @@ Blockly.FieldTextInput.prototype.getCorrectedSize = function() {
// getSize also renders and updates the size if needed. Rather than duplicate
// the logic to figure out whether to rerender, just call getSize.
this.getSize();
// TODO (#2562): Remove getCorrectedSize.
return new goog.math.Size(this.size_.width + Blockly.BlockSvg.SEP_SPACE_X, 16);
};