Vertical demo blocks

* Implement example text-based vertical blocks

* Add vertical FIELD_TOP_PADDING (fix )

* Make MAX_DISPLAY_LENGTH per horizontal/vertical

Fixes 

* Vertical dark mode and playground disclaimer

* Remove generator reference from vertical demo
This commit is contained in:
Tim Mickel 2016-05-05 16:13:43 -04:00
parent cef7a3893e
commit f212b10870
9 changed files with 431 additions and 47 deletions

View file

@ -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}