我在其他地方已经看到了用于附加现有端点的以下技术。当使用addEndpoint()
var e0 = jsPlumb.addEndpoint("container0",{uuid:"ep1"}), //set your own uuid for endpoint for later access.
var e1 = jsPlumb.addEndpoint("container1",{uuid:"ep2"});
jsPlumb.connect({ uuids:[e1.getUuid(),e2.getUudi()] }); // (or) jsPlumb.connect({ uuids:["ep1","ep2"] });
但是,在我的情况下,我需要加入和端点到使用makeTarget()
var e0 = jsPlumb.addEndpoint("container0",{uuid:"ep1"}), //set your own uuid for endpoint for later access.
var e1 = jsPlumb.makeTarget("container1",{uuid:"ep2"});
jsPlumb.connect({ uuids:[e1.getUuid(),e2.getUudi()] }); // (or) jsPlumb.connect({ uuids:["ep1","ep2"] });
但是这不起作用,makeTarget()
返回的结果甚至没有getUuid()
方法。
我怎样才能做到这一点?
答案 0 :(得分:1)
这应该有效:
jsPlumb.connect({
source: sourceUUID,
target: targetID,
uuids: [sourceUUID, targetID],
editable: true
});