mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
Add TODOs with github issue number
This commit is contained in:
@@ -650,6 +650,7 @@ Blockly.Field.prototype.getSize = function() {
|
||||
* @package
|
||||
*/
|
||||
Blockly.Field.prototype.getCorrectedSize = function() {
|
||||
// TODO (#2562): Remove getCorrectedSize.
|
||||
return this.getSize();
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user