mirror of
https://github.com/google/blockly.git
synced 2026-04-27 07:30:21 +02:00
chore: Remove the keyboard-navigation plugin from the advanced playground (#9670)
This commit is contained in:
Generated
-9
@@ -1986,7 +1986,6 @@
|
||||
"devDependencies": {
|
||||
"@blockly/block-test": "^7.0.2",
|
||||
"@blockly/dev-tools": "^9.0.2",
|
||||
"@blockly/keyboard-navigation": "^3.0.1",
|
||||
"@blockly/theme-modern": "^7.0.1",
|
||||
"@hyperjump/browser": "^1.1.4",
|
||||
"@hyperjump/json-schema": "^1.5.0",
|
||||
@@ -2145,14 +2144,6 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"packages/blockly/node_modules/@blockly/keyboard-navigation": {
|
||||
"version": "3.0.1",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peerDependencies": {
|
||||
"blockly": "^12.3.0"
|
||||
}
|
||||
},
|
||||
"packages/blockly/node_modules/@blockly/theme-dark": {
|
||||
"version": "8.0.1",
|
||||
"dev": true,
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
"devDependencies": {
|
||||
"@blockly/block-test": "^7.0.2",
|
||||
"@blockly/dev-tools": "^9.0.2",
|
||||
"@blockly/keyboard-navigation": "^3.0.1",
|
||||
"@blockly/theme-modern": "^7.0.1",
|
||||
"@hyperjump/browser": "^1.1.4",
|
||||
"@hyperjump/json-schema": "^1.5.0",
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
await loadScript(
|
||||
'../../node_modules/@blockly/theme-modern/dist/index.js',
|
||||
);
|
||||
await loadScript(
|
||||
'../../node_modules/@blockly/keyboard-navigation/dist/index.js',
|
||||
);
|
||||
|
||||
let kbNavigation;
|
||||
|
||||
@@ -52,28 +49,6 @@
|
||||
// Refresh theme.
|
||||
ws.setTheme(ws.getTheme());
|
||||
});
|
||||
|
||||
// Keyboard navigation options.
|
||||
const kbOptions = {
|
||||
'Enable keyboard navigation': false,
|
||||
};
|
||||
gui.remember(kbOptions);
|
||||
gui.add(kbOptions, 'Enable keyboard navigation').onChange((enabled) => {
|
||||
setupKeyboardNav(enabled, playground);
|
||||
});
|
||||
|
||||
// Set up keyboard navigation on page load
|
||||
setupKeyboardNav(kbOptions['Enable keyboard navigation'], playground);
|
||||
}
|
||||
|
||||
function setupKeyboardNav(enabled, playground) {
|
||||
if (enabled) {
|
||||
kbNavigation = new KeyboardNavigation(playground.getWorkspace());
|
||||
} else {
|
||||
if (kbNavigation) {
|
||||
kbNavigation.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initPlayground() {
|
||||
@@ -128,8 +103,6 @@
|
||||
};
|
||||
|
||||
Blockly.ContextMenuItems.registerCommentOptions();
|
||||
KeyboardNavigation.registerKeyboardNavigationStyles();
|
||||
// TODO: register the navigation-deferring toolbox.
|
||||
|
||||
createPlayground(
|
||||
document.getElementById('root'),
|
||||
|
||||
Reference in New Issue
Block a user