【问题标题】:Adding Overlay arrow to endpoint doesn't work将叠加箭头添加到端点不起作用
【发布时间】:2014-03-31 16:05:56
【问题描述】:

我正在使用这个makeSource 代码并根据docs 添加端点样式:

jsPlumb.makeSource(connect, {
    parent: newEntity,
    anchor: 'Continuous',
    connector: 'Flowchart',
    paintStyle: {
        fillStyle: 'rgba(123, 123, 123, 1)',
        radius: 1,
    },
    overlays:[ 
        ['Arrow', {width: 10, length: 30, location: 1}],
    ],
});

我没有收到错误。

【问题讨论】:

    标签: javascript jsplumb


    【解决方案1】:

    更新FIDDLE

    对于jsPlumb.makeSource(),属性名称为connectorOverlays(SOURCE)。这是示例代码:

    jsPlumb.makeSource("someDiv", {
    ...
    endpoint:{
       connectorOverlays:[ 
         [ "Arrow", { width:10, length:30, location:1, id:"arrow" } ], 
         [ "Label", { label:"foo", id:"label" } ]
       ]
    }
    ...
    });
    

    或者,您可以将其设置为默认值:

    jsPlumb.Defaults.Overlays = [
                [ "Arrow", { 
                    location:1,
                    id:"arrow",
                    length:14,
                    foldback:0.8
                } ]
    ];
    

    【讨论】:

    • 正如您在我的其他问题中可能已经注意到的那样,箭头不起作用。你愿意用一个例子来扩展你的最终小提琴吗? jsfiddle.net/C5ZLk/6我不知道我做错了什么。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多