mirror of
https://github.com/google/blockly.git
synced 2026-01-20 07:17:10 +01:00
Removing leftover constant MIN_BLOCK_Y in BlockSvg. (#3552)
This commit is contained in:
@@ -158,14 +158,6 @@ Blockly.BlockSvg.COLLAPSED_WARNING_ID = 'TEMP_COLLAPSED_WARNING_';
|
||||
|
||||
// Leftover UI constants from block_render_svg.js.
|
||||
|
||||
/**
|
||||
* Minimum height of a block.
|
||||
* @const
|
||||
* @package
|
||||
*/
|
||||
// TODO (#3142): Remove.
|
||||
Blockly.BlockSvg.MIN_BLOCK_Y = 25;
|
||||
|
||||
/**
|
||||
* Do blocks with no previous or output connections have a 'hat' on top?
|
||||
* @const
|
||||
|
||||
@@ -452,8 +452,11 @@ Blockly.Bubble.prototype.layoutBubble_ = function() {
|
||||
var optimalTop = this.getOptimalRelativeTop_(metrics);
|
||||
var bbox = this.shape_.getBBox();
|
||||
|
||||
var topPosition = {x: optimalLeft,
|
||||
y: -this.height_ - Blockly.BlockSvg.MIN_BLOCK_Y};
|
||||
var topPosition = {
|
||||
x: optimalLeft,
|
||||
y: -this.height_ -
|
||||
this.workspace_.getRenderer().getConstants().MIN_BLOCK_HEIGHT
|
||||
};
|
||||
var startPosition = {x: -this.width_ - 30, y: optimalTop};
|
||||
var endPosition = {x: bbox.width, y: optimalTop};
|
||||
var bottomPosition = {x: optimalLeft, y: bbox.height};
|
||||
|
||||
@@ -1655,7 +1655,8 @@ Blockly.WorkspaceSvg.prototype.cleanUp = function() {
|
||||
block.moveBy(-xy.x, cursorY - xy.y);
|
||||
block.snapToGrid();
|
||||
cursorY = block.getRelativeToSurfaceXY().y +
|
||||
block.getHeightWidth().height + Blockly.BlockSvg.MIN_BLOCK_Y;
|
||||
block.getHeightWidth().height +
|
||||
this.renderer_.getConstants().MIN_BLOCK_HEIGHT;
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
this.setResizesEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user