* 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.
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.
This default Closure image was always being overridden and was never fetched. But it takes some research to determine that this is not in effect a potential monitoring point.
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.
Instead of top/left/height/width. Given our uses of Rect, it makes the math slightly simpler.
This is a setup for using Rect in other places. Currently it is only used to describe delete areas.
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.
Old: a box object with two coordinate objects, each with two numbers.
New: a box object with four numbers.
The old system would make sense if there was a reason to group the top-left and bottom-right coordinates. But in our code we only pulled out top/bottom/left/right numbers.
New code is simpler and faster.