diff --git a/core/rendered_connection.js b/core/rendered_connection.js index 2d681001d..9531e4c4a 100644 --- a/core/rendered_connection.js +++ b/core/rendered_connection.js @@ -216,14 +216,14 @@ Blockly.RenderedConnection.prototype.highlight = function() { var yLen = 5; steps = Blockly.utils.svgPaths.moveBy(0, -yLen) + Blockly.utils.svgPaths.lineOnAxis('v', yLen) + - Blockly.blockRendering.constants.PUZZLE_TAB.pathDown + + Blockly.blockRendering.getConstants().PUZZLE_TAB.pathDown + Blockly.utils.svgPaths.lineOnAxis('v', yLen); } else { var xLen = 5; // Horizontal line, notch, horizontal line. steps = Blockly.utils.svgPaths.moveBy(-xLen, 0) + Blockly.utils.svgPaths.lineOnAxis('h', xLen) + - Blockly.blockRendering.constants.NOTCH.pathLeft + + Blockly.blockRendering.getConstants().NOTCH.pathLeft + Blockly.utils.svgPaths.lineOnAxis('h', xLen); } var xy = this.sourceBlock_.getRelativeToSurfaceXY(); diff --git a/core/renderers/thrasos/info.js b/core/renderers/thrasos/info.js index 9a4c62621..501efd225 100644 --- a/core/renderers/thrasos/info.js +++ b/core/renderers/thrasos/info.js @@ -190,28 +190,15 @@ Blockly.thrasos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) { return this.constants_.NO_PADDING; } // Spacing between a square corner and a previous or next connection - if (Blockly.blockRendering.Types.isPreviousConnection(next)) { + if (Blockly.blockRendering.Types.isPreviousConnection(next) || + Blockly.blockRendering.Types.isNextConnection(next)) { return next.notchOffset; - } else if (Blockly.blockRendering.Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - var offset = (this.RTL ? 1 : -1) * - this.constants_.DARK_PATH_OFFSET / 2; - return next.notchOffset + offset; } } // Spacing between a rounded corner and a previous or next connection. if (Blockly.blockRendering.Types.isLeftRoundedCorner(prev) && next) { - if (Blockly.blockRendering.Types.isPreviousConnection(next)) { - return next.notchOffset - this.constants_.CORNER_RADIUS; - } else if (Blockly.blockRendering.Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - var offset = (this.RTL ? 1 : -1) * - this.constants_.DARK_PATH_OFFSET / 2; - return next.notchOffset - this.constants_.CORNER_RADIUS + offset; - } + return next.notchOffset - this.constants_.CORNER_RADIUS; } // Spacing between two fields of the same editability. diff --git a/core/renderers/zelos/info.js b/core/renderers/zelos/info.js index 4f91fffde..55c448190 100644 --- a/core/renderers/zelos/info.js +++ b/core/renderers/zelos/info.js @@ -194,27 +194,17 @@ Blockly.zelos.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) { return this.constants_.NO_PADDING; } // Spacing between a square corner and a previous or next connection - if (Blockly.blockRendering.Types.isPreviousConnection(next)) { + if (Blockly.blockRendering.Types.isPreviousConnection(next) || + Blockly.blockRendering.Types.isNextConnection(next)) { return next.notchOffset; - } else if (Blockly.blockRendering.Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - var offset = (this.RTL ? 1 : -1) * - this.constants_.DARK_PATH_OFFSET / 2; - return next.notchOffset + offset; } } // Spacing between a rounded corner and a previous or next connection. if (Blockly.blockRendering.Types.isLeftRoundedCorner(prev) && next) { - if (Blockly.blockRendering.Types.isPreviousConnection(next)) { + if (Blockly.blockRendering.Types.isPreviousConnection(next) || + Blockly.blockRendering.Types.isNextConnection(next)) { return next.notchOffset - this.constants_.CORNER_RADIUS; - } else if (Blockly.blockRendering.Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - var offset = (this.RTL ? 1 : -1) * - this.constants_.DARK_PATH_OFFSET / 2; - return next.notchOffset - this.constants_.CORNER_RADIUS + offset; } }