简体   繁体   English

当链接/节点不在视口中时滚动Go.js图

[英]Scroll Go.js diagram when link/node is out of viewport

I have a Go.js flowchart where you can drag&drop nodes from a palette and create links between them. 我有一个Go.js流程图,您可以在其中从调色板中拖放节点并在它们之间创建链接。 My problem is that when I try to move a node outside the viewport bounds the diagram doesn't scroll. 我的问题是,当我尝试将节点移到视口边界之外时,图表不会滚动。 The same happens when I try to draw a link to a node which is outside the viewport, the diagram doesn't scroll but the link just runs out of the viewport. 当我尝试绘制到视口外部的节点的链接时,也会发生同样的情况,该图不会滚动,但是该链接只是在视口外用完了。

Is there any implemented solution for that? 有没有实现的解决方案? When I try to drag a node from the palette to the diagram and I move it close to the viewport bounds, the diagram scrolls, I would need something similar. 当我尝试将节点从调色板拖到图上并将其移动到靠近视口边界时,图将滚动,我将需要类似的东西。

Anyway, congrats on the product because it has a lot of cool functionality. 无论如何,对产品表示祝贺,因为它具有很多很棒的功能。

Unless you have explicitly disabled it, the GoJS Diagram supports auto-scrolling for dragging and for linking and for relinking. 除非您明确禁用它,否则GoJS Diagram支持自动滚动以进行拖动,链接​​和重新链接。

Just hold the mouse/finger down just inside the edge of the viewport. 只需将鼠标/手指按住在视口边缘内即可。 The closer to the edge you are the faster it will scroll. 越靠近边缘,滚动速度越快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM