Stay organized with collections
Save and categorize content based on your preferences.
blockly > geras > ConstantProvider
geras.ConstantProvider class
An object that provides constants for rendering blocks in Geras mode.
Signature:
export declare class ConstantProvider extends BaseConstantProvider
Extends: BaseConstantProvider
Constructors
Constructor |
Modifiers |
Description |
(constructor)() |
|
Constructs a new instance of the ConstantProvider class |
Properties
Methods
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egeras.ConstantProvider\u003c/code\u003e class provides constants for rendering blocks in Geras mode in Blockly, extending the \u003ccode\u003eBaseConstantProvider\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003eDARK_PATH_OFFSET\u003c/code\u003e, \u003ccode\u003eFIELD_TEXT_BASELINE_CENTER\u003c/code\u003e, \u003ccode\u003eMAX_BOTTOM_WIDTH\u003c/code\u003e, and \u003ccode\u003eSTATEMENT_BOTTOM_SPACER\u003c/code\u003e for defining block appearance.\u003c/p\u003e\n"],["\u003cp\u003eA key feature is the \u003ccode\u003eMAX_BOTTOM_WIDTH\u003c/code\u003e property, which sets the maximum width of a bottom row following a statement input with inline inputs.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers a constructor for creating instances and a \u003ccode\u003egetCSS_\u003c/code\u003e method for potentially retrieving CSS styles related to the block rendering.\u003c/p\u003e\n"]]],["The `geras.ConstantProvider` class, extending `BaseConstantProvider`, supplies constants for rendering blocks in Geras mode. It has a constructor and defines properties such as `DARK_PATH_OFFSET`, `FIELD_TEXT_BASELINE_CENTER`, `MAX_BOTTOM_WIDTH` (specifying the maximum width of a bottom row with inline inputs), and `STATEMENT_BOTTOM_SPACER`. Additionally, it includes a `getCSS_` method. This class manages visual aspects of block rendering in the Geras rendering mode.\n"],null,[]]