from getting selected. Use e.preventDefault instead of adding and removing
classes on mousedown and mouseup. This keeps the browser from having to
potentially recacluate style on mousedown and mouseup events.
These were intended for the htmlInput, not the SVG blocklyText. Adding these in was causing the blocklyText element to get selected sometimes in webkit browsers.
* Implement basic field_number type
* Add whole number and positive number
* Remove bad arguments for showEditor_
* Basic implementation and styling of num-pad
* Remove virtual keyboards; add selection and read-only
* Add editing for the number pad
* Add backspace button to number pad
* Fix text padding for font-weight and extra magic
* Don't show decimal point for integers
* Re-update default WeDo numbers
* Refactor and improve documentation of field_number
* Update all assets from Carl
* Update when-broadcast-received and dropdown sizes
* Update icon menu sizing
* Update padding on drop-down div
* Update WeDo and event blocks; defaults
* Update multi_playground and vertical_playground
* Recompile with CSS updates
* Updating default icon reference for wedo_motorspeed
* Icon menu and drop-down stubs
* Recompile 4/15
* Fix stubs to draw shadow block for drop-down
* Fix rendering of shadow for icon menu
* Add arrow to dropdown button
* Add drop-down buttons to rest of examples
* Implementation of drop-down div including positioning
* Drop-downs take colours from the blocks
* Fix scaled secondary position of drop-downs
* Fix arrow positioning for RTL
* Use SVG parentNode for sizing dropdown
* Use transform for drop-down positioning
* Add basic DropDownDiv hide
* Add animation-in to dropdown
* More subtle drop-down animation and shadow
* Add icon menu example
* Use options style of Blockly FieldImage for drop-down
* Add default value for iconmenu
* Add example hover, active states for iconmenu buttons
* Update dropdown_icon example
* Implement icon-menu value handling and default value
* Add updating the parent block image field to dropdown
* Drop-down animates out; add hooks to hide for various Blockly happenings
* Add pointer cursor for drop-down icons
* Improve documentation for drop-downs and minor refactor
* Factor out getSrcForValue in iconmenu
* Blocks take on the icon of their icon-menu
* Add basic accessibility properties, similar to closure
* Remove extra drop-down example; update playgrounds
* Remove unnecessary colour overrides
* Add onHide, colour changing, fix references in dropdowndiv
* Flip arrow when the drop-down is rendered above
* Hide the icon menu drop-down on second tap of button
* Add preventDefault to button ontouchstart
* Updates to drop-down from Carl
* Add icon-menu placeholders and a crazy demo
* Fix naming to normalize (drop-down, DropDown)
* Add license header
* 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
* Add and render opacity of blocks
* Add insertion marker colour and opacity
* Add goog.require for Colours in block.js
* Add color of text field during editing
* Add colour overriding upon injection
* Add colours to CSS at run-time injection
* Expand colour variables to include toolbox, flyout, scrollbars
* Example of dark mode in horizontal_playground
* Fix loop style for colours
css to mark text as unselectable instead. I can't prove this is
significantly faster with numbers since the call to setup the time out
costs ~.1ms and the call when the timer fires is ~.05. This happens on almost
every mouse event though. Plus, it seems to remove a flicker of highlighting when
frames are skipped and keeps scrolling via the scrollbar from highlighting.
-Convert most constants in the code to use multiplications of GRID_UNIT (4px). This lets us be consistent with Carl's specs and helps explain the numbers a little better.
-Implement notches using cubic curves instead of arcs. This version matches the spec pretty much exactly. As part of this, remove NOTCH_BASE_HEIGHT which is no longer relevant.
-Slight simplification of renderCompute_ (which calculates metrics).
-Fixed SEP_SPACE_X and SEP_SPACE_Y to be the correct number of grid units. Our blocks before were slightly too small, now they are the right size.
-Implement the correct corner radius, hat/end hat radius.
-Add fixed ICON_WIDTH and ICON_HEIGHT, i.e., always size the icons to 40x40px as according to the spec.
-Add fixed STATEMENT_BLOCK_SPACE to represent the size of the bar above forever/repeat/pants blocks. Previously the code was assuming this was SEP_SPACE_Y, when in fact the spec has it as larger (4 units).
-Add accurate MIN_BLOCK_X and MIN_BLOCK_Y for simpler calculation of minimum bay size.
-Remove some unused SVG paths (INNER_TOP_LEFT_CORNER, INNER_BOTTOM_LEFT_CORNER).
-Remove extra code in getHeightWidth which caused a bug in rendering forever-in-repeat.
-Fix stroke width around the blocks to be 1px, according to spec.
I've checked that everything lines up with Carl's spec images at 8x zoom.
This should implement #69, #70, #71, #72, #74, and #75 (not 73 as we haven't done that input yet).