Update: Blockly工作区添加Comment模块

This commit is contained in:
王立帮
2024-07-21 10:16:51 +08:00
parent 4de91b3b01
commit 64749a6541
3 changed files with 4 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ class EditorBlockly extends EditorBase {
this.addPlugins = () => { this.addPlugins = () => {
const { editor } = this; const { editor } = this;
// Blockly.ContextMenuItems.registerCommentOptions(); Blockly.ContextMenuItems.registerCommentOptions();
editor.configureContextMenu = (menuOptions, e) => { editor.configureContextMenu = (menuOptions, e) => {
const workspaceSearchOption = { const workspaceSearchOption = {
text: Blockly.Msg['WORKSPACE_SEARCH_OPEN'], text: Blockly.Msg['WORKSPACE_SEARCH_OPEN'],

View File

@@ -41,8 +41,6 @@ const {
const { LibManager, File } = goog.isElectron? Electron : Web; const { LibManager, File } = goog.isElectron? Electron : Web;
const { Socket } = WebSocket; const { Socket } = WebSocket;
Mixly.Editor = Mixly.Editor ?? {};
window.addEventListener('load', () => { window.addEventListener('load', () => {
const app = new App($('body')[0]); const app = new App($('body')[0]);

View File

@@ -42,6 +42,9 @@ API2.init = () => {
Editor.blockEditor = blockPage.getEditor(); Editor.blockEditor = blockPage.getEditor();
Editor.codeEditor = codePage.getEditor(); Editor.codeEditor = codePage.getEditor();
Object.assign(Blockly.Msg, HUES); Object.assign(Blockly.Msg, HUES);
Blockly.ALIGN_LEFT = Blockly.inputs.Align.LEFT;
Blockly.ALIGN_CENTRE = Blockly.inputs.Align.CENTRE;
Blockly.ALIGN_RIGHT = Blockly.inputs.Align.RIGHT;
} }
}); });