mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Using shapeFor to determine connections shape for marker_svg. (#3573)
This commit is contained in:
@@ -235,7 +235,7 @@ Blockly.blockRendering.MarkerSvg.prototype.showWithField_ = function(curNode) {
|
||||
* @protected
|
||||
*/
|
||||
Blockly.blockRendering.MarkerSvg.prototype.showWithInput_ = function(curNode) {
|
||||
var connection = /** @type {Blockly.Connection} */
|
||||
var connection = /** @type {Blockly.RenderedConnection} */
|
||||
(curNode.getLocation());
|
||||
var sourceBlock = /** @type {!Blockly.BlockSvg} */ (connection.getSourceBlock());
|
||||
|
||||
@@ -333,7 +333,7 @@ Blockly.blockRendering.MarkerSvg.prototype.positionBlock_ = function(
|
||||
/**
|
||||
* Position the marker for an input connection.
|
||||
* Displays a filled in puzzle piece.
|
||||
* @param {!Blockly.Connection} connection The connection to position marker around.
|
||||
* @param {!Blockly.RenderedConnection} connection The connection to position marker around.
|
||||
* @private
|
||||
*/
|
||||
Blockly.blockRendering.MarkerSvg.prototype.positionInput_ = function(connection) {
|
||||
@@ -341,7 +341,7 @@ Blockly.blockRendering.MarkerSvg.prototype.positionInput_ = function(connection)
|
||||
var y = connection.getOffsetInBlock().y;
|
||||
|
||||
var path = Blockly.utils.svgPaths.moveTo(0, 0) +
|
||||
this.constants_.PUZZLE_TAB.pathDown;
|
||||
this.constants_.shapeFor(connection).pathDown;
|
||||
|
||||
this.markerInput_.setAttribute('d', path);
|
||||
this.markerInput_.setAttribute('transform',
|
||||
|
||||
Reference in New Issue
Block a user