Displaying qTip hover on outer nodes of Cytoscape.

2019-09-10 21:05发布

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

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
                }
            }
        });        

1条回答
【Aperson】
2楼-- · 2019-09-10 21:31

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.

  • 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
查看更多
登录 后发表回答