mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Merge pull request #4608 from rachel-fenichel/renderer_requires
Renderer requires and requireTypes
This commit is contained in:
@@ -19,6 +19,9 @@ goog.provide('Blockly.blockRendering');
|
||||
goog.require('Blockly.registry');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.Renderer');
|
||||
goog.requireType('Blockly.Theme');
|
||||
|
||||
|
||||
/**
|
||||
* Whether or not the debugger is turned on.
|
||||
|
||||
@@ -21,7 +21,8 @@ goog.require('Blockly.utils.svgPaths');
|
||||
goog.require('Blockly.utils.userAgent');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.Debug');
|
||||
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
goog.requireType('Blockly.Theme');
|
||||
|
||||
/**
|
||||
* An object that provides constants for rendering blocks.
|
||||
|
||||
@@ -24,6 +24,10 @@ goog.require('Blockly.constants');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* An object that renders rectangles and dots for debugging rendering code.
|
||||
|
||||
@@ -22,6 +22,9 @@ goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
|
||||
|
||||
/**
|
||||
* An object that draws a block based on the given rendering information.
|
||||
|
||||
@@ -31,6 +31,11 @@ goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.constants');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.Renderer');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Input');
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
|
||||
@@ -19,6 +19,14 @@ goog.require('Blockly.Events.MarkerMove');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Connection');
|
||||
goog.requireType('Blockly.Field');
|
||||
goog.requireType('Blockly.Marker');
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
goog.requireType('Blockly.WorkspaceSvg');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a marker.
|
||||
|
||||
@@ -19,6 +19,9 @@ goog.require('Blockly.Theme');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
goog.requireType('Blockly.Block');
|
||||
goog.requireType('Blockly.Connection');
|
||||
|
||||
|
||||
/**
|
||||
* An object that handles creating and setting each of the SVG elements
|
||||
|
||||
@@ -13,16 +13,23 @@
|
||||
goog.provide('Blockly.blockRendering.Renderer');
|
||||
|
||||
goog.require('Blockly.blockRendering.ConstantProvider');
|
||||
goog.require('Blockly.blockRendering.MarkerSvg');
|
||||
goog.require('Blockly.blockRendering.Debug');
|
||||
goog.require('Blockly.blockRendering.Drawer');
|
||||
goog.require('Blockly.blockRendering.MarkerSvg');
|
||||
goog.require('Blockly.blockRendering.IPathObject');
|
||||
goog.require('Blockly.blockRendering.PathObject');
|
||||
goog.require('Blockly.blockRendering.RenderInfo');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.InsertionMarkerManager');
|
||||
goog.require('Blockly.IRegistrable');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.Debug');
|
||||
goog.requireType('Blockly.IRegistrable');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Connection');
|
||||
goog.requireType('Blockly.Marker');
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
goog.requireType('Blockly.Theme');
|
||||
goog.requireType('Blockly.utils.object');
|
||||
goog.requireType('Blockly.WorkspaceSvg');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@ goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
goog.requireType('Blockly.geras.PathObject');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,12 @@ goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.geras.ConstantProvider');
|
||||
goog.requireType('Blockly.geras.HighlightConstantProvider');
|
||||
goog.requireType('Blockly.geras.Renderer');
|
||||
goog.requireType('Blockly.geras.RenderInfo');
|
||||
|
||||
|
||||
/**
|
||||
* An object that adds highlights to a block based on the given rendering
|
||||
|
||||
@@ -16,6 +16,7 @@ goog.provide('Blockly.geras.RenderInfo');
|
||||
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.InRowSpacer');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
@@ -34,6 +35,10 @@ goog.require('Blockly.geras.InlineInput');
|
||||
goog.require('Blockly.geras.StatementInput');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.geras.Renderer');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.blockRendering.Field');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
|
||||
@@ -15,6 +15,11 @@ goog.provide('Blockly.geras.InlineInput');
|
||||
goog.provide('Blockly.geras.StatementInput');
|
||||
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.Input');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@ goog.provide('Blockly.geras.PathObject');
|
||||
goog.require('Blockly.blockRendering.PathObject');
|
||||
goog.require('Blockly.geras.ConstantProvider');
|
||||
goog.require('Blockly.Theme');
|
||||
goog.require('Blockly.utils.colour');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
@@ -21,6 +21,12 @@ goog.require('Blockly.geras.PathObject');
|
||||
goog.require('Blockly.geras.RenderInfo');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.RenderInfo');
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Theme');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The geras renderer.
|
||||
|
||||
@@ -15,6 +15,8 @@ goog.provide('Blockly.blockRendering.Measurable');
|
||||
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
|
||||
|
||||
/**
|
||||
* The base class to represent a part of a block that takes up space during
|
||||
|
||||
@@ -18,6 +18,8 @@ goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.RenderedConnection');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,9 @@ goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.Input');
|
||||
|
||||
|
||||
/**
|
||||
* The base class to represent an input that takes up space on a block
|
||||
|
||||
@@ -22,6 +22,11 @@ goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.Field');
|
||||
goog.requireType('Blockly.Icon');
|
||||
goog.requireType('Blockly.Input');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing information about the space an icon takes up during
|
||||
|
||||
@@ -24,6 +24,9 @@ goog.require('Blockly.blockRendering.PreviousConnection');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
|
||||
|
||||
/**
|
||||
* An object representing a single row on a rendered block and all of its
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
goog.provide('Blockly.blockRendering.Types');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.blockRendering.Measurable');
|
||||
goog.requireType('Blockly.blockRendering.Row');
|
||||
|
||||
|
||||
/**
|
||||
* Types of rendering elements.
|
||||
|
||||
@@ -17,6 +17,7 @@ goog.provide('Blockly.thrasos.RenderInfo');
|
||||
goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InRowSpacer');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
@@ -30,6 +31,10 @@ goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.Field');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.thrasos.Renderer');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
|
||||
@@ -17,6 +17,9 @@ goog.require('Blockly.blockRendering.Renderer');
|
||||
goog.require('Blockly.thrasos.RenderInfo');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
|
||||
|
||||
/**
|
||||
* The thrasos renderer.
|
||||
* @param {string} name The renderer name.
|
||||
|
||||
@@ -15,6 +15,7 @@ goog.provide('Blockly.zelos.ConstantProvider');
|
||||
|
||||
goog.require('Blockly.blockRendering.ConstantProvider');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.utils.colour');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
@@ -16,8 +16,11 @@ goog.require('Blockly.blockRendering.ConstantProvider');
|
||||
goog.require('Blockly.blockRendering.Drawer');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.utils.svgPaths');
|
||||
goog.require('Blockly.zelos.RenderInfo');
|
||||
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.blockRendering.Row');
|
||||
goog.requireType('Blockly.zelos.PathObject');
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ goog.require('Blockly.blockRendering.BottomRow');
|
||||
goog.require('Blockly.blockRendering.ExternalValueInput');
|
||||
goog.require('Blockly.blockRendering.InlineInput');
|
||||
goog.require('Blockly.blockRendering.InputRow');
|
||||
goog.require('Blockly.blockRendering.InRowSpacer');
|
||||
goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.NextConnection');
|
||||
goog.require('Blockly.blockRendering.OutputConnection');
|
||||
@@ -30,12 +31,19 @@ goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.FieldImage');
|
||||
goog.require('Blockly.FieldLabel');
|
||||
goog.require('Blockly.FieldTextInput');
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.zelos.BottomRow');
|
||||
goog.require('Blockly.zelos.RightConnectionShape');
|
||||
goog.require('Blockly.zelos.StatementInput');
|
||||
goog.require('Blockly.zelos.TopRow');
|
||||
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.zelos.ConstantProvider');
|
||||
goog.requireType('Blockly.zelos.Renderer');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing all sizing information needed to draw this block.
|
||||
|
||||
@@ -16,6 +16,12 @@ goog.require('Blockly.blockRendering.MarkerSvg');
|
||||
goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Connection');
|
||||
goog.requireType('Blockly.Marker');
|
||||
goog.requireType('Blockly.WorkspaceSvg');
|
||||
|
||||
|
||||
/**
|
||||
* Class to draw a marker.
|
||||
|
||||
@@ -15,6 +15,9 @@ goog.provide('Blockly.zelos.StatementInput');
|
||||
goog.require('Blockly.blockRendering.StatementInput');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
goog.requireType('Blockly.Input');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing information about the space a statement input takes up
|
||||
|
||||
@@ -16,6 +16,8 @@ goog.require('Blockly.blockRendering.Measurable');
|
||||
goog.require('Blockly.blockRendering.Types');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing information about the space a right connection shape
|
||||
|
||||
@@ -19,6 +19,8 @@ goog.require('Blockly.blockRendering.TopRow');
|
||||
goog.require('Blockly.blockRendering.SpacerRow');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
|
||||
|
||||
/**
|
||||
* An object containing information about what elements are in the top row of a
|
||||
|
||||
@@ -19,6 +19,8 @@ goog.require('Blockly.utils.dom');
|
||||
goog.require('Blockly.utils.object');
|
||||
goog.require('Blockly.utils.Svg');
|
||||
|
||||
goog.requireType('Blockly.Theme');
|
||||
|
||||
|
||||
/**
|
||||
* An object that handles creating and setting each of the SVG elements
|
||||
|
||||
@@ -23,6 +23,12 @@ goog.require('Blockly.zelos.PathObject');
|
||||
goog.require('Blockly.zelos.RenderInfo');
|
||||
goog.require('Blockly.zelos.MarkerSvg');
|
||||
|
||||
goog.requireType('Blockly.blockRendering.MarkerSvg');
|
||||
goog.requireType('Blockly.blockRendering.RenderInfo');
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.Marker');
|
||||
goog.requireType('Blockly.WorkspaceSvg');
|
||||
|
||||
|
||||
/**
|
||||
* The zelos renderer.
|
||||
|
||||
Reference in New Issue
Block a user