fix: dedeprecate render functions (#7359)

This commit is contained in:
Beka Westberg
2023-08-08 10:06:03 -07:00
committed by GitHub
parent 826510f242
commit 0ac86c7e68
2 changed files with 0 additions and 11 deletions

View File

@@ -1548,13 +1548,8 @@ export class BlockSvg
/**
* Immediately lays out and reflows a block based on its contents and
* settings.
*
* @deprecated Renders are triggered automatically when the block is modified
* (e.g. fields are modified or inputs are added). Any calls to render()
* are no longer necessary. To be removed in v11.
*/
render() {
deprecation.warn('Blockly.BlockSvg.prototype.render', 'v10', 'v11');
this.queueRender();
renderManagement.triggerQueuedRenders();
}

View File

@@ -78,7 +78,6 @@ import * as Xml from './xml.js';
import {ZoomControls} from './zoom_controls.js';
import {ContextMenuOption} from './contextmenu_registry.js';
import * as renderManagement from './render_management.js';
import * as deprecation from './utils/deprecation.js';
/** Margin around the top/bottom/left/right after a zoomToFit call. */
const ZOOM_TO_FIT_MARGIN = 20;
@@ -1232,13 +1231,8 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
/**
* Render all blocks in workspace.
*
* @deprecated Renders are triggered automatically when the block is modified
* (e.g. fields are modified or inputs are added). Any calls to render()
* are no longer necessary. To be removed in v11.
*/
render() {
deprecation.warn('Blockly.WorkspaceSvg.prototype.render', 'v10', 'v11');
// Generate list of all blocks.
const blocks = this.getAllBlocks(false);
// Render each block.