Neil Fraser
6aedfab4d1
Misc JSDoc fixes. ( #2747 )
2019-07-30 16:28:48 -07:00
Sam El-Husseini
57868e7e83
Remove all calls to goog.math ( #2739 )
...
* Replace calls to goog.math.Size and goog.math.Coordinate with Blockly equivelants
2019-07-30 11:22:08 -07:00
Rachel Fenichel
b5c75ff24d
Merge pull request #2651 from rachel-fenichel/field_corrected_sizes
...
Add getCorrectedSize functions to fields
2019-07-22 16:45:13 -07:00
Rachel Fenichel
fc4372dbc2
Add TODOs with github issue number
2019-07-22 16:29:44 -07:00
Beka Westberg
2464e3af46
Added setting a colour fields options through JSON. ( #2655 )
2019-07-18 12:23:31 -07:00
Rachel Fenichel
f469a388ed
Add getCorrectedSize functions to fields
2019-07-17 11:00:20 -07:00
Beka Westberg
bf6d621c63
Added colour and date editor auto close on selection.
2019-06-11 16:22:24 -07:00
Beka Westberg
303115953e
Moved to #2125 disposal. Cleaned up some doc.
2019-06-11 13:32:09 -07:00
Beka Westberg
0122f36450
Fixed field disposal, and reorganized editor creation.
2019-06-11 13:30:50 -07:00
Neil Fraser
aca1a43ec8
Fix regular expressions.
...
1) Simplifications.
2) Enable toolbox category colours to be specified using the full range of CSS formats (not just hue or #rrggbb).
3) Fix bug where `Blockly.utils.checkMessageReferences('%{BKY_today} %{BKY_xxx}')` returns true.
2019-06-10 11:03:22 -07:00
Neil Fraser
cdaded4296
Remove goog.color.parse
2019-06-05 16:41:04 -07:00
Neil Fraser
4f20264128
Remove orphaned regexp.
2019-06-05 16:41:04 -07:00
Beka Westberg
54eb726063
Removed extra DropDownDiv calls. ( #2532 )
2019-06-03 11:02:05 -07:00
Beka Westberg
f0d6fbd192
Reorganized field view initialization.
2019-05-31 10:38:18 -07:00
Beka Westberg
e1e746b845
Fixed how fields handle size.
2019-05-31 07:32:43 -07:00
Beka Westberg
06c6d83355
Changed colour field class validator to accept all documented values.
2019-05-24 16:14:49 -07:00
Neil Fraser
9f528922a7
Fix some dependencies
2019-05-24 15:45:05 -07:00
Beka Westberg
f16c9c0beb
Refactored field validation.
2019-05-24 14:23:42 -07:00
Beka Westberg
acd96aa2c5
Added Field Value Tests ( #2459 )
...
* Added field value tests.
* Fixed field image src param.
* Fixed falsy values with label fields.
* Fixed falsy values with text input fields.
* Fixed some angle field tests.
* Fixed other text input when editing tests.
* Fixed colour tests.
* Cleaned up some number and variable field tests.
* Added angle field > 360 degrees tests.
* Fixed variable validator tests.
* Split setValue tests into sub-suites.
* Fixed angle >360 tests
* Changed var declarations to property declarations.
2019-05-17 15:19:14 -07:00
Neil Fraser
25bc3e0268
Fix require statements.
...
Also throw error instead of string.
And stop using goog.asserts.
2019-05-17 15:04:39 -07:00
Neil Fraser
28ad3a9bd3
Blockly.utils.userAgent moved to Blockly.userAgent
2019-05-10 16:56:26 -07:00
Beka Westberg
354d402c49
Refactored field.init into field.initView and field.initModel
2019-05-03 07:12:46 -07:00
Beka Westberg
e8573bc0db
Added isSerializable function and SERIALIZABLE property to fields.
2019-04-21 08:28:37 -07:00
Beka Westberg
0617cc7fea
Added isDirty_ property to fields.
2019-04-15 16:37:11 -07:00
Neil Fraser
e9de083361
Fix @return JSDocs.
2019-03-29 15:24:37 -07:00
Rachel Fenichel
e20a7ef3c2
Use constants for dropdown div colours in the colour field
2019-03-01 12:38:37 -08:00
Rachel Fenichel
0b1bd78674
Clarify some dropdown rendering code
2019-02-28 15:11:57 -08:00
Rachel Fenichel
4f3bb673ef
Add require and rebuild for travis
2019-02-26 11:05:27 -08:00
Rachel Fenichel
2c624c5144
Use dropdowndiv for field colour but not field dropdown
2019-02-26 11:03:28 -08:00
Rachel Fenichel
763a06a7ac
Use dropdown div for colour field
2019-02-21 13:41:45 -08:00
Neil Fraser
cb3ea2f56e
Remove goog.ui.ColorPicker ( #2020 )
...
Adds the ability to set the tooltip titles for each colour.
Note that Closure’s colour picker in Blockly used to have keyboard controls (as of > 3 years ago); but no longer seems to. This replacement does not currently have keyboard controls either.
2018-08-24 12:14:42 -07:00
Neil Fraser
0583bee502
Correct requires for goog.dom
2018-07-11 12:20:02 -07:00
Rachel Fenichel
615c403b44
Use @nocompress annotation to fix advanced compilation.
2018-03-01 12:35:55 -08:00
Mark Gibson
54f0e06e21
Customising field types using a register of fields #1584 ( #1594 )
...
Implement #1584 - Fields now registered by their JSON type name, allowing new custom fields and overriding of the standard fields. Replaces the manual switch statement for loading fields from JSON block definitions.
2018-02-14 10:14:59 -08:00
Mark Gibson
2308ae8c22
Remove underscore from fromJson_
2018-02-07 18:18:35 +00:00
Mark Gibson
d40ef474ae
See issue #1486 - adds fromJson_ fn to every Blockly.Field, removing Block.newField*FromJson_ helpers
2018-02-07 12:22:26 +00:00
Rachel Fenichel
acd3a00f4a
Unify code for positioning the widget div ( #1334 )
...
* New widget div functions, used in context menu code
* Make all widget div positioning functions use the same argument order
* Use new widget div functions for fields
* share code for measuring menu size
* Get rid of positionMenu
* Update copyright date
* Rebuild blockly_uncompressed because there's a new require in town
2017-09-22 16:07:32 -07:00
Rachel Fenichel
8050ce929c
Code cleanup: widget creation ( #1332 )
2017-09-20 16:38:13 -07:00
marisaleung
aff9c4867c
Correctly named block events called.
2017-06-08 15:44:43 -07:00
Rachel Fenichel
20cf6abb5f
End event groups when you finish editing a field
2017-01-03 14:09:41 -08:00
Neil Fraser
555eac8b7f
Simplify field validator chaining.
2016-06-29 17:44:12 -07:00
miguel76
1e3297ba0a
Fix #326
...
Parameter block is removed from init prototype of fields and its usage
is replaced by this.sourceBlock_
2016-04-09 12:01:38 -03:00
Neil Fraser
b567d6b0d7
Allow shadow blocks to be edited.
2016-02-26 00:22:31 -08:00
Neil Fraser
63c112932b
Rename Field.setChangeHandler to Field.setValidator
2016-02-10 14:33:13 -08:00
Neil Fraser
c429949a4e
Add Create, Delete, and Change events.
...
Not counting change for mutators.
2016-01-20 19:11:03 -08:00
Neil Fraser
36fe3994c9
Misc cleanup.
2016-01-15 15:36:06 -08:00
Neil Fraser
4253de041a
Remove old realtime.
2016-01-08 13:03:22 -08:00
Neil Fraser
9b26d0d260
De-shadow blocks that have been edited.
2015-10-14 18:20:53 -07:00
Neil Fraser
3f8e586fe8
Use prototypes for primitive properties.
2015-09-12 19:31:22 -07:00
Neil Fraser
5b7fec7092
Add zooming feature.
...
By carloslfu.
2015-08-19 17:21:05 -07:00