We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee42fa1 commit a2e2492Copy full SHA for a2e2492
src/fields/field_flydown.ts
@@ -259,6 +259,16 @@ export class FieldFlydown extends Blockly.FieldTextInput {
259
this.createFlydown_(mainWorkspace);
260
}
261
if (this.flydown_) {
262
+ const fieldElement = this.getClickTarget_();
263
+
264
+ const fieldRect = fieldElement!.getBoundingClientRect();
265
+ const workspaceRect = mainWorkspace.getParentSvg().getBoundingClientRect();
266
267
+ const x = fieldRect.right - workspaceRect.left;
268
+ const y = fieldRect.top - workspaceRect.top;
269
270
+ // Set flydown position
271
+ this.flydown_.setPosition(x, y);
272
// Show the flydown with your blocks
273
this.flydown_.show(this.getBlocksForFlydown_());
274
0 commit comments