Search code examples
javascripthtmlsvgworkflowjsplumb

jsPlumb connector between anchors is disappearing with community version 2.2.8(latest)


I have created a simple demo version of horizontal work flow using jsPlumb library by creating anchors and adding source/target endpoint between those anchors.

everything rendered fine with jsPlumb 2.0.7, but when pointed to latest library jsPlumb 2.2.8, the connections between the anchors disappeared even though the arrows at the end of the connectors are appearing.

JS connector code:

 var basicType = {
      connector: "StateMachine",
      paintStyle: {
        strokeStyle: "red",
        lineWidth: 5
      },
      hoverPaintStyle: {
        strokeStyle: "blue"
      },
      overlays: [
        "Arrow"
      ]
    };
    instance.registerConnectionType("basic", basicType);

Demo using jsplumb 2.0.7 jsfiddle - Working version

Demo using jsplumb 2.2.8 jsfiddle - Faulty version

any quick help will be appreciated :)


Solution

  • I got the issue resolved from the author(simon porritt) himself outside of SO forum.

    so the actual issue was that the style parameter strokeStyle being renamed to stroke starting from version 2.2.0.

    Correct Style format:

    paintStyle: { 
         stroke:"blue", //renamed to "stroke" from "strokeStyle"
         strokeWidth:10 
        }
    

    here is the Change log for the same on official jsPlumb site.