diff --git a/core/block_svg.js b/core/block_svg.js index 9bc5a35a8..92cbd4d84 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -1076,6 +1076,7 @@ Blockly.BlockSvg.prototype.updateColour = function() { /** * Sets the colour of the border. * Removes the light and dark paths if a border colour is defined. + * @private */ Blockly.BlockSvg.prototype.setBorderColour_ = function() { var borderColours = this.getColourBorder(); @@ -1097,6 +1098,7 @@ Blockly.BlockSvg.prototype.setBorderColour_ = function() { /** * Sets the colour of shadow blocks. * @return {?string} The background colour of the block. + * @private */ Blockly.BlockSvg.prototype.setShadowColour_ = function() { var shadowColour = this.getColourShadow(); diff --git a/core/blocks.js b/core/blocks.js index 328eacf43..ca1367afe 100644 --- a/core/blocks.js +++ b/core/blocks.js @@ -27,7 +27,7 @@ */ goog.provide('Blockly.Blocks'); -/* +/** * A mapping of block type names to block prototype objects. * @type {!Object.} */ diff --git a/core/bubble.js b/core/bubble.js index 53cbe5755..a319efcba 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -126,6 +126,7 @@ Blockly.Bubble.onMouseMoveWrapper_ = null; /** * Function to call on resize of bubble. * @type {Function} + * @private */ Blockly.Bubble.prototype.resizeCallback_ = null; @@ -144,12 +145,12 @@ Blockly.Bubble.unbindDragEvents_ = function() { } }; -/* +/** * Handle a mouse-up event while dragging a bubble's border or resize handle. - * @param {!Event} e Mouse up event. + * @param {!Event} _e Mouse up event. * @private */ -Blockly.Bubble.bubbleMouseUp_ = function(/* e */) { +Blockly.Bubble.bubbleMouseUp_ = function(_e) { Blockly.Touch.clearTouchIdentifier(); Blockly.Bubble.unbindDragEvents_(); }; diff --git a/core/field_angle.js b/core/field_angle.js index b7002a495..eb26c4597 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -331,9 +331,9 @@ Blockly.FieldAngle.prototype.dropdownCreate_ = function() { // a click handler on the drag surface to update the value if the surface // is clicked. this.clickSurfaceWrapper_ = - Blockly.bindEventWithChecks_(circle, 'click', this, this.onMouseMove, true, true); + Blockly.bindEventWithChecks_(circle, 'click', this, this.onMouseMove_, true, true); this.moveSurfaceWrapper_ = - Blockly.bindEventWithChecks_(circle, 'mousemove', this, this.onMouseMove, true, true); + Blockly.bindEventWithChecks_(circle, 'mousemove', this, this.onMouseMove_, true, true); return svg; }; @@ -367,8 +367,9 @@ Blockly.FieldAngle.prototype.hide_ = function() { /** * Set the angle to match the mouse's position. * @param {!Event} e Mouse move event. + * @protected */ -Blockly.FieldAngle.prototype.onMouseMove = function(e) { +Blockly.FieldAngle.prototype.onMouseMove_ = function(e) { // Calculate angle. var bBox = this.gauge_.ownerSVGElement.getBoundingClientRect(); var dx = e.clientX - bBox.left - Blockly.FieldAngle.HALF; diff --git a/core/field_image.js b/core/field_image.js index fe699a867..f60c40a92 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -247,6 +247,7 @@ Blockly.FieldImage.prototype.setAlt = function(alt) { /** * If field click is called, and click handler defined, * call the handler. + * @protected */ Blockly.FieldImage.prototype.showEditor_ = function() { if (this.clickHandler_) { diff --git a/core/flyout_base.js b/core/flyout_base.js index 24326655d..35b353e6e 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -111,6 +111,7 @@ Blockly.Flyout = function(workspaceOptions) { /** * Width of output tab. * @type {number} + * @protected * @const */ this.tabWidth_ = this.workspace_.getRenderer().getConstants().TAB_WIDTH; diff --git a/core/gesture.js b/core/gesture.js index ba80a8fdc..c8aadf03b 100644 --- a/core/gesture.js +++ b/core/gesture.js @@ -38,7 +38,7 @@ goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.WorkspaceDragger'); -/* +/** * Note: In this file "start" refers to touchstart, mousedown, and pointerstart * events. "End" refers to touchend, mouseup, and pointerend events. */ @@ -57,6 +57,7 @@ Blockly.Gesture = function(e, creatorWorkspace) { * The position of the mouse when the gesture started. Units are CSS pixels, * with (0, 0) at the top left of the browser window (mouseEvent clientX/Y). * @type {Blockly.utils.Coordinate} + * @private */ this.mouseDownXY_ = null; diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 85c23d43a..c936aed43 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -352,6 +352,7 @@ Blockly.InsertionMarkerManager.prototype.shouldUpdatePreviews_ = function( * in workspace units. * @return {!Object} An object containing a local connection, a closest * connection, and a radius. + * @private */ Blockly.InsertionMarkerManager.prototype.getCandidate_ = function(dxy) { var radius = this.getStartRadius_(); @@ -559,6 +560,7 @@ Blockly.InsertionMarkerManager.prototype.hidePreview_ = function() { /** * Add highlighting showing which block will be replaced. + * @private */ Blockly.InsertionMarkerManager.prototype.highlightBlock_ = function() { var closest = this.closestConnection_; @@ -576,6 +578,7 @@ Blockly.InsertionMarkerManager.prototype.highlightBlock_ = function() { /** * Get rid of the highlighting marking the block that will be replaced. + * @private */ Blockly.InsertionMarkerManager.prototype.unhighlightBlock_ = function() { var closest = this.closestConnection_; diff --git a/core/keyboard_nav/cursor_svg.js b/core/keyboard_nav/cursor_svg.js index 6747e1a28..13a5e4a8d 100644 --- a/core/keyboard_nav/cursor_svg.js +++ b/core/keyboard_nav/cursor_svg.js @@ -352,6 +352,7 @@ Blockly.CursorSvg.prototype.showCurrent_ = function() { * @param {number} width The width of the block. * @param {number} cursorOffset The extra padding for around the block. * @param {number} cursorHeight The height of the cursor. + * @private */ Blockly.CursorSvg.prototype.positionBlock_ = function(width, cursorOffset, cursorHeight) { var cursorPath = Blockly.utils.svgPaths.moveBy(-cursorOffset, cursorHeight) + diff --git a/core/scrollbar.js b/core/scrollbar.js index c327d8f52..4042635e9 100644 --- a/core/scrollbar.js +++ b/core/scrollbar.js @@ -255,6 +255,7 @@ Blockly.Scrollbar.prototype.origin_ = new Blockly.utils.Coordinate(0, 0); * For a horizontal scrollbar this is the x coordinate of the mouse down event; * for a vertical scrollbar it's the y coordinate of the mouse down event. * @type {Blockly.utils.Coordinate} + * @private */ Blockly.Scrollbar.prototype.startDragMouse_ = 0; @@ -359,6 +360,7 @@ Blockly.Scrollbar.prototype.dispose = function() { * Set the length of the scrollbar's handle and change the SVG attribute * accordingly. * @param {number} newLength The new scrollbar handle length in CSS pixels. + * @private */ Blockly.Scrollbar.prototype.setHandleLength_ = function(newLength) { this.handleLength_ = newLength; diff --git a/core/theme.js b/core/theme.js index b5528863f..58adea0e2 100644 --- a/core/theme.js +++ b/core/theme.js @@ -38,18 +38,21 @@ Blockly.Theme = function(blockStyles, categoryStyles, opt_componentStyles) { /** * The block styles map. * @type {!Object.} + * @private */ this.blockStyles_ = blockStyles; /** * The category styles map. * @type {!Object.} + * @private */ this.categoryStyles_ = categoryStyles; /** * The UI components styles map. * @type {!Object.} + * @private */ this.componentStyles_ = opt_componentStyles || Object.create(null); }; diff --git a/core/toolbox.js b/core/toolbox.js index 0d72efc78..046cfb345 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -531,6 +531,7 @@ Blockly.Toolbox.prototype.setColour_ = function(colourValue, childOut, * @param {string} styleName Name of the style. * @param {!Blockly.tree.TreeNode} childOut The child to set the hexColour on. * @param {string} categoryName Name of the toolbox category. + * @private */ Blockly.Toolbox.prototype.setColourFromStyle_ = function( styleName, childOut, categoryName) { diff --git a/core/workspace_comment_render_svg.js b/core/workspace_comment_render_svg.js index 74e43d23b..6ba4383c2 100644 --- a/core/workspace_comment_render_svg.js +++ b/core/workspace_comment_render_svg.js @@ -325,7 +325,7 @@ Blockly.WorkspaceCommentSvg.prototype.unbindDragEvents_ = function() { } }; -/* +/** * Handle a mouse-up event while dragging a comment's border or resize handle. * @param {!Event} e Mouse up event. * @private diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 6b01121cd..dc8c3216f 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -143,6 +143,7 @@ Blockly.utils.object.inherits(Blockly.WorkspaceSvg, Blockly.Workspace); * A wrapper function called when a resize event occurs. * You can pass the result to `unbindEvent_`. * @type {Array.} + * @private */ Blockly.WorkspaceSvg.prototype.resizeHandlerWrapper_ = null; @@ -1175,6 +1176,7 @@ Blockly.WorkspaceSvg.prototype.paste = function(xmlBlock) { /** * Paste the provided block onto the workspace. * @param {!Element} xmlBlock XML block element. + * @private */ Blockly.WorkspaceSvg.prototype.pasteBlock_ = function(xmlBlock) { Blockly.Events.disable(); diff --git a/demos/blockfactory/factory.js b/demos/blockfactory/factory.js index 8218846f1..77ab56ff1 100644 --- a/demos/blockfactory/factory.js +++ b/demos/blockfactory/factory.js @@ -71,7 +71,7 @@ BlockFactory.updateBlocksFlag = false; // TODO: Replace global state with parameter passed to functions. BlockFactory.updateBlocksFlagDelayed = false; -/* +/** * The starting XML for the Block Factory main workspace. Contains the * unmovable, undeletable factory_base block. */ diff --git a/demos/blockfactory/factory_utils.js b/demos/blockfactory/factory_utils.js index dfed4578e..92f5a3370 100644 --- a/demos/blockfactory/factory_utils.js +++ b/demos/blockfactory/factory_utils.js @@ -988,7 +988,7 @@ FactoryUtils.cleanXml = function(xml) { return newXml; }; -/* +/** * Checks if a block has a variable field. Blocks with variable fields cannot * be shadow blocks. * @param {Blockly.Block} block The block to check if a variable field exists. diff --git a/demos/blockfactory/workspacefactory/wfactory_controller.js b/demos/blockfactory/workspacefactory/wfactory_controller.js index c1305fde6..30f032eae 100644 --- a/demos/blockfactory/workspacefactory/wfactory_controller.js +++ b/demos/blockfactory/workspacefactory/wfactory_controller.js @@ -917,7 +917,7 @@ WorkspaceFactoryController.prototype.clearAll = function() { this.updatePreview(); }; -/* +/** * Makes the currently selected block a user-generated shadow block. These * blocks are not made into real shadow blocks, but recorded in the model * and visually marked as shadow blocks, allowing the user to move and edit @@ -1262,7 +1262,7 @@ WorkspaceFactoryController.prototype.importBlocks = function(file, format) { reader.readAsText(file); }; -/* +/** * Updates the block library category in the toolbox workspace toolbox. * @param {!Element} categoryXml XML for the block library category. * @param {!Array.} libBlockTypes Array of block types from the block @@ -1323,7 +1323,7 @@ WorkspaceFactoryController.prototype.warnForUndefinedBlocks_ = function() { } }; -/* +/** * Determines if a standard variable category is in the custom toolbox. * @return {boolean} True if a variables category is in use, false otherwise. */ diff --git a/demos/blockfactory/workspacefactory/wfactory_model.js b/demos/blockfactory/workspacefactory/wfactory_model.js index a295a496a..ff9eaff8e 100644 --- a/demos/blockfactory/workspacefactory/wfactory_model.js +++ b/demos/blockfactory/workspacefactory/wfactory_model.js @@ -390,7 +390,7 @@ WorkspaceFactoryModel.prototype.setOptions = function(options) { this.options = options; }; -/* +/** * Returns an array of all the block types currently being used in the toolbox * and the pre-loaded blocks. No duplicates. * TODO(evd2014): Move pushBlockTypesToList to FactoryUtils. diff --git a/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java b/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java index 0849d0a27..ae1f7e322 100644 --- a/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java +++ b/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java @@ -1,4 +1,4 @@ -/* +/** * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/externs/svg-externs.js b/externs/svg-externs.js index 68cd99706..5fca4dcde 100644 --- a/externs/svg-externs.js +++ b/externs/svg-externs.js @@ -1,4 +1,4 @@ -/* +/** * Copyright 2017 The Closure Compiler Authors * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/generators/php/lists.js b/generators/php/lists.js index 17b522a6c..a1d90b59f 100644 --- a/generators/php/lists.js +++ b/generators/php/lists.js @@ -20,7 +20,7 @@ * @author daarond@gmail.com (Daaron Dwyer) */ -/* +/** * Lists in PHP are known to break when non-variables are passed into blocks * that require a list. PHP, unlike other languages, passes arrays as reference * value instead of value so we are unable to support it to the extent we can diff --git a/tests/generators/index.html b/tests/generators/index.html index e1f88f22a..a7082e286 100644 --- a/tests/generators/index.html +++ b/tests/generators/index.html @@ -91,7 +91,7 @@ function start() { changeIndex(); } -/* +/** * Run this test to load all of the tests in the selected suites. The contents * will be loaded into the workspace in order. To test the generators: * - select your language from the buttons above the text area