mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Update positionable jsdoc (#4908)
This commit is contained in:
@@ -37,6 +37,7 @@ Blockly.IPositionable.prototype.position;
|
||||
/**
|
||||
* Returns the bounding rectangle of the UI element in pixel units relative to
|
||||
* the Blockly injection div.
|
||||
* @return {!Blockly.utils.Rect} The UI elements’s bounding box.
|
||||
* @return {?Blockly.utils.Rect} The UI elements’s bounding box. Null if
|
||||
* bounding box should be ignored by other UI elements.
|
||||
*/
|
||||
Blockly.IPositionable.prototype.getBoundingRectangle;
|
||||
|
||||
@@ -506,7 +506,8 @@ Blockly.Trashcan.prototype.position = function(metrics, savedPositions) {
|
||||
/**
|
||||
* Returns the bounding rectangle of the UI element in pixel units relative to
|
||||
* the Blockly injection div.
|
||||
* @return {!Blockly.utils.Rect} The UI elements’s bounding box.
|
||||
* @return {?Blockly.utils.Rect} The UI elements’s bounding box. Null if
|
||||
* bounding box should be ignored by other UI elements.
|
||||
*/
|
||||
Blockly.Trashcan.prototype.getBoundingRectangle = function() {
|
||||
var bottom = this.top_ + this.BODY_HEIGHT_ + this.LID_HEIGHT_;
|
||||
|
||||
@@ -1148,7 +1148,10 @@ Blockly.WorkspaceSvg.prototype.resize = function() {
|
||||
var savedPositions = [];
|
||||
for (var i = 0, positionable; (positionable = positionables[i]); i++) {
|
||||
positionable.position(metrics, savedPositions);
|
||||
savedPositions.push(positionable.getBoundingRectangle());
|
||||
var boundingRect = positionable.getBoundingRectangle();
|
||||
if (boundingRect) {
|
||||
savedPositions.push(boundingRect);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.scrollbar) {
|
||||
|
||||
@@ -228,7 +228,8 @@ Blockly.ZoomControls.prototype.dispose = function() {
|
||||
/**
|
||||
* Returns the bounding rectangle of the UI element in pixel units relative to
|
||||
* the Blockly injection div.
|
||||
* @return {!Blockly.utils.Rect} The UI elements’s bounding box.
|
||||
* @return {?Blockly.utils.Rect} The UI elements’s bounding box. Null if
|
||||
* bounding box should be ignored by other UI elements.
|
||||
*/
|
||||
Blockly.ZoomControls.prototype.getBoundingRectangle = function() {
|
||||
var height = this.SMALL_SPACING_ + 2 * this.HEIGHT_;
|
||||
|
||||
Reference in New Issue
Block a user