Commit graph

22 commits

Author SHA1 Message Date
TheBrokenRail
134983f0fe Add Negative Key To Number Pad ()
* Add Negative Key To Number Pad

* Fix Positioning

* Rearrangement

* Fix?

* Fix

* Unneded Vars

* Design Changes
2016-11-12 11:36:20 -05:00
Rachel Fenichel
915907da16 clear touch identifier after num pad touch. 2016-10-19 13:40:45 -07:00
Rachel Fenichel
3bcea6b6fe cleanup and documentation 2016-10-19 13:25:21 -07:00
Tim Mickel
d65c274652 Text+drop-downs and number+drop-downs ()
* Don't force text-centering around FIELD_WIDTH if arrow present

* Add dark arrow asset

* Refactor FieldNumber restrictor generator to be static

* Allow disabling of FieldDropDown colour changing

* Add FieldTextDropDown and FieldNumberDropDown

* Add number drop-downs to list blocks

* Add docs

* Update `setArgType` -> `addArgType`

* Ensure arrow only created once

* Update list index min

* Refactor shared components of num restriction

* Line breaks

* Clear touch identifier

* Clear touch identifier when text drop-down closed

* Inheritance simplification
2016-10-05 17:14:33 -04:00
Airhogs777
3bafc2e2fb Switch from Replacing argType to Appending To It ()
* switch from replacing argType to appending to it

* switch argType to array, rename function to addArgType
2016-10-05 13:28:44 -04:00
Airhogs777
bac07dc65a Add attribute for argument type (take 2) ()
* a more robust way to add an attribute to arguments

* always run superclass constructor before setting argtype
2016-10-02 13:36:32 -04:00
Rachel Fenichel
4b5d4d4c26 Merge branch 'feature/variable_management' of https://github.com/google/blockly into feature/variable_management 2016-08-12 15:52:48 -07:00
Rodrigo Queiro
729bd588f4 Use correct field name - fixes () 2016-08-10 11:35:40 -04:00
Neil Fraser
5c2c4d8400 Refactor validators to survive aggressive Closure compression. 2016-07-15 20:59:20 -07:00
Neil Fraser
8c48436c8f Fix validation on number field. 2016-07-15 20:06:01 -07:00
Neil Fraser
efc2ca3d82 Add field_number to Block Factory. 2016-07-10 22:54:57 -07:00
Tim Mickel
5be060e9c7 Base FieldTextInput radius on output shape, not field type. () 2016-07-06 15:56:45 -04:00
Neil Fraser
555eac8b7f Simplify field validator chaining. 2016-06-29 17:44:12 -07:00
Tim Mickel
2fa746d408 Alternate version of with min/max/precision ()
* Add textinput restrictor and FieldNumber use

* Update FieldNumber to remove validator and add appropriate restrictor

* Update blocks for new restrictors

* Remove restriction on FIELD_WIDTH_MAX_EDIT

* Remove extra console.log

* Version of FieldNumber that brings back min/max/precision

* opt_validator order to match Blockly

* Math.floor(precision) == precision

* Fixing JSDoc

* Invert decimalAllowed_

* Reverse opt_validator positioning per Neil

* Don't allow typing 'e', per design meeting

* Update for agreed-upon API

* Allow NaN constraints per agreement

* Remove optional parameters from math.js blocks

* Recompile 2, June 23

* Correct JSDoc for optionals
2016-06-23 12:44:01 -04:00
Neil Fraser
0be0cc89c7 Second version of FieldNumber API. 2016-06-22 15:07:07 -07:00
Neil Fraser
732e9b0659 Start using field_number. 2016-06-21 04:10:32 -07:00
Rodrigo Queiro
c36a615f07 Add validation to the numpad ()
This works the same way as upstream - if you close the editor with an
invalid (red-highlighted) input, the editor reverts to the original
input.
2016-06-09 11:34:27 -04:00
Rodrigo Queiro
8dfb3d8141 Use bindEvent_ for dropdown buttons ()
This matches the style of the rest of Blockly, and means that the
dropdowns can be tested with Chrome's Device Mode, which was not
possible before due to this bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=133915

This also adds listeners for mousedown/mouseup - this should be better
on PCs with touchscreens (), although we'll need a further change to
open the numpad on touch events.
2016-06-09 11:33:09 -04:00
Tim Mickel
2b092352fe Slight refactor of field radius determination () 2016-05-23 16:21:31 -04:00
Rachel Fenichel
9a1f98b703 use correct class name 2016-05-05 12:31:22 -07:00
Rachel Fenichel
d89d8a2113 Add lightweight field_number 2016-05-04 13:30:18 -07:00
Tim Mickel
50ff6e4654 Implement field_number stub and num-pad on mobile ()
* 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
2016-04-26 21:32:29 -04:00