From 53cc12da77f19f33aeec95c2ce1b76f82b2f8eb9 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Fri, 17 May 2024 09:48:41 -0700 Subject: [PATCH] chore: fix playground context menu (#8139) --- tests/playgrounds/advanced_playground.html | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tests/playgrounds/advanced_playground.html b/tests/playgrounds/advanced_playground.html index 515ff557f..1fcbbd812 100644 --- a/tests/playgrounds/advanced_playground.html +++ b/tests/playgrounds/advanced_playground.html @@ -26,7 +26,6 @@ function createWorkspace(blocklyDiv, options) { var workspace = Blockly.inject(blocklyDiv, options); - workspace.configureContextMenu = configureContextMenu.bind(workspace); return workspace; } @@ -101,6 +100,8 @@ }, }; + Blockly.ContextMenuItems.registerCommentOptions(); + createPlayground( document.getElementById('root'), createWorkspace, @@ -125,23 +126,6 @@ document.body.style.backgroundColor = '#d6d6ff'; // Familliar lilac. } } - - function configureContextMenu(menuOptions, e) { - var workspace = this; - var screenshotOption = { - text: 'Download Screenshot', - enabled: workspace.getTopBlocks().length, - callback: function () { - downloadScreenshot(workspace); - }, - }; - menuOptions.push(screenshotOption); - - // Adds a default-sized workspace comment to the workspace. - menuOptions.push( - Blockly.ContextMenu.workspaceCommentOption(workspace, e), - ); - } start();