Skip to content
Permalink
Browse files

Move copy before paste in workspace menu

  • Loading branch information...
xueyuanw authored and ewpatton committed Mar 5, 2019
1 parent 516cd43 commit 545bd082eb95790bb67c2364d9d0322c0cbe557c
Showing with 10 additions and 10 deletions.
  1. +10 −10 appinventor/blocklyeditor/src/workspace_svg.js
@@ -770,6 +770,16 @@ Blockly.WorkspaceSvg.prototype.customContextMenu = function(menuOptions) {
};
menuOptions.push(hideAll);

// Copy all blocks to backpack option.
var backpackCopyAll = {enabled: true};
backpackCopyAll.text = Blockly.Msg.COPY_ALLBLOCKS;
backpackCopyAll.callback = function() {
if (Blockly.getMainWorkspace().hasBackpack()) {
Blockly.getMainWorkspace().getBackpack().addAllToBackpack();
}
};
menuOptions.push(backpackCopyAll);

// Retrieve from backpack option.
var backpackRetrieve = {enabled: true};
backpackRetrieve.text = Blockly.Msg.BACKPACK_GET + " (" +
@@ -781,16 +791,6 @@ Blockly.WorkspaceSvg.prototype.customContextMenu = function(menuOptions) {
};
menuOptions.push(backpackRetrieve);

// Copy all blocks to backpack option.
var backpackCopyAll = {enabled: true};
backpackCopyAll.text = Blockly.Msg.COPY_ALLBLOCKS;
backpackCopyAll.callback = function() {
if (Blockly.getMainWorkspace().hasBackpack()) {
Blockly.getMainWorkspace().getBackpack().addAllToBackpack();
}
};
menuOptions.push(backpackCopyAll);

// Enable grid
var gridOption = {enabled: true};
gridOption.text = this.options.gridOptions['enabled'] ? Blockly.Msg.DISABLE_GRID :

0 comments on commit 545bd08

Please sign in to comment.
You can’t perform that action at this time.