function makeMainPath(dir) {
      return Blockly.utils.svgPaths.line([
        Blockly.utils.svgPaths.point(0, height),
        Blockly.utils.svgPaths.point(dir * width, 0),
        Blockly.utils.svgPaths.point(0, -height),
      ]);
    }
Since previous and next connections share the same shape you can define
a function to generate the path for both.
@param {number} dir Multiplier for the horizontal direction of the path (-1 or 1)
@returns {Object} SVGPath line for use with previous and next connections.