mirror of
https://github.com/google/blockly.git
synced 2026-01-29 03:30:13 +01:00
feat: updated flyout button to set border radius via static variable (#6838)
This commit is contained in:
committed by
GitHub
parent
ddd38a411a
commit
7439a70864
@@ -32,6 +32,10 @@ export class FlyoutButton {
|
||||
|
||||
/** The vertical margin around the text in the button. */
|
||||
static TEXT_MARGIN_Y = 2;
|
||||
|
||||
/** The radius of the flyout button's borders. */
|
||||
static BORDER_RADIUS = 4;
|
||||
|
||||
private readonly text_: string;
|
||||
private readonly position_: Coordinate;
|
||||
private readonly callbackKey_: string;
|
||||
@@ -102,8 +106,8 @@ export class FlyoutButton {
|
||||
shadow = dom.createSvgElement(
|
||||
Svg.RECT, {
|
||||
'class': 'blocklyFlyoutButtonShadow',
|
||||
'rx': 4,
|
||||
'ry': 4,
|
||||
'rx': FlyoutButton.BORDER_RADIUS,
|
||||
'ry': FlyoutButton.BORDER_RADIUS,
|
||||
'x': 1,
|
||||
'y': 1,
|
||||
},
|
||||
@@ -114,8 +118,8 @@ export class FlyoutButton {
|
||||
Svg.RECT, {
|
||||
'class': this.isLabel_ ? 'blocklyFlyoutLabelBackground' :
|
||||
'blocklyFlyoutButtonBackground',
|
||||
'rx': 4,
|
||||
'ry': 4,
|
||||
'rx': FlyoutButton.BORDER_RADIUS,
|
||||
'ry': FlyoutButton.BORDER_RADIUS,
|
||||
},
|
||||
this.svgGroup_!);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user