mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Fix 4 misc warnings (#3283)
This commit is contained in:
@@ -276,7 +276,7 @@ Blockly.DropDownDiv.getScaledBboxOfBlock_ = function(block) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.DropDownDiv.getScaledBboxOfField_ = function(field) {
|
||||
var bBox = field.getScaledBBox_();
|
||||
var bBox = field.getScaledBBox();
|
||||
return new Blockly.utils.Rect(
|
||||
bBox.top, bBox.bottom, bBox.left, bBox.right);
|
||||
};
|
||||
@@ -700,7 +700,7 @@ Blockly.DropDownDiv.repositionForWindowResize = function() {
|
||||
// event and we want the dropdown div to stick around so users can type into
|
||||
// it.
|
||||
if (Blockly.DropDownDiv.owner_) {
|
||||
var field = Blockly.DropDownDiv.owner_;
|
||||
var field = /** @type {!Blockly.Field} */ (Blockly.DropDownDiv.owner_);
|
||||
var block = Blockly.DropDownDiv.owner_.getSourceBlock();
|
||||
var bBox = Blockly.DropDownDiv.positionToField_ ?
|
||||
Blockly.DropDownDiv.getScaledBboxOfField_(field) :
|
||||
|
||||
@@ -680,9 +680,9 @@ Blockly.Field.prototype.getSize = function() {
|
||||
* scaling.
|
||||
* @return {!Object} An object with top, bottom, left, and right in pixels
|
||||
* relative to the top left corner of the page (window coordinates).
|
||||
* @protected
|
||||
* @package
|
||||
*/
|
||||
Blockly.Field.prototype.getScaledBBox_ = function() {
|
||||
Blockly.Field.prototype.getScaledBBox = function() {
|
||||
var bBox = this.borderRect_.getBBox();
|
||||
var scaledHeight = bBox.height * this.sourceBlock_.workspace.scale;
|
||||
var scaledWidth = bBox.width * this.sourceBlock_.workspace.scale;
|
||||
|
||||
@@ -220,7 +220,7 @@ Blockly.FieldMultilineInput.prototype.updateSize_ = function() {
|
||||
*/
|
||||
Blockly.FieldMultilineInput.prototype.resizeEditor_ = function() {
|
||||
var div = Blockly.WidgetDiv.DIV;
|
||||
var bBox = this.getScaledBBox_();
|
||||
var bBox = this.getScaledBBox();
|
||||
div.style.width = bBox.right - bBox.left + 'px';
|
||||
div.style.height = bBox.bottom - bBox.top + 'px';
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@ Blockly.FieldTextInput.prototype.setEditorValue_ = function(newValue) {
|
||||
*/
|
||||
Blockly.FieldTextInput.prototype.resizeEditor_ = function() {
|
||||
var div = Blockly.WidgetDiv.DIV;
|
||||
var bBox = this.getScaledBBox_();
|
||||
var bBox = this.getScaledBBox();
|
||||
div.style.width = bBox.right - bBox.left + 'px';
|
||||
div.style.height = bBox.bottom - bBox.top + 'px';
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ Blockly.Tooltip.lastY_ = 0;
|
||||
|
||||
/**
|
||||
* Current element being pointed at.
|
||||
* @type {Element}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.element_ = null;
|
||||
@@ -85,6 +86,7 @@ Blockly.Tooltip.element_ = null;
|
||||
/**
|
||||
* Once a tooltip has opened for an element, that element is 'poisoned' and
|
||||
* cannot respawn a tooltip until the pointer moves over a different element.
|
||||
* @type {Element}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.poisonedElement_ = null;
|
||||
|
||||
@@ -67,7 +67,7 @@ Blockly.utils.style.getSize = function(element) {
|
||||
/**
|
||||
* Gets the height and width of an element when the display is not none.
|
||||
* @param {!Element} element Element to get size of.
|
||||
* @return {!goog.math.Size} Object with width/height properties.
|
||||
* @return {!Blockly.utils.Size} Object with width/height properties.
|
||||
* @private
|
||||
*/
|
||||
Blockly.utils.style.getSizeWithDisplay_ = function(element) {
|
||||
|
||||
Reference in New Issue
Block a user