mirror of
https://github.com/google/blockly.git
synced 2026-03-10 15:20:16 +01:00
fix: dedeprecate render functions (#7359)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user