mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Add a function for initializing rendering
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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().
|
||||
|
||||
Reference in New Issue
Block a user