Rachel Fenichel
0951b5e613
Update eslintrc for eslint v7, and resolve new lint errors
2020-08-10 15:10:48 -07:00
Eric Anderson
2b8208b1e2
Perf: Move multiline xml text encoding out of domToText ( #4046 )
...
* Move multiline xml text encoding out of domToText
2020-07-14 16:32:12 -07:00
Sam El-Husseini
c9563c1d24
Revert "Add programmatically setting shadows ( #3902 )"
...
This reverts commit 3aa1963be8 .
2020-06-12 08:54:04 -07:00
Beka Westberg
3aa1963be8
Add programmatically setting shadows ( #3902 )
...
* Add programmatically setting shadows
2020-05-21 11:44:08 -07:00
Beka Westberg
44ba0226c9
Add ignoring insertion markers in xml gen ( #3883 )
...
* Add ignoring insertion markers in xml gen
2020-05-14 17:05:43 -07:00
Sam El-Husseini
493c89869e
Rename dom Node enum ( #3824 )
...
* Rename Node enum to NodeType to avoid conflict with type Node
2020-04-15 15:54:36 -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
Sam El-Husseini
4a94dc8a85
Unpack self-closing tags when converting domToText ( #3665 )
...
* Unpack self-closing tags when converting domToText
2020-01-27 15:32:12 -08:00
Sam El-Husseini
671162b79a
Fix RTL appendDomToWorkspace positioning. ( #3601 )
...
* Fix RTL appendDomToWorkspace positioning.
2020-01-16 13:43:41 -08:00
Sam El-Husseini
6c6296d74a
Use setAttribute for setting the id instead of block.id as IE doesn't serialize the id otherwise. ( #3604 )
2020-01-16 13:33:24 -08:00
Rachel Fenichel
04ddb90680
Delete two leftover constants in block_svg.
2019-11-06 14:02:13 -08:00
Neil Fraser
123f436e04
Add parens around inline assignments ( #3381 )
2019-10-31 15:17:35 -07:00
Beka Westberg
c32c835088
Fixed programmatically added connections not being added to the connection db ( #3318 )
...
* Fixed programmatically added connections not getting added to the connection db.
2019-10-29 15:31:40 -07:00
Sam El-Husseini
36d7e4ff8c
Suppress workspace comment module not included while Workspace comments are not bundled in. ( #3303 )
2019-10-22 08:49:17 -04:00
Sam El-Husseini
19018a5e8e
Fix compiler warnings related to XML ( #3277 )
...
* Fix 5 warnings.
2019-10-17 17:58:15 -05:00
Rachel Fenichel
35e894af13
Fix #1714
2019-10-16 11:53:08 -06:00
Rachel Fenichel
608ce7b93c
Merge pull request #3133 from BeksOmega/fixes/ConnectionTracking
...
Connection Tracking Pt 3: Changed connections to use 'tracked_' property
2019-10-07 11:05:10 -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
1236660efd
Actually make WS comments optional ( #3130 )
...
* Remove last reference to ws comments since its an optional module
* Also remove from workspace
2019-10-02 11:41:51 -07:00
Beka Westberg
df5b5766c1
General cleanup.
2019-10-01 19:22:19 -07:00
Beka Westberg
08720929d3
Changed setConnectionsHidden to waitToTrackConnections and startTrackingConnections.
2019-10-01 19:00:53 -07:00
Neil Fraser
a2e6cfffcc
Block comments from XML not fatal
...
…if Blockly.Comment was not compiled in.
2019-09-27 11:46:23 -07:00
Sam El-Husseini
fc2c730e44
Make workspace comments an optional module, remove from this release. ( #3115 )
2019-09-27 11:15:11 -07:00
Neil Fraser
a03660243e
Code cleanup, drop some CSS.
...
Random improvements to require statements.
Removal of some obviously dead CSS.
.blocklyDropDownDiv no longer supresses text selection (see comment in PR).
This PR drops the compiled size by 4 KB, which is larger than I was expecting.
2019-09-25 10:34:34 -07:00
Beka Westberg
9e5df6216a
Fixed comment ownership. ( #2923 )
...
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it.
* Reorganized the setVisible function.
* Changed how xml.js serializes and deserializes comments.
2019-09-20 13:16:07 -07:00
Rachel Fenichel
6f4476c962
Textarea Field, Multiline Block (from acbart) ( #2663 )
...
* Field Textarea, text_multiline block, generators
2019-09-11 17:57:46 -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
8ce619e827
Renaming base util to global as that's all it's used for. ( #2958 )
...
* Renaming base util to global as that's all it's used for.
2019-09-04 10:09:56 -07:00
Beka Westberg
cdc90f4059
Refactored field utilities.
2019-08-16 09:57:27 -07:00
Rachel Fenichel
b4109d7c43
Add no-multi-spaces rule
2019-07-31 09:33:54 -07:00
Neil Fraser
6aedfab4d1
Misc JSDoc fixes. ( #2747 )
2019-07-30 16:28:48 -07:00
Sam El-Husseini
5ce8c68833
Fix node build and add node tests ( #2736 )
...
* Fix node build and add node tests
2019-07-30 11:13:52 -07:00
Neil Fraser
bbb6e03801
Don’t save IDs of shadow blocks.
2019-07-15 14:37:27 -07:00
Neil Fraser
0e82677f27
Create stub for Node contstants.
...
Ironic that Node doesn’t have Node. Not tested.
Fix two missing dependencies.
2019-07-15 14:37:27 -07:00
Neil Fraser
829dcc207c
Make type and variabletype attributes optional
...
If a variable doesn’t have a type, then don’t add these empty attributes in the XML.
2019-07-15 14:37:27 -07:00
Neil Fraser
52b6ce18a5
Fix unit tests
2019-07-08 13:29:43 -07:00
Neil Fraser
74be35e23d
Rename Blockly.Xml.utils to Blockly.utils.xml
2019-07-08 13:29:43 -07:00
Beka Westberg
5a4cc7ae12
Removed textToDom Needing <xml> Documents ( #2585 )
...
* Removed textToDom needing <xml> documents.
* Fixed jsdoc.
* Followon changes resulting from lack of XML tag.
* Fix Mocha test.
2019-06-24 15:50:06 -07:00
Neil Fraser
775ce34eac
Simplify workspace.getBlocksBoundingBox
...
Previously it returned x,y,width,height. Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers.
This commit makes the minumum change to the metrics_test. I’m happy to change the test’s data if that makes more sense.
2019-06-07 10:32:57 -07:00
Neil Fraser
d1a29739d8
Move utilities into own directory.
...
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Beka Westberg
2f0b02525a
Moved serializing the field's name up to xml.js
2019-05-31 10:12:57 -07:00
Neil Fraser
dce0b77424
Fix 19 warnings in theme-related code. ( #2523 )
...
* Fix 19 warnings in theme-related code.
Resolves #2414
* Remove suppressPrefixSuffix property definition
The mixin code throws an error if property exists on both objects.
* eslint has strange ideas about indentation.
2019-05-30 10:05:06 -07:00
Neil Fraser
459961c3cb
Replace Element constants with Node constants.
...
Element constants apparently don’t exist in IE or Edge. Node constants apparently do.
2019-05-29 10:45:54 -07:00
Neil Fraser
9f528922a7
Fix some dependencies
2019-05-24 15:45:05 -07:00
Neil Fraser
5cf52c566a
Fix a dozen compiler warnings.
2019-05-17 16:48:40 -07:00
Neil Fraser
4161ba0fa7
Move goog.global to Blockly.utils.global
...
Can’t use Blockly.global since that’s the last file to load.
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
Neil Fraser
834fa64674
Use Element constants and ‘i’ variable.
...
I don’t care about whether we use the Element constants or the ubiquitously known 1 & 3 integers. But we had a mix.
Also, ’x’ is usually used for horizontal location, ‘i’ is an iterator.
No functional change.
2019-05-02 09:56:37 -07:00
Beka Westberg
123b5dc91e
Added fromXml and toXml to fields.
2019-04-25 16:00:09 -07:00
Jim Jiang
1b10d134a5
Add Block.setEnabled ( #2386 )
...
* Implement Block.setEnabled()
From issue #1593 . This commit:
- add setEnabled
- deprecate setDisabled
* Update setDisabled calls to setEnabled
Add setEnabled and deprecate setDisabled in
- core/block_svg
Update calls in
- blocks/loops
- blocks/procedures
- core/block_events
- core/events
- core/flyout_base
- core/xml
- tests/workplace_svg/procedure_svg_test
* Implement changes from comments from RoboErikG
- Implement isEnabled()
- Make this.disabled @private
- Make setDisabled(disabled) call setEnabled(!disabled)
- Update setEnabled to use isEnabled()
* Utilize isEnabled() and fix typos
Fix missing parentheses
Implement isEnabled() more widely
Fix lint and parentheses errors
* Change prevDisabledState to prevEnabledState
2019-04-23 08:49:07 -07:00