Fixes jsdocs

This commit is contained in:
alschmiedt
2018-12-19 08:45:20 -08:00
parent ddaae6e3bf
commit 9afe497b7e
4 changed files with 19 additions and 19 deletions

View File

@@ -233,7 +233,7 @@ Blockly.Block.prototype.colour_ = '#000000';
/**
* Secondary colour of the block.
* Colour of the block if it is a shadow
* @type {string}
* @type {?string}
* @private
*/
Blockly.Block.prototype.secondaryColour_ = null;
@@ -241,21 +241,21 @@ Blockly.Block.prototype.secondaryColour_ = null;
/**
* Tertiary colour of the block.
* Colour of the border on the block.
* @type {string}
* @type {?string}
* @private
*/
Blockly.Block.prototype.tertiaryColour_ = null;
/**
* Style of the block.
* @type {Object} Map from style attribute name (string) to style value (string)
* @type {?Object} Map from style attribute name (string) to style value (string)
* @private
*/
Blockly.Block.prototype.style_ = null;
/**
* Name of the block style.
* @type {string}
* @type {?string}
* @private
*/
Blockly.Block.prototype.styleName_ = null;
@@ -857,7 +857,7 @@ Blockly.Block.prototype.getColour = function() {
/**
* Get the secondary colour of a block.
* @return {string} #RRGGBB string.
* @return {?string} #RRGGBB string.
*/
Blockly.Block.prototype.getSecondaryColour = function() {
return this.secondaryColour_;
@@ -865,7 +865,7 @@ Blockly.Block.prototype.getSecondaryColour = function() {
/**
* Get the tertiary colour of a block.
* @return {string} #RRGGBB string.
* @return {?string} #RRGGBB string.
*/
Blockly.Block.prototype.getTertiaryColour = function() {
return this.tertiaryColour_;
@@ -873,7 +873,7 @@ Blockly.Block.prototype.getTertiaryColour = function() {
/**
* Get the style of a block.
* @return {Object} Map of style names (string) to style value (string).
* @return {?Object} Map of style names (string) to style value (string).
*/
Blockly.Block.prototype.getStyle = function() {
return this.style_;
@@ -881,7 +881,7 @@ Blockly.Block.prototype.getStyle = function() {
/**
* Get the name of the block style.
* @return {string} Name of the block style.
* @return {?string} Name of the block style.
*/
Blockly.Block.prototype.getStyleName = function() {
return this.styleName_;
@@ -1352,7 +1352,7 @@ Blockly.Block.prototype.jsonInit = function(json) {
// Set basic properties of block.
if (json['style'] && json['colour']) {
throw Error(warningPrefix + 'Must not have both a colour and a style.');
} else if (json['style']){
} else if (json['style']) {
this.jsonInitStyle_(json, warningPrefix);
} else {
this.jsonInitColour_(json, warningPrefix);

View File

@@ -922,8 +922,8 @@ Blockly.BlockSvg.prototype.updateColour = function() {
/**
* Sets the colour of the border.
* Removes the light and dark paths if a tertiary colour is defined.
* @param {string} rgb Colour of the block.
* @param {string} tertiaryColour Colour of the border.
* @param {!string} rgb Colour of the block.
* @param {?string} tertiaryColour Colour of the border.
*/
Blockly.BlockSvg.prototype.setBorderColour_ = function(rgb, tertiaryColour) {
if (tertiaryColour) {
@@ -943,9 +943,9 @@ Blockly.BlockSvg.prototype.setBorderColour_ = function(rgb, tertiaryColour) {
/**
* Sets the colour of shadow blocks.
* @param {string} rgb Primary colour of the block.
* @param {string} secondaryColour Colour for shadow block.
* @return {string} hexColour The background color of the block.
* @param {!string} rgb Primary colour of the block.
* @param {?string} secondaryColour Colour for shadow block.
* @return {!string} hexColour The background color of the block.
*/
Blockly.BlockSvg.prototype.setShadowColour_ = function(
rgb, secondaryColour) {

View File

@@ -114,7 +114,7 @@ Blockly.cache3dSupported_ = null;
/**
* Holds all Blockly style attributes.
* @type {Blockly.Style}
* @type {?Blockly.Style}
* @private
*/
Blockly.style_ = null;
@@ -679,7 +679,7 @@ Blockly.checkBlockColourConstant_ = function(
* Sets the style for blockly and refreshes all blocks in toolbox and workspace.
* @param {Blockly.Style} style Style for blockly.
*/
Blockly.setStyle = function(style){
Blockly.setStyle = function(style) {
this.style_ = style;
var workspace = Blockly.getMainWorkspace();
var blocks = workspace.getAllBlocks();
@@ -697,9 +697,9 @@ Blockly.setStyle = function(style){
/**
* Gets the style for blockly.
* @return {Blockly.Style} style Style for blockly.
* @return {?Blockly.Style} style Style for blockly.
*/
Blockly.getStyle = function(){
Blockly.getStyle = function() {
return this.style_;
};

View File

@@ -44,7 +44,7 @@ Blockly.Style.prototype.getBlockStyle = function(blockStyleName) {
* @param{String} blockStyleName The name of the block style.
* @param{Blockly.BlockStyle} blockStyle The block style
*/
Blockly.Style.prototype.setBlockStyle = function(blockStyleName, blockStyle){
Blockly.Style.prototype.setBlockStyle = function(blockStyleName, blockStyle) {
var event = new Blockly.Events.Ui(null, 'blockStyleChanged',
this.blockStyles_[blockStyleName], blockStyle);
this.blockStyles_[blockStyleName] = blockStyle;