mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Merge from Upstream Blockly (#776)
* WIP merge from upstream google/blockly
* fixing some merging bugs. Getting the drag surface to work, updating some function calls, etc.
* make the trash can lid animate again and fix the cursor to show an x when things will be removed.
* Fix text rendering logic in fields
* Hand apply some more changes from blockly flyout.js to flyout_base.js.
Also revert 08efd1381c
in scratch-blocks since it breaks variables and there is more work fenichel is planning
to do here.
* Fix drop-down field rendering
* Resolve issue with text input field widths on init
* Remove unused blockly (built) files
* Remove unused language files
* Resolve lint issues and rebuild
* Add blockly build targets to cleanup script
* Return 0 if 'this.arrow_' does not exist in a dropdown field
* Remove unused / irrelevant comments
This commit is contained in:
parent
ccd2da9173
commit
be9d5fefed
59 changed files with 4804 additions and 1167 deletions
|
@ -56,19 +56,19 @@ Blockly.Warning.prototype.collapseHidden = false;
|
|||
*/
|
||||
Blockly.Warning.prototype.drawIcon_ = function(group) {
|
||||
// Triangle with rounded corners.
|
||||
Blockly.createSvgElement('path',
|
||||
Blockly.utils.createSvgElement('path',
|
||||
{'class': 'blocklyIconShape',
|
||||
'd': 'M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z'},
|
||||
group);
|
||||
// Can't use a real '!' text character since different browsers and operating
|
||||
// systems render it differently.
|
||||
// Body of exclamation point.
|
||||
Blockly.createSvgElement('path',
|
||||
Blockly.utils.createSvgElement('path',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'd': 'm7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z'},
|
||||
group);
|
||||
// Dot of exclamation point.
|
||||
Blockly.createSvgElement('rect',
|
||||
Blockly.utils.createSvgElement('rect',
|
||||
{'class': 'blocklyIconSymbol',
|
||||
'x': '7', 'y': '11', 'height': '2', 'width': '2'},
|
||||
group);
|
||||
|
@ -82,13 +82,13 @@ Blockly.Warning.prototype.drawIcon_ = function(group) {
|
|||
*/
|
||||
Blockly.Warning.textToDom_ = function(text) {
|
||||
var paragraph = /** @type {!SVGTextElement} */ (
|
||||
Blockly.createSvgElement('text',
|
||||
Blockly.utils.createSvgElement('text',
|
||||
{'class': 'blocklyText blocklyBubbleText',
|
||||
'y': Blockly.Bubble.BORDER_WIDTH},
|
||||
null));
|
||||
var lines = text.split('\n');
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var tspanElement = Blockly.createSvgElement('tspan',
|
||||
var tspanElement = Blockly.utils.createSvgElement('tspan',
|
||||
{'dy': '1em', 'x': Blockly.Bubble.BORDER_WIDTH}, paragraph);
|
||||
var textNode = document.createTextNode(lines[i]);
|
||||
tspanElement.appendChild(textNode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue