Skip to content

Commit bb29bad

Browse files
committed
chore: factor out shared constant
1 parent 1677137 commit bb29bad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scratch_comment_bubble.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ export class ScratchCommentBubble
129129
}
130130

131131
dropAnchor() {
132+
const verticalOffset = 16;
132133
this.moveTo(
133134
this.anchor.x + 40 * (this.workspace.RTL ? -1 : 1),
134-
this.anchor.y - 16
135+
this.anchor.y - verticalOffset
135136
);
136137
const location = this.getRelativeToSurfaceXY();
137138
this.anchorChain = Blockly.utils.dom.createSvgElement(
@@ -140,7 +141,7 @@ export class ScratchCommentBubble
140141
x1: this.anchor.x - location.x,
141142
y1: this.anchor.y - location.y,
142143
x2: (this.getSize().width / 2) * (this.workspace.RTL ? -1 : 1),
143-
y2: 16,
144+
y2: verticalOffset,
144145
style: `stroke: ${this.sourceBlock.getColourTertiary()}; stroke-width: 1`,
145146
},
146147
this.getSvgRoot()

0 commit comments

Comments
 (0)