mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
refactor: convert blocksvg and block to ES6 classes (#5952)
* refact: move super call to top of block svg * refact: run conversion script on block svg and block * fix: make debug build happy * fix: tests * style: format * fix: cleanup from rebase * fix: use new.target instead of a new parameter * fix: add more overridden casted methods to BlockSvg * style: fix typos * style: move override tags to the end of JSDoc * fix: cleanup from rebase
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
goog.module('Blockly.blockRendering.IPathObject');
|
||||
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {ConstantProvider} = goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -78,7 +78,7 @@ IPathObject.prototype.setPath;
|
||||
/**
|
||||
* Apply the stored colours to the block's path, taking into account whether
|
||||
* the paths belong to a shadow block.
|
||||
* @param {!Block} block The source block.
|
||||
* @param {!BlockSvg} block The source block.
|
||||
* @package
|
||||
*/
|
||||
IPathObject.prototype.applyColour;
|
||||
|
||||
@@ -18,7 +18,7 @@ goog.module('Blockly.blockRendering.PathObject');
|
||||
|
||||
const dom = goog.require('Blockly.utils.dom');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Block} = goog.requireType('Blockly.Block');
|
||||
const {BlockSvg} = goog.requireType('Blockly.BlockSvg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Connection} = goog.requireType('Blockly.Connection');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -144,7 +144,7 @@ class PathObject {
|
||||
/**
|
||||
* Apply the stored colours to the block's path, taking into account whether
|
||||
* the paths belong to a shadow block.
|
||||
* @param {!Block} block The source block.
|
||||
* @param {!BlockSvg} block The source block.
|
||||
* @package
|
||||
*/
|
||||
applyColour(block) {
|
||||
|
||||
Reference in New Issue
Block a user