我使用jsplumb来表示作业之间的依赖关系。 请看下面的jsfiddle,看看到目前为止我有什么。 JsFiddle
var arrow_template = {
connector:"StateMachine",
paintStyle:{lineWidth:3,strokeStyle:"#0060CF"},
hoverPaintStyle:{strokeStyle:"#dbe300"},
endpoint:"Blank",
anchors:["Right", "Left"],
reattach:false,
overlays:[["PlainArrow", {location:1, width:10, length:10} ]]
};
我想在连接的左锚点添加一些水平偏移量,这样它就不会越过滚动条。而是从面板边框开始。
我在这里读过documentation for anchors,但我并不完全明白。当我尝试使用锚点设置值时,我没有连接/箭头。
感谢任何帮助。
答案 0 :(得分:2)
除了提供锚点的位置和方向之外,您还可以选择提供另外两个参数来定义与给定位置相关的偏移量。
因此,如果您将anchors:["Right", "Left"],
替换为anchors:[[1, 0.5, 0, 0, 18, 0], "Left"],
,您的问题将得到解决。