mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Add margin only for buttons, not labels (#1322)
This commit is contained in:
committed by
Rachel Fenichel
parent
c5be6e1722
commit
d0e1141a9f
@@ -155,11 +155,11 @@ Blockly.FlyoutButton.prototype.createDom = function() {
|
||||
this.svgGroup_);
|
||||
svgText.textContent = this.text_;
|
||||
|
||||
this.width = svgText.getComputedTextLength() +
|
||||
2 * Blockly.FlyoutButton.MARGIN;
|
||||
this.width = svgText.getComputedTextLength();
|
||||
this.height = 20; // Can't compute it :(
|
||||
|
||||
if (!this.isLabel_) {
|
||||
this.width += 2 * Blockly.FlyoutButton.MARGIN;
|
||||
shadow.setAttribute('width', this.width);
|
||||
shadow.setAttribute('height', this.height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user