Part I
I am finding it difficult to replicate the functionality of cytoscape.js-qtip in my code.
Here is the JavaScript Code:
$(function()
{
$('#cy').cytoscape
({
style: cytoscape.stylesheet()
.selector('node').css({'content': 'data(name)'})
.selector('edge').css({'target-arrow-shape': 'triangle'})
.selector(':selected').css({'line-color': 'black'})
elements: {
nodes: [
{ data: { id: '1', name: '1' } },
{ data: { id: '2', name: '2' } },
],
edges: [{ data: { source: '1', target: '2' } }]
},
layout: { name: 'grid'},
ready: function()
{
window.cy = this;
cy.panzoom({});
cy.cxtmenu
({ commands:[{ content: '<span class="fa fa-flash fa-2x"></span>',
select: function() {console.log( this.id() );}
},
{ content: '<span class="fa fa-star fa-li "></span>',
select: function(){ console.log( this.data('name') );}
},
{ content: 'Text',
select: function(){ console.log( this.position() );}
}
]});
cy.elements().qtip
({
content: function(){ return 'this is tool tip for ' + this.id() },
position: { my: 'top center',at: 'bottom center'},
style: {classes: 'qtip-bootstrap',tip: {width: 16,height: 8}}
});
cy.qtip
({
content: 'tool tip about the core of the layout',
position: { my: 'top center', at: 'bottom center'},
show: { cyBgOnly: true},
style: {classes: 'qtip-bootstrap',tip: {width: 16,height: 8}}
});
}
});
});
I have already gone through these threads:
Errors shown in Browser Console:
TypeError: qtip.$domEle.qtip is not a function
File : cytoscape.js-qtip
Line : 88
Col : 1
Code : qtip.$domEle.qtip( opts );
Part II
Also when I am trying the example provided over here, I see no qtip on tapping.
Note: I tried on both Mozilla Firefox & Google Chrome.
And encountered the following Errors in the Browser Console:
Mozilla Firefox
Google Chrome:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…