mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Revert "Improve insertion markers"
This commit is contained in:
parent
e8ee142359
commit
317cb82581
2 changed files with 0 additions and 42 deletions
|
@ -713,30 +713,6 @@ Blockly.BlockSvg.prototype.renderFields_ =
|
|||
root.setAttribute('display', 'none');
|
||||
}
|
||||
}
|
||||
if (this.isInsertionMarker() && !this.getFirstStatementConnection()) {
|
||||
// add ghost eyes
|
||||
if (!Blockly.insertionMarkerGhostEyes) {
|
||||
var group = Blockly.utils.createSvgElement('g', {}, null);
|
||||
Blockly.utils.makeGhostEye(12, group);
|
||||
Blockly.utils.makeGhostEye(29, group);
|
||||
|
||||
Blockly.utils.createSvgElement('path',
|
||||
{
|
||||
'd': 'M 0 25 V 0 a1,1 0 1,1 40,0 H 40 V 25 ' +
|
||||
'L 35,20 L 30,25 L 25,20 L 20,25 L 15,20 L 10,25 L5,20 L 0,25 z',
|
||||
'style': 'fill:none; stroke:black; stroke-width: 2;'
|
||||
}, group);
|
||||
Blockly.insertionMarkerGhostEyes = {
|
||||
group: group
|
||||
};
|
||||
}
|
||||
var newRoot = Blockly.insertionMarkerGhostEyes.group;
|
||||
this.getSvgRoot().appendChild(newRoot);
|
||||
var scale = this.RTL ? 'scale(-.7 .7)' : 'scale(.7 .7)';
|
||||
newRoot.setAttribute('transform',
|
||||
'translate(' + cursorX + ', ' + cursorY + ') ' + scale
|
||||
);
|
||||
}
|
||||
return this.RTL ? -cursorX : cursorX;
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
|
|
|
@ -1001,21 +1001,3 @@ Blockly.utils.getViewportBBox = function() {
|
|||
left: scrollOffset.x
|
||||
};
|
||||
};
|
||||
|
||||
Blockly.utils.makeGhostEye = function(x, svgRoot) {
|
||||
Blockly.utils.createSvgElement('circle', {
|
||||
'cx': x,
|
||||
'cy': 3,
|
||||
'r': 8,
|
||||
'style': 'fill:white; stroke: black; stroke-width:2;'
|
||||
},
|
||||
svgRoot);
|
||||
|
||||
Blockly.utils.createSvgElement('circle', {
|
||||
'cx': x,
|
||||
'cy': 4,
|
||||
'r': 3,
|
||||
'style': 'fill:black; stroke: black; stroke-width:2;'
|
||||
},
|
||||
svgRoot);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue