From 4d02e9bee6dee165af08834d8e01ac54087e2a19 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Mon, 31 Oct 2016 14:38:55 -0700 Subject: [PATCH] lint --- core/blockly.js | 2 +- core/flyout.js | 4 ++-- core/flyout_button.js | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/blockly.js b/core/blockly.js index 5f470cda7..3d33d8e8c 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -127,7 +127,7 @@ Blockly.flyoutButtonCallbacks_ = {}; /** * Register a callback function associated with a given key, for clicks on * buttons and labels in the flyout. - * For instance, a button specified by the xml + * For instance, a button specified by the XML * * should be matched by a call to * registerButtonCallback("CREATE_VARIABLE", yourCallbackFunction). diff --git a/core/flyout.js b/core/flyout.js index d2c35db5e..0fed89f80 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -700,9 +700,9 @@ Blockly.Flyout.prototype.show = function(xmlList) { } } else if (tagName == 'BUTTON') { var label = xml.getAttribute('text'); - var callback_key = xml.getAttribute('callbackKey'); + var callbackKey = xml.getAttribute('callbackKey'); var curButton = new Blockly.FlyoutButton(this.workspace_, - this.targetWorkspace_, label, callback_key); + this.targetWorkspace_, label, callbackKey); contents.push({type: 'button', button: curButton}); gaps.push(default_gap); } diff --git a/core/flyout_button.js b/core/flyout_button.js index 128072942..662d228c9 100644 --- a/core/flyout_button.js +++ b/core/flyout_button.js @@ -36,9 +36,11 @@ goog.require('goog.math.Coordinate'); * button. * @param {!Blockly.WorkspaceSvg} targetWorkspace The flyout's target workspace. * @param {string} text The text to display on the button. + * @param {string} callbackKey The key to use when looking up the callback for a + * click on this button. * @constructor */ -Blockly.FlyoutButton = function(workspace, targetWorkspace, text, callback_key) { +Blockly.FlyoutButton = function(workspace, targetWorkspace, text, callbackKey) { /** * @type {!Blockly.WorkspaceSvg} * @private @@ -68,7 +70,7 @@ Blockly.FlyoutButton = function(workspace, targetWorkspace, text, callback_key) * @type {function(!Blockly.FlyoutButton)} * @private */ - this.callback_ = Blockly.flyoutButtonCallbacks_[callback_key]; + this.callback_ = Blockly.flyoutButtonCallbacks_[callbackKey]; }; /**