diff --git a/core/connection.js b/core/connection.js index b7c0edc3c..468c68a15 100644 --- a/core/connection.js +++ b/core/connection.js @@ -54,29 +54,29 @@ Blockly.Connection.prototype.targetConnection = null; /** * List of compatible value types. Null if all types are compatible. - * @private * @type {Array} + * @private */ Blockly.Connection.prototype.check_ = null; /** * Horizontal location of this connection. - * @private * @type {number} + * @private */ Blockly.Connection.prototype.x_ = 0; /** * Vertical location of this connection. - * @private * @type {number} + * @private */ Blockly.Connection.prototype.y_ = 0; /** * Has this connection been added to the connection database? - * @private * @type {boolean} + * @private */ Blockly.Connection.prototype.inDB_ = false; diff --git a/core/field_colour.js b/core/field_colour.js index ed738a3fa..6bca8aa97 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -50,13 +50,23 @@ Blockly.FieldColour = function(colour, opt_changeHandler) { this.setChangeHandler(opt_changeHandler); // Set the initial state. this.setValue(colour); - - // By default use the global constants for colours and columns. - this.colours_ = null; - this.columns_ = 0; }; goog.inherits(Blockly.FieldColour, Blockly.Field); +/** + * By default use the global constants for colours. + * @type {Array.} + * @private + */ +Blockly.FieldColour.prototype.colours_ = null; + +/** + * By default use the global constants for columns. + * @type {number} + * @private + */ +Blockly.FieldColour.prototype.columns_ = 0; + /** * Install this field on a block. * @param {!Blockly.Block} block The block containing this field. diff --git a/core/field_label.js b/core/field_label.js index ddc353a04..da52f8d09 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -40,7 +40,6 @@ goog.require('goog.math.Size'); * @constructor */ Blockly.FieldLabel = function(text, opt_class) { - this.sourceBlock_ = null; this.size_ = new goog.math.Size(0, 17.5); this.class_ = opt_class; this.setText(text); diff --git a/core/flyout.js b/core/flyout.js index 18f37397d..5319d91cc 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -60,23 +60,11 @@ Blockly.Flyout = function(workspaceOptions) { /** * Opaque data that can be passed to Blockly.unbindEvent_. - * @type {Array.} + * @type {!Array.} * @private */ this.eventWrappers_ = []; - /** - * @type {number} - * @private - */ - this.width_ = 0; - - /** - * @type {number} - * @private - */ - this.height_ = 0; - /** * List of background buttons that lurk behind each block to catch clicks * landing in the blocks' lakes and bays. @@ -113,6 +101,20 @@ Blockly.Flyout.prototype.CORNER_RADIUS = 8; */ Blockly.Flyout.prototype.SCROLLBAR_PADDING = 2; +/** + * Width of flyout. + * @type {number} + * @private + */ +Blockly.Flyout.prototype.width_ = 0; + +/** + * Height of flyout. + * @type {number} + * @private + */ +Blockly.Flyout.prototype.height_ = 0; + /** * Creates the flyout's DOM. Only needs to be called once. * @return {!Element} The flyout's SVG group. diff --git a/core/generator.js b/core/generator.js index db6ceb69e..ce0cc363f 100644 --- a/core/generator.js +++ b/core/generator.js @@ -38,7 +38,6 @@ goog.require('goog.asserts'); */ Blockly.Generator = function(name) { this.name_ = name; - this.RESERVED_WORDS_ = ''; this.FUNCTION_NAME_PLACEHOLDER_REGEXP_ = new RegExp(this.FUNCTION_NAME_PLACEHOLDER_, 'g'); }; @@ -270,9 +269,17 @@ Blockly.Generator.prototype.addLoopTrap = function(branch, id) { /** * The method of indenting. Defaults to two spaces, but language generators * may override this to increase indent or change to tabs. + * @type {string} */ Blockly.Generator.prototype.INDENT = ' '; +/** + * Comma-separated list of reserved words. + * @type {string} + * @private + */ +Blockly.Generator.prototype.RESERVED_WORDS_ = ''; + /** * Add one or more words to the list of reserved words for this language. * @param {string} words Comma-separated list of words to add to the list. @@ -287,6 +294,7 @@ Blockly.Generator.prototype.addReservedWords = function(words) { * Blockly.Generator.provideFunction_. It must not be legal code that could * legitimately appear in a function definition (or comment), and it must * not confuse the regular expression parser. + * @type {string} * @private */ Blockly.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_ = '{leCUI8hutHZI4480Dc}'; diff --git a/core/input.js b/core/input.js index 7a24b8ad2..b92433769 100644 --- a/core/input.js +++ b/core/input.js @@ -53,12 +53,21 @@ Blockly.Input = function(type, name, block, connection) { this.connection = connection; /** @type {!Array.} */ this.fieldRow = []; - /** @type {number} */ - this.align = Blockly.ALIGN_LEFT; - /** @type {boolean} */ - this.visible_ = true; }; +/** + * Alignment of input's fields (left, right or centre). + * @type {number} + */ +Blockly.Input.prototype.align = Blockly.ALIGN_LEFT; + +/** + * Is the input visible? + * @type {boolean} + * @private + */ +Blockly.Input.prototype.visible_ = true; + /** * Add an item to the end of the input's field row. * @param {string|!Blockly.Field} field Something to add as a field. diff --git a/core/scrollbar.js b/core/scrollbar.js index 0712df792..b833ebe14 100644 --- a/core/scrollbar.js +++ b/core/scrollbar.js @@ -38,7 +38,6 @@ goog.require('goog.events'); */ Blockly.ScrollbarPair = function(workspace) { this.workspace_ = workspace; - this.oldHostMetrics_ = null; this.hScroll = new Blockly.Scrollbar(workspace, true, true); this.vScroll = new Blockly.Scrollbar(workspace, false, true); this.corner_ = Blockly.createSvgElement('rect', @@ -48,6 +47,13 @@ Blockly.ScrollbarPair = function(workspace) { Blockly.Scrollbar.insertAfter_(this.corner_, workspace.getBubbleCanvas()); }; +/** + * Previously recorded metrics from the workspace. + * @type {Object} + * @private + */ +Blockly.ScrollbarPair.prototype.oldHostMetrics_ = null; + /** * Dispose of this pair of scrollbars. * Unlink from all DOM elements to prevent memory leaks. diff --git a/core/widgetdiv.js b/core/widgetdiv.js index 12ac56fba..57aff0878 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -40,15 +40,15 @@ Blockly.WidgetDiv.DIV = null; /** * The object currently using this container. - * @private * @type {Object} + * @private */ Blockly.WidgetDiv.owner_ = null; /** * Optional cleanup function set by whichever object uses the widget. - * @private * @type {Function} + * @private */ Blockly.WidgetDiv.dispose_ = null; diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 53d319331..fb1071e35 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -62,7 +62,7 @@ Blockly.WorkspaceSvg = function(options) { /** * Opaque data that can be passed to Blockly.unbindEvent_. - * @type {Array.} + * @type {!Array.} * @private */ this.eventWrappers_ = [];