我遇到了 2 个问题(请参阅 http://jsbin.com/umixuf/10/edit)
1) 悬停在端点上工作正常,但我的连接器不接受悬停时的颜色。有什么想法吗? (参见jsbin中的Source1和Target1)
2)在我声明端点并连接它们之后, anchor 似乎已关闭。 (参见jsbin中的Source2和Target2)
谢谢!
最佳答案
第 1 部分的解决方案: jsplumb 的作者建议我使用以下内容:
connectorHoverStyle: { strokeStyle:"red" }
第 2 部分的解决方案:
这是我的 html 开头:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"> </script>
<script src="http://stage-preview.gage.com/Creative/Microsoft/EZCourseDemo/scripts/jquery.jsPlumb-1.3.16-all-min.js"> </script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
.........
</body>
</html>
一旦我删除
<!DOCTYPE html>
端点回到了正确的位置。不确定这是 jsbin 问题还是 jsplumb 问题,但无论哪种方式,如果您使用 jsbin,都不要将该标记留在 HTML 中。
下图是删除该标签之前/之后的情况。请注意 Target2(应该是 TopCenter)上端点的位置如何稍微偏移。
关于javascript - 悬停和连接端点 jsPlumb 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16805134/