Add a function for initializing rendering

This commit is contained in:
Rachel Fenichel
2019-08-23 10:49:13 -07:00
parent 7434bae9d0
commit 121840bedf
2 changed files with 10 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
goog.provide('Blockly.inject');
goog.require('Blockly.BlockDragSurfaceSvg');
goog.require('Blockly.blockRendering');
goog.require('Blockly.Component');
goog.require('Blockly.Css');
goog.require('Blockly.DropDownDiv');
@@ -70,6 +71,7 @@ Blockly.inject = function(container, opt_options) {
var blockDragSurface = new Blockly.BlockDragSurfaceSvg(subContainer);
var workspaceDragSurface = new Blockly.WorkspaceDragSurfaceSvg(subContainer);
Blockly.blockRendering.init();
var workspace = Blockly.createMainWorkspace_(svg, options, blockDragSurface,
workspaceDragSurface);
Blockly.setTheme(options.theme);

View File

@@ -40,6 +40,14 @@ goog.require('Blockly.geras.RenderInfo');
goog.require('Blockly.thrasos.RenderInfo');
goog.require('Blockly.zelos.RenderInfo');
/**
* Initialize anything needed for rendering (constants, etc).
* @package
*/
Blockly.blockRendering.init = function() {
// Currently a no-op.
};
/**
* Render the given block, using the new rendering.
* Developers should not call this directly. Instead, call block.render().