Implement number and string field specs (#230)

* Animate the font-size of text fields

* Allow WidgetDiv to hide immediately, no animation

And add calls to this where the div animation may become out of sync with the field itself.

* Fix CSS colour substitution to replace all

* Add box-shadow to text field

* Fix padding on blocklyHtmlInput

* Add utility for measuring text using canvas

* Grow the input textbox based on the text size

* Fix the text field width to a maximum depending on render mode

* Fix text input field height for scaling

* Position text input field based width

* Animate out width, height, margin of text input

* Fix scale of marginLeft and extra 1px

* Fix height, padding, font-weight on text input field

* Make input field text smaller on truncation per spec

* Re-apply change to Blockly.WidgetDiv.disposeAnimationTimer_

* Add comment to Blockly.Field.maxDisplayLength
This commit is contained in:
Tim Mickel 2016-04-15 16:44:30 -04:00
parent 1b560d7271
commit 33a71b112f
8 changed files with 152 additions and 19 deletions

View file

@ -39,5 +39,7 @@ Blockly.Colours = {
"scrollbarHover": '#BBBBBB',
"textField": "#FFFFFF",
"insertionMarker": "#949494",
"insertionMarkerOpacity": 0.6
"insertionMarkerOpacity": 0.6,
// CSS colours: support RGBA
"fieldShadow": "rgba(0,0,0,0.1)"
};