mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
lint
This commit is contained in:
@@ -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
|
||||
* <button text="create variable" callbackKey="CREATE_VARIABLE"></button>
|
||||
* should be matched by a call to
|
||||
* registerButtonCallback("CREATE_VARIABLE", yourCallbackFunction).
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user