|
6 | 6 |
|
7 | 7 | import * as Blockly from 'blockly/core'; |
8 | 8 | import {NavigationController} from './navigation_controller'; |
9 | | -import {CursorOptions, LineCursor} from './line_cursor'; |
10 | 9 | import {getFlyoutElement, getToolboxElement} from './workspace_utilities'; |
11 | 10 |
|
12 | 11 | /** Options object for KeyboardNavigation instances. */ |
13 | 12 | export interface NavigationOptions { |
14 | | - cursor: Partial<CursorOptions>; |
| 13 | + cursor: Partial<Blockly.CursorOptions>; |
15 | 14 | } |
16 | 15 |
|
17 | 16 | /** Default options for LineCursor instances. */ |
@@ -49,7 +48,7 @@ export class KeyboardNavigation { |
49 | 48 | private navigationController: NavigationController; |
50 | 49 |
|
51 | 50 | /** Cursor for the main workspace. */ |
52 | | - private cursor: LineCursor; |
| 51 | + private cursor: Blockly.LineCursor; |
53 | 52 |
|
54 | 53 | /** |
55 | 54 | * These fields are used to preserve the workspace's initial state to restore |
@@ -92,8 +91,7 @@ export class KeyboardNavigation { |
92 | 91 | this.originalTheme = workspace.getTheme(); |
93 | 92 | this.setGlowTheme(); |
94 | 93 |
|
95 | | - this.cursor = new LineCursor(workspace, options.cursor); |
96 | | - this.cursor.install(); |
| 94 | + this.cursor = new Blockly.LineCursor(workspace, options.cursor); |
97 | 95 |
|
98 | 96 | // Ensure that only the root SVG G (group) has a tab index. |
99 | 97 | this.injectionDivTabIndex = workspace |
@@ -276,8 +274,6 @@ export class KeyboardNavigation { |
276 | 274 | this.workspace.getInjectionDiv().removeAttribute('tabindex'); |
277 | 275 | } |
278 | 276 |
|
279 | | - this.cursor.uninstall(); |
280 | | - |
281 | 277 | this.workspace.setTheme(this.originalTheme); |
282 | 278 |
|
283 | 279 | this.navigationController.dispose(); |
|
0 commit comments