在Cytoscape.js图的外部节点上显示qTip悬停? [英] Displaying qTip hover on outer nodes of Cytoscape.js graph?

查看:442
本文介绍了在Cytoscape.js图的外部节点上显示qTip悬停?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Cytoscape.js中将鼠标悬停在图形的外部节点上时,不会显示qTip对话框。

When hovering over the outer nodes of graph in Cytoscape.js, the qTip dialog is not displayed.

将鼠标悬停在某个位置时,是否仍会显示qTip气泡外节点?我可以在上半部分的节点上弹出qtip弹出窗口,但在图的侧面没有那么多。

Is there anyway to display the qTip bubbles upon hovering on an outer node? I can have the qtip popup on nodes in the upper half but not much along the sides of the graph. Especially towards the bottom half.

            cy.elements('node').qtip({

            id: function() {
                return this.data('id');
            },
            content: function() {
                return this.data('name') + '<br /><em>$' + this.data('weight') + '</em>';
            },
            position: {
                my: 'bottom right',
                viewport: $(etl_cyto_div),
                adjust: {
                    cyViewport: true,
                    method: 'flip none'
                }
            },
            show: {
                cyBgOnly: false
            },
            hide: {
                cyBgOnly: false,
                cyViewport: true,
                delay: 100
            },
            style: {
                classes: 'qtip-tipsy',
                tip: {
                    width: 16,
                    height: 8
                }
            }
        });        


推荐答案

我怀疑您的选择可能会引起问题。由于此扩展是qtip的较薄包装,因此您只需使用 qTip API和选项

I suspect your options may be causing the issue. Because this extension is a relatively thin wrapper around qtip, you just use the qTip API and options.


  • 尝试保留 options.position.adjust.method 默认值

  • 尝试更宽松的 options.position.adjust.method ;参见 qtip文档

  • adjust .cyViewport 价格昂贵(尤其是在触摸时),并且可能会因所用qtip的版本而异。

  • 尝试所有默认设置,看看是否可以通过所需事件重现问题。如果不是,则问题出在所设置的选项上。如果是这样,请在一个问题中提交示例代码

  • Try leaving options.position.adjust.method default
  • Try a more permissive options.position.adjust.method; see qtip docs
  • adjust.cyViewport is expensive (especially on touch) and can be buggy depending on the version of qtip used.
  • Try all defaults and see if you can reproduce your issue with the events you want. If not, then the issue is due to the set options. If so, please file your example code in an issue

这篇关于在Cytoscape.js图的外部节点上显示qTip悬停?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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