Commit Graph

1719 Commits

Author SHA1 Message Date
Erik Pasternak
fa6f41f395 Redo the fixes to event groups in connection.js 2019-07-19 17:06:49 -07:00
Erik Pasternak
060c2b34df Revert "Propagate the visible state when blocks connect (#2003)"
This reverts commit ec78eeb39b.
2019-07-19 17:06:38 -07:00
Erik Pasternak
a002621ec2 Revert "Properly set the display style on blocks when connections are unhidden"
This reverts commit bacfae24dd.
2019-07-19 17:06:28 -07:00
Erik Pasternak
198e445cb7 Revert "Fix wrong method call"
This reverts commit 3adc554f6b.
2019-07-19 17:06:19 -07:00
Erik Pasternak
7e3bdf024f Fix wrong method call 2019-07-18 16:14:30 -07:00
Erik Pasternak
c95d5771c8 Properly set the display style on blocks when connections are unhidden
We weren't always setting the display style on blocks when the hidden
state changed on a connection. This meant that sometimes unhiding a
connection would cause the attached block to be invisible.

This moves the display style code into the setHidden so it is never
skipped.
2019-07-18 16:14:22 -07:00
Rachel Fenichel
ea4c3c59d5 rename Blockly.utils.Paths -> Blockly.utils.svgPath 2019-07-18 15:16:57 -07:00
alschmiedt
954cb5acb1 Revert "Adds type to FieldNumber editor" 2019-07-18 15:12:07 -07:00
Rachel Fenichel
8d7eaf65e1 Cherry-pick in annotation changes and rebuild 2019-07-17 13:00:22 -07:00
Neil Fraser
2d3b514425 Ensure last variable category is last variable added.
Resolves #2050.
2019-07-15 14:37:27 -07:00
Neil Fraser
2ac3447383 Create null objects properly.
new Object(null) doesn’t do anything, that’s just broken.
And the for loop with keys is silly.
2019-07-15 14:37:27 -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
31a9c02362 Stop generating dynamic XML from text.
Removes last goog.string reference.
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
3647b6e38e Add XSD to validate Blockly’s XML (#2633)
* Add XSD to validate Blockly’s XML

This XSD might be used in tests or other tooling.
2019-07-12 12:05:55 -07:00
kozbial
da26594307 Added setCollapsed to insertion marker block creation. 2019-07-11 10:25:21 -07:00
alschmiedt
6e9761b249 Merge pull request #2618 from alschmiedt/dynamic_variable_error
Fixes bug with using dynamic variable in toolbox
2019-07-09 16:29:11 -07:00
alschmiedt
35341959d3 Fixes eslint error 2019-07-09 11:28:36 -07:00
alschmiedt
f30d79fbc8 Fixes bug with using dynamic variable in toolbox 2019-07-09 11:02:02 -07:00
Neil Fraser
e06d4e648c Rename BlockAnimation > blockAnimation
Issue 2102.  And do a full recompile due to changed the dependency name.
2019-07-08 17:31:38 -07:00
Neil Fraser
dd6cb19f5d Backward compatibility check for ‘variableType’ 2019-07-08 13:29:43 -07:00
Neil Fraser
52b6ce18a5 Fix unit tests 2019-07-08 13:29:43 -07:00
Neil Fraser
20d4a27f0a Add namespacing to XML
Fixes #1978.
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
alschmiedt
7c57432faf Merge pull request #2611 from alschmiedt/shadow_fixes
Adds fill to svg dark path
2019-07-03 16:08:42 -07:00
alschmiedt
a7ec185c69 Adds fill to svg dark path 2019-07-03 14:10:56 -07:00
alschmiedt
c45be91f7a Fixes spacing problem in procedure name 2019-07-03 11:40:55 -07:00
alschmiedt
11d368e415 Merge pull request #2607 from alschmiedt/input_number
Adds type to FieldNumber editor
2019-07-02 14:10:34 -07:00
alschmiedt
45387faab7 Adds type to FieldNumber editor 2019-07-02 10:53:45 -07:00
alschmiedt
8ef9be2fdf Fixes theme error for headless workspaces 2019-07-01 10:38:28 -07:00
Rachel Fenichel
a45b0b1d85 Merge pull request #2597 from rachel-fenichel/svg_utils
Create svg_utils file
2019-06-28 16:55:39 -07:00
Rachel Fenichel
f2be890f9f More cleanup 2019-06-28 16:55:04 -07:00
Neil Fraser
d23dc0ae55 Minor cleanup from #2581 2019-06-28 16:47:12 -07:00
Neil Fraser
712576a5b1 Fix IE not unhighlighting
This is a rework of PR #2580.
2019-06-28 16:47:12 -07:00
Rachel Fenichel
2aa1bed83f Add some spaces 2019-06-28 16:36:59 -07:00
Rachel Fenichel
f1e05b1e68 Lowercase l in comments 2019-06-28 15:09:59 -07:00
Rachel Fenichel
1f82f9d9e2 Create svg_utils file 2019-06-28 15:00:09 -07:00
alschmiedt
a8dc8359c5 Merge pull request #2587 from BeksOmega/fixes/ImagesAndTextDropdown
Fixed Rendering of Images & Text Dropdown
2019-06-24 17:19:58 -07:00
alschmiedt
55fc506782 Merge pull request #2577 from BeksOmega/fixes/doValueInvalid
Added Sending the Bad Value to doValueInvalid
2019-06-24 16:09:20 -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
Beka Westberg
3227223c82 Renamed _newValue param to _invalidValue. 2019-06-24 14:58:33 -07:00
Beka Westberg
27a6593d27 Removed Class Option Check from Text Input fromJson (#2588)
* Removed class option check from text input fromJson, as text input fields don't accept a class.

* Fixed syntax error.
2019-06-24 13:34:28 -07:00
Beka Westberg
b98eef2ae2 Fixed rendering of images & text dropdown. 2019-06-24 10:20:26 -07:00
amber-cd
492d0719d6 Pull Request: Split showContextMenu_ (#2581)
* Split showContextMenu_

Split showContextMenu_ into generateContextMenu_ and showContextMenu_. This allows for custom Blockly forks to easily extend the context menu options available on all blocks by just doing something like

```
var oldGenerateContextMenu_ = Blockly.BlockSvg.prototype.generateContextMenu_;
Blockly.BlockSvg.prototype.generateContextMenu_ = function() {
  var menuOptions = Blockly.BlockSvg.prototype.generateContextMenu_() || [];
  // Push other options into menuOptions
  return menuOptions;
}
```

Rather than having to modify the core code in such a way as to cause unnecessary maintenance overhead when upgrading Blockly versions.

* Forgot the docblock, sorry

* Oops, missed a few ESLint things

* Update block_svg.js

Updated to be protected rather than private.
2019-06-21 15:14:11 -07:00
Beka Westberg
69e2eae218 Fixed setTooltip not working before appendField(). (#2578) 2019-06-21 13:36:25 -07:00
Beka Westberg
4a0d5f5df0 Added sending the bad value to doValueInvalid. 2019-06-14 12:00:10 -07:00
Neil Fraser
9f6c1c316a Refactor workspace.connectionDBList
It seems wrong that Blockly.ConnectionDB.init reaches in to create a property on workspace.
It seems wrong that this database isn’t disposed of when the workspace is.
It seems unnecessary that disposed connections need to drop their reference *to* the workspace’s database since the connection object is going away anyway, and the databases aren’t.
2019-06-12 13:15:39 -07:00
Neil Fraser
f1c73e2244 Rename helper function 2019-06-12 10:59:33 -07:00
Neil Fraser
b8cbd9e7df Resolve 13 warnings
Reduce count from 632 to 619.
Eliminate copy-paste code duplication in Field.prototype.setValue
2019-06-12 10:59:33 -07:00