Scroll to the procedure definition from the procedure call context menu

This commit is contained in:
Rachel Fenichel
2018-04-05 17:57:47 -07:00
parent 2884bdfaa8
commit 3a4adb3b0d

View File

@@ -860,7 +860,10 @@ Blockly.Blocks['procedures_callnoreturn'] = {
var workspace = this.workspace;
option.callback = function() {
var def = Blockly.Procedures.getDefinition(name, workspace);
def && def.select();
if (def) {
workspace.centerOnBlock(def.id);
def.select();
}
};
options.push(option);
},