简体   繁体   English

锚点之间的jsPlumb连接器随着社区版本2.2.8(最新)消失了

[英]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. 我通过创建锚点并在这些锚点之间添加源/目标端点,使用jsPlumb库创建了一个水平工作流程的简单演示版。

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. 使用jsPlumb 2.0.7可以使所有内容正常显示,但是当指向最新的库jsPlumb 2.2.8时 ,即使出现连接器末尾的箭头 ,锚点之间的连接也消失了。

JS connector code: JS连接器代码:

 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 使用jsplumb 2.0.7 jsfiddle的演示-工作版本

Demo using jsplumb 2.2.8 jsfiddle - Faulty version 使用jsplumb 2.2.8 jsfiddle的演示-错误版本

any quick help will be appreciated :) 任何快速帮助将不胜感激:)

I got the issue resolved from the author(simon porritt) himself outside of SO forum. 我从SO论坛之外的作者(simon porritt)本人那里解决了这个问题。

so the actual issue was that the style parameter strokeStyle being renamed to stroke starting from version 2.2.0 . 所以实际的问题是样式参数strokeStyle从版本2.2.0开始重命名为stroke

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. 这是官方jsPlumb站点上相同的更改日志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM