从外部代码引用Cytoscape元素 [英] Referencing Cytoscape elements from external code

查看:89
本文介绍了从外部代码引用Cytoscape元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试集成qTip2,以显示有关Cytoscape图形中元素的鼠标事件的工具提示。我正在使用此示例。但是,在我的测试中,尝试在所选元素对象上调用qtip()的尝试失败,例如IE表示该对象不支持属性或方法qtip。我确信选择器可以正常工作,因为我可以使用元素的所有属性。

I'm trying to integrate qTip2 to show tooltips on mouse events for elements in a Cytoscape graph. I'm using this example. However, in my testing, the attempt to call qtip() on the selected element object fails, and IE for example says object doesn't support property or method qtip. I am sure the selector is working, since I can get at all of the element's properties.

我缺少什么?任何见解均表示赞赏。谢谢!

What am I missing? Any insight is appreciated. Thanks!

代码:

cy.getElementById("n1").qtip({
        content: {
            text: 'My tooltip text'
        }
    });


推荐答案

我发现了问题,那就是在这种情况下,qTip的扩展是单独的,从查看JS Bin示例中看不到。您可以在此处获得扩展名。

I found the issue, which is that there is a separate extension for qTip in this case, which I didn't see from looking at the JS Bin example. You can get the extension here.

这篇关于从外部代码引用Cytoscape元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆