Automatic commit Wed Feb 5 03:00:02 PST 2014

This commit is contained in:
ellen.spertus
2014-02-05 03:00:02 -08:00
parent eac77f3904
commit c3b19ca9cc
53 changed files with 87 additions and 99 deletions

View File

@@ -35,10 +35,10 @@ goog.provide('Blockly.Blocks');
/**
* Create a block template and add it as a field to Blockly.Blocks with the
* name details.blockName.
* @param {!object} details Details about the block that should be created.
* @param {!Object} details Details about the block that should be created.
* The following fields are used:
* - blockName {!string} The name of the block, which should be unique.
* - colour {!number} The hue value of the colour to use for the block.
* - blockName {string} The name of the block, which should be unique.
* - colour {number} The hue value of the colour to use for the block.
* (Blockly.HSV_SATURATION and Blockly.HSV_VALUE are used for saturation
* and value, respectively.)
* - output {?string|Array.<string>} Output type. If undefined, there are
@@ -47,16 +47,16 @@ goog.provide('Blockly.Blocks');
* - null: Any type can be produced.
* - String: Only the specified type (e.g., 'Number') can be produced.
* - Array.<string>: Any of the specified types can be produced.
* - message {!string} A message suitable for passing as a first argument to
* - message {string} A message suitable for passing as a first argument to
* Blockly.Block.interpolateMsg(). Specifically, it should consist of
* text to be displayed on the block, optionally interspersed with
* references to inputs (one-based indices into the args array) or fields,
* such as '%1' for the first element of args. The creation of dummy
* inputs can be forced with a newline (\n).
* - args {?Array.<object>} One or more descriptions of value inputs.
* - args {Array.<Object>} One or more descriptions of value inputs.
* TODO: Add Fields and statement stacks.
* Each object in the array can have the following fields:
* - name {!string} The name of the input.
* - name {string} The name of the input.
* - type {?number} One of Blockly.INPUT_VALUE, Blockly.NEXT_STATEMENT, or
* ??. If not provided, it is assumed to be Blockly.INPUT_VALUE.
* - check {?string|Array.<string>} Input type. See description of the
@@ -72,9 +72,9 @@ goog.provide('Blockly.Blocks');
* - nextStatement {?boolean} Whether there should be a statement
* connector on the bottom of the block. If not specified, the default
* value will be !output.
* - tooltip {?string|function} Tooltip text or a function on this block
* - tooltip {?string|Function} Tooltip text or a function on this block
* that returns a tooltip string.
* - helpUrl {?string|function} The help URL, or a function on this block
* - helpUrl {?string|Function} The help URL, or a function on this block
* that returns the help URL.
* - switchable {?boolean} Whether the block should be switchable between
* an expression and statement. Specifically, if true, the block will
@@ -84,9 +84,9 @@ goog.provide('Blockly.Blocks');
* menu option 'Remove output' will be replaced by 'Add Output'. If
* selected, the output will reappear and the statement connectors will
* disappear.
* - mutationToDomFunc {?function} TODO desc.
* - domToMutationFunc {?function} TODO desc.
* - customContextMenuFunc {?function} TODO desc.
* - mutationToDomFunc {Function} TODO desc.
* - domToMutationFunc {Function} TODO desc.
* - customContextMenuFunc {Function} TODO desc.
* Additional fields will be ignored.
*/
Blockly.Blocks.addTemplate = function(details) {
@@ -152,7 +152,7 @@ Blockly.Blocks.addTemplate = function(details) {
}
// Neil, how would you recommend specifying the final dummy alignment?
// Should it be a top-level field in details?
interpAgs.push(Blockly.ALIGN_RIGHT);
interpArgs.push(Blockly.ALIGN_RIGHT);
if (details.inline) {
this.setInlineInputs(details.inline);
}

View File

@@ -59,7 +59,7 @@ Blockly.Realtime.model_ = null;
/**
* The function used to initialize the UI after realtime is initialized.
* @type {Function()}
* @type {Function}
* @private
*/
Blockly.Realtime.initUi_ = null;
@@ -214,7 +214,7 @@ Blockly.Realtime.onBlocksMapChange_ = function(evt) {
/**
* A convenient wrapper around code that synchronizes the local model being
* edited with changes from another non-local model.
* @param {!Function()} thunk A thunk of code to call.
* @param {!Function} thunk A thunk of code to call.
* @private
*/
Blockly.Realtime.doWithinSync_ = function(thunk) {