File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,18 @@ export class FlyoutCursor extends Blockly.LineCursor {
8989export const registrationType = Blockly . registry . Type . CURSOR ;
9090export const registrationName = 'FlyoutCursor' ;
9191
92- Blockly . registry . register ( registrationType , registrationName , FlyoutCursor ) ;
93-
9492export const pluginInfo = {
9593 [ registrationType . toString ( ) ] : registrationName ,
9694} ;
95+
96+ /**
97+ * Registers the FlyoutCursor with Blockly's registry.
98+ */
99+ export function registerFlyoutCursor ( ) {
100+ Blockly . registry . register (
101+ registrationType ,
102+ registrationName ,
103+ FlyoutCursor ,
104+ true ,
105+ ) ;
106+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import * as Blockly from 'blockly';
99import 'blockly/blocks' ;
1010import { installAllBlocks as installColourBlocks } from '@blockly/field-colour' ;
1111import { KeyboardNavigation } from '../src/index' ;
12+ import { registerFlyoutCursor } from '../src/flyout_cursor' ;
1213// @ts -expect-error No types in js file
1314import { forBlock } from './blocks/p5_generators' ;
1415// @ts -expect-error No types in js file
@@ -92,6 +93,7 @@ function createWorkspace(): Blockly.WorkspaceSvg {
9293
9394 // Must be called before injection.
9495 KeyboardNavigation . registerKeyboardNavigationStyles ( ) ;
96+ registerFlyoutCursor ( ) ;
9597 const workspace = Blockly . inject ( blocklyDiv , injectOptions ) ;
9698
9799 Blockly . ContextMenuItems . registerCommentOptions ( ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import * as Blockly from 'blockly';
99import 'blockly/blocks' ;
1010import { installAllBlocks as installColourBlocks } from '@blockly/field-colour' ;
1111import { KeyboardNavigation } from '../../src/index' ;
12+ import { registerFlyoutCursor } from '../../src/flyout_cursor' ;
1213// @ts -expect-error No types in js file
1314import { blocks } from './../blocks/p5_blocks' ;
1415// @ts -expect-error No types in js file
@@ -80,6 +81,7 @@ function createWorkspace(): Blockly.WorkspaceSvg {
8081 }
8182 // Must be called before injection.
8283 KeyboardNavigation . registerKeyboardNavigationStyles ( ) ;
84+ registerFlyoutCursor ( ) ;
8385 const workspace = Blockly . inject ( blocklyDiv , injectOptions ) ;
8486
8587 Blockly . ContextMenuItems . registerCommentOptions ( ) ;
You can’t perform that action at this time.
0 commit comments