mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-01 16:51:10 -04:00
Vertical demo blocks
* Implement example text-based vertical blocks * Add vertical FIELD_TOP_PADDING (fix #249) * Make MAX_DISPLAY_LENGTH per horizontal/vertical Fixes #247 * Vertical dark mode and playground disclaimer * Remove generator reference from vertical demo
This commit is contained in:
parent
cef7a3893e
commit
f212b10870
9 changed files with 431 additions and 47 deletions
core
|
@ -50,6 +50,13 @@ Blockly.Field = function(text, opt_validator) {
|
|||
Blockly.BlockSvg.FIELD_HEIGHT);
|
||||
this.setValue(text);
|
||||
this.setValidator(opt_validator);
|
||||
|
||||
/**
|
||||
* Maximum characters of text to display before adding an ellipsis.
|
||||
* Same for strings and numbers.
|
||||
* @type {number}
|
||||
*/
|
||||
this.maxDisplayLength = Blockly.BlockSvg.MAX_DISPLAY_LENGTH;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -74,13 +81,6 @@ Blockly.Field.cacheReference_ = 0;
|
|||
*/
|
||||
Blockly.Field.prototype.name = undefined;
|
||||
|
||||
/**
|
||||
* Maximum characters of text to display before adding an ellipsis.
|
||||
* Same for strings and numbers.
|
||||
* @type {number}
|
||||
*/
|
||||
Blockly.Field.prototype.maxDisplayLength = 4;
|
||||
|
||||
/**
|
||||
* Visible text to display.
|
||||
* @type {string}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue