简体   繁体   English

使用JavaScript库draw2d的连接链接选择不正确

[英]Connection-link selection not accurate using javascript library draw2d

I want to implement a graph designer using draw2d library. 我想使用draw2d库实现图形设计器。 In demo, the click on any connection-link is accurate, otherwise in my application the click on the links is not accurate because most of the times the connection is not selected (the elements such as a VectorFigure don't have selection problems). 在演示中,对任何连接链接的单击都是准确的,否则在我的应用程序中,对链接的单击并不准确,因为大多数情况下未选择连接(VectorFigure等元素没有选择问题)。 The only difference between my application and demo is the container of the div called "paintarea"; 我的应用程序和演示之间的唯一区别是div的容器称为“ paintarea”; in fact, I don't use a frame dedicated so the paintarea doesn't start form x=0 and y=0. 实际上,我不使用专用框架,所以绘画区域不会以x = 0和y = 0的形式开始。 Anyone can help me? 有人可以帮助我吗? Is very important...thanks in advance. 非常重要...预先感谢。

did you use a scroll container/div? 您是否使用了滚动容器/ div?

Sometimes the users enclose the paintarea in another scrollable DIV. 有时,用户会将画图区域包含在另一个可滚动的DIV中。 In this case you should use the setViewPort ...or inspect the Viewport Demo. 在这种情况下,您应该使用setViewPort ...或检查Viewport Demo。

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

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