Neil Fraser
c8bea1ff3a
Remove return value from Field dropdownCreate_ ( #4915 )
...
These functions have side effects and set all kinds of private fields. It is misleading for them to return the top-level element, for the caller to assign to a private field.
2021-06-18 08:22:25 -07:00
Neil Fraser
dd0314bc0b
Normalize comments
2021-05-19 09:57:14 -07:00
Sam El-Husseini
f2f878db8c
Fix multiple strict require warnings ( #4793 )
2021-04-21 16:46:04 -07:00
Laura Harker
5ff76ae32d
Stop overriding @protected methods with @private ( #4760 )
...
An upcoming change to emit private properties in Google's internal version of
https://github.com/angular/clutz will otherwise break any
TypeScript depending on these types. This is because TypeScript errors
on overriding protected with private (Closure Compiler does not).
2021-04-06 11:05:41 -07:00
Rachel Fenichel
1d8c234d33
Update uses of bindEvent_, bindEventWithChecks_, and unbindEvent_. Add missing requires for Blockly.browserEvents.
2021-02-23 11:23:28 -08:00
Rachel Fenichel
54c4e8de39
Rename Blockly.eventHandling->Blockly.browserEvents and replace all Blockly.EventData annotations
2021-02-22 13:23:19 -08:00
Sam El-Husseini
db40e44b7c
Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg ( #4285 )
...
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Sam El-Husseini
0f3db47fa5
Use generics to derive SVG element type ( #4036 )
...
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -07:00
Monica Kozbial
4ac4332f5e
Update logic for field default values. ( #3953 )
...
* Update logic for field default values.
* Fix bugs
* Use contant for default value.
* Fix FieldColour
* Update field number tests.
* Update field angle test.
* Minor update.
* Update field checkbox test.
* Undo enabling logging
* Remove only.
* Update field colour test.
* Update invalid test cases for field colour
* Update field label tests
* Update field textinput test.
* Minor cleanup
* Make lint happy.
2020-06-12 15:18:28 -07:00
Sam El-Husseini
1052f7548b
Enable unusedPrivateMembers check ( #3924 )
...
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00
Neil Fraser
4e2f8e6e02
Use SPDX licences.
...
This is a followup to #3127 .
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Monica Kozbial
e2b510662c
Fixing typo on "programmatically". ( #3654 )
2020-01-24 15:10:22 -08:00
Sam El-Husseini
20e55b67d7
Fix bug with dropdown menu propagating the opening click event to a menu item ( #3570 )
...
* Prevent dropdown field menu from propagating a click event onto a menu item when the dropdown appears above the field
2020-01-09 18:08:29 -08:00
Beka Westberg
dad8738e75
Cleaned up unbindEvent_ calls ( #3429 )
...
* Cleaned up unbindEvent_ calls.
2019-11-12 10:14:31 -08:00
Rachel Fenichel
5ef08fc0d4
Switch to using the style object in the path object.
2019-10-30 14:47:23 -07:00
Rachel Fenichel
ca1e49bf8e
Fields now go through blockSvg for colours.
2019-10-30 14:43:42 -07:00
Rachel Fenichel
6f520335ea
Cleanup of colouring code, and move it into path_object.
2019-10-30 14:42:13 -07:00
Rachel Fenichel
85c4db5a10
First pass at colourers
2019-10-30 14:42:13 -07:00
Sam El-Husseini
986e965be8
Private/protected visibility cleanup ( #3263 )
...
* Fix a number of private visibility issues
2019-10-16 11:48:09 -05:00
Sam El-Husseini
2224bb2a4e
More field dispose ( #3201 )
...
* Dispose of element references in fields.
* Fewer warnings
2019-10-15 17:56:53 -05:00
RoboErikG
d09b85dc9e
Cleanup for #3179 ( #3229 )
2019-10-14 09:57:38 -07:00
Beka Westberg
f4f9a67903
Fixed field editor disposal ( #3109 )
...
* Fixed field editor disposal.
2019-10-08 16:48:31 -07:00
RoboErikG
663809297d
Set correct defaults for Fields ( #3179 )
...
null was being converted to 0 by Number() when it should cause the
default value to be set instead. This updates FieldNumber and
FieldAngle to handle nulls correctly. Also update jsdoc.
Fixes #3177
2019-10-07 11:38:32 -07:00
Sam El-Husseini
d0772ad496
Fix compiler warnings related to fields. ( #3144 )
...
* Fix compiler warnings related to fields.
2019-10-03 15:58:46 -07:00
Rachel Fenichel
79bedca5a7
Element -> SVGElement ( #3140 )
...
* Use SVGElement instead of Element for the results of createSvgElement
* More SVGElement annotations.
2019-10-02 16:12:31 -07:00
Neil Fraser
b46a4fe286
Bring our license format up to date ( #3127 )
...
* Google changed from an Inc to an LLC.
This happened back in 2017 but we didn’t notice. Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.
* Remove project description/titles from licenses
This is no longer part of Google’s header requirements. Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).
* License no longer requires URL.
* Fix license regexps.
2019-10-02 14:46:56 -07:00
Sam El-Husseini
35424f2484
Angle field touch fixes ( #3079 )
...
* Fix touch support for angle fields
2019-09-26 17:11:03 -07:00
Sam El-Husseini
a57c7ffb13
Clean up fields by passing the right type in fromJson ( #3095 )
2019-09-26 12:03:17 -07:00
Neil Fraser
75cf614104
Break CSS into modules. ( #3084 )
...
* Break CSS into modules.
Drops the compile test by 3 KB.
Remove obsolete .blocklyDraggable class stub (it used to be dynamically changed).
Remove unused menuseparator CSS.
2019-09-25 18:01:19 -07:00
Beka Westberg
1c3db256fa
Added angle field config ( #3038 )
...
* Added angle field configuration.
2019-09-19 16:15:20 -07:00
Sam El-Husseini
f3f3329355
Fix configure method ( #2915 )
...
* Fix configure method.
2019-09-12 17:01:03 -07:00
Sam El-Husseini
8ab51c8639
Remove closure base file dependency ( #2976 )
...
* Trim down closure's base dependency even further by removing the dependency on closure's base file.
2019-09-11 17:30:51 -07:00
Sam El-Husseini
dd9257e1b0
Field Text transformation methods ( #2930 )
...
* Add field text transform methods for converting from text to value and vice versa.
2019-08-30 17:00:31 -07:00
Sam El-Husseini
f23b659898
Remove this.text_ ( #2910 )
...
* Remove this.text_ and have every field handle its own properties.
2019-08-26 10:56:36 -07:00
Sam El-Husseini
1d4cfb8dfa
Field angle keyboard navigation ( #2853 )
...
Field angle keyboard accessibility
2019-08-20 18:25:15 -07:00
Beka Westberg
0872d022e1
Changed utils.fields -> fieldRegistry. Also removed useless tooltip requires.
2019-08-16 09:57:28 -07:00
Beka Westberg
cdc90f4059
Refactored field utilities.
2019-08-16 09:57:27 -07:00
Neil Fraser
11f6c5a631
Fix angle picker when 'Infinity' is typed in.
...
Previously 'NaN' would be generated, which is not a legal value.
2019-08-01 11:36:58 -07:00
Neil Fraser
45e5fb4157
More JSDoc and lint corrections
2019-07-30 17:00:40 -07:00
Sam El-Husseini
c1b49a1da7
Fix some jsdoc types ( #2701 )
...
* Fix JSDoc regarding type inconsistencies. Make image field src required and update image field tests.
2019-07-25 12:24:36 -07:00
Beka Westberg
efdfec6d8a
Fixed last rebase error.
2019-06-11 14:29:19 -07:00
Beka Westberg
4b0397de17
Cleaned up utils renamings. Readded widget div hide in field angle.
2019-06-11 13:48:01 -07:00
Beka Westberg
392119680e
Fixed misc PR comments.
2019-06-11 13:32:10 -07:00
Beka Westberg
153817eaee
Removed angle field WidgetDiv.hide call.
2019-06-11 13:32:10 -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
98a98bcce6
Add Blockly.utils.dom.XLINK_NS
...
And fix provide/require mixup.
2019-06-07 10:32:57 -07:00
Neil Fraser
848d3a3509
Move setCssTransform & createSvgElement to dom.
...
Also move SVG_NS and HTML_NS properties.
2019-06-07 10:32:57 -07:00
Neil Fraser
3dfac9a2ba
Alphabetize require statements.
...
Search and replace for userAgent didn’t take into account alphabetic ordering.
Also some line wraping.
2019-06-07 10:32:57 -07:00
Neil Fraser
566f182fa8
Move Blockly.userAgent to Blockly.utils.userAgent
2019-06-07 10:32:57 -07:00