Fix annotation and remove redundant 'Blockly.'

This commit is contained in:
Rachel Fenichel
2020-07-16 14:08:27 -06:00
parent 2f5663b1ec
commit 6990ac5efd
3 changed files with 13 additions and 3 deletions

View File

@@ -1244,7 +1244,7 @@ Blockly.Block.prototype.getOutputShape = function() {
*/
Blockly.Block.prototype.setDisabled = function(disabled) {
Blockly.utils.deprecation.warn(
'Blockly.Block.prototype.setDisabled',
'Block.prototype.setDisabled',
'May 2019',
'May 2020',
'Blockly.Block.prototype.setEnabled');

View File

@@ -240,6 +240,11 @@ Blockly.BlockSvg.prototype.getColourTertiary = function() {
* @deprecated Use style.colourSecondary. (2020 January 21)
*/
Blockly.BlockSvg.prototype.getColourShadow = function() {
Blockly.utils.deprecation.warn(
'BlockSvg.prototype.getColourShadow',
'January 2020',
'January 2021',
'style.colourSecondary');
return this.getColourSecondary();
};
@@ -253,6 +258,11 @@ Blockly.BlockSvg.prototype.getColourShadow = function() {
* @deprecated Use style.colourTertiary. (2020 January 21)
*/
Blockly.BlockSvg.prototype.getColourBorder = function() {
Blockly.utils.deprecation.warn(
'BlockSvg.prototype.getColourBorder',
'January 2020',
'January 2021',
'style.colourTertiary');
var colourTertiary = this.getColourTertiary();
return {
colourBorder: colourTertiary,
@@ -1122,7 +1132,7 @@ Blockly.BlockSvg.prototype.setMutator = function(mutator) {
*/
Blockly.BlockSvg.prototype.setDisabled = function(disabled) {
Blockly.utils.deprecation.warn(
'Blockly.BlockSvg.prototype.setDisabled',
'BlockSvg.prototype.setDisabled',
'May 2019',
'May 2020',
'Blockly.BlockSvg.prototype.setEnabled');

View File

@@ -20,7 +20,7 @@ goog.provide('Blockly.utils.deprecation');
* Prefer 'month yyyy' or 'quarter yyyy' format.
* @param {string} deletionDate The date when the function will be deleted, in
* the same format as the deprecation date.
* @param {?string} opt_use The name of a function to use instead, if any.
* @param {string=} opt_use The name of a function to use instead, if any.
* @package
*/
Blockly.utils.deprecation.warn = function(