1313
1414// Unused import preserved for side-effects. Remove if unneeded.
1515import { BlockSvg } from '../block_svg.js' ;
16- import type { BlocklyOptions } from '../blockly_options.js' ;
1716import * as browserEvents from '../browser_events.js' ;
1817import * as common from '../common.js' ;
1918import { ComponentManager } from '../component_manager.js' ;
@@ -33,7 +32,6 @@ import {isSelectableToolboxItem} from '../interfaces/i_selectable_toolbox_item.j
3332import type { IStyleable } from '../interfaces/i_styleable.js' ;
3433import type { IToolbox } from '../interfaces/i_toolbox.js' ;
3534import type { IToolboxItem } from '../interfaces/i_toolbox_item.js' ;
36- import { Options } from '../options.js' ;
3735import * as registry from '../registry.js' ;
3836import type { KeyboardShortcut } from '../shortcut_registry.js' ;
3937import * as Touch from '../touch.js' ;
@@ -325,19 +323,7 @@ export class Toolbox
325323 */
326324 protected createFlyout_ ( ) : IFlyout {
327325 const workspace = this . workspace_ ;
328- // TODO (#4247): Look into adding a makeFlyout method to Blockly Options.
329- const workspaceOptions = new Options ( {
330- 'parentWorkspace' : workspace ,
331- 'rtl' : workspace . RTL ,
332- 'oneBasedIndex' : workspace . options . oneBasedIndex ,
333- 'horizontalLayout' : workspace . horizontalLayout ,
334- 'renderer' : workspace . options . renderer ,
335- 'rendererOverrides' : workspace . options . rendererOverrides ,
336- 'modalInputs' : workspace . options . modalInputs ,
337- 'move' : {
338- 'scrollbars' : true ,
339- } ,
340- } as BlocklyOptions ) ;
326+ const workspaceOptions = workspace . copyOptionsForFlyout ( ) ;
341327 // Options takes in either 'end' or 'start'. This has already been parsed to
342328 // be either 0 or 1, so set it after.
343329 workspaceOptions . toolboxPosition = workspace . options . toolboxPosition ;
0 commit comments