Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 我如何在没有按钮的情况下连接块,但在框上有一个点,可以将箭头从一个框拖动到另一个框_Angular_Angular6_Jsplumb - Fatal编程技术网

Angular 我如何在没有按钮的情况下连接块,但在框上有一个点,可以将箭头从一个框拖动到另一个框

Angular 我如何在没有按钮的情况下连接块,但在框上有一个点,可以将箭头从一个框拖动到另一个框,angular,angular6,jsplumb,Angular,Angular6,Jsplumb,我想用手动线路连接div,但不是用按钮。当用户想要连接一条线时,他应该能够将箭头从一个框拖动到另一个框 通过链接 我想不用按钮手动连接div 提前感谢您需要为元素设置端点,以便进行拖放连接,并告知哪个端点是源端点,哪个端点是目标端点。因此,您需要这样使用addEndpoint函数: this.jsPlumbInstance.addEndpoint("Source", { anchor: "Right", connector: ['Flowchart'], isSource: tru

我想用手动线路连接div,但不是用按钮。当用户想要连接一条线时,他应该能够将箭头从一个框拖动到另一个框

通过链接

我想不用按钮手动连接div


提前感谢

您需要为元素设置端点,以便进行拖放连接,并告知哪个端点是源端点,哪个端点是目标端点。因此,您需要这样使用
addEndpoint
函数:

this.jsPlumbInstance.addEndpoint("Source", {
  anchor: "Right",
  connector: ['Flowchart'],
  isSource: true
});
this.jsPlumbInstance.addEndpoint("Target1", {
  anchor: "Left",
  connector: ['Flowchart'],
  isTarget: true,
  endpoint: "Blank",
});
我更新了你的密码


更多信息请参阅。

我知道你的问题有点老,但我是否回答了你的问题?