From 7d57143f75aae730f6525db1ff3c8f1f20d322c9 Mon Sep 17 00:00:00 2001 From: marisaleung Date: Fri, 19 May 2017 12:33:41 -0700 Subject: [PATCH] Make flyout get variables from target workspace's variableMap. --- core/flyout.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/flyout.js b/core/flyout.js index 7b77f3922..d90f0dd92 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -253,6 +253,13 @@ Blockly.Flyout.prototype.init = function(targetWorkspace) { // A flyout connected to a workspace doesn't have its own current gesture. this.workspace_.getGesture = this.targetWorkspace_.getGesture.bind(this.targetWorkspace_); + + // Get variables from the main workspace rather than the target workspace. + this.workspace_.getVariable = + this.targetWorkspace_.getVariable.bind(this.targetWorkspace_); + + this.workspace_.getVariableById = + this.targetWorkspace_.getVariableById.bind(this.targetWorkspace_); }; /**