Closed solo7773 closed 7 years ago
Same error here, I'm trying to set a qTips like :
cy.nodes().qtip({ content: function() { return "Nb instances : " + this.data('instances'); }, style: { classes: 'qtip-bootstrap' }, position: { my: 'bottom center', at: 'top center' }, show: { effect: function() { $(this).slideDown(); } }, hide: { effect: function() { $(this).slideUp(); } } });
And I get :
TypeError: ele.scratch is not a function
The graph generation works, but there is no layout and no qTips. All was ok before the 3.0.0, I changed cytoscape.js and cytoscape.min.js in 2.7 but nothing happened
If you want to use 3.x APIs, you have to use cytoscape@^3.0.0
. If you want to reference the 2.x docs, you can
git clone https://github.com/cytoscape/cytoscape.js.git
cd cytoscape.js
git checkout 2.x
Then open ./documentation
.
Thanks Max. I didn't realise I referred to a wrong document. Now everything works very well.
Hi Kawrantin, I haven't used tip function in 3.0, I am not sure I will face the error you pointed. Let me figure out first.
Dear cytoscape contributor, when I try to render a new layout after initialisation, the console gives the error detailed below, but the layout can be successfully rendered in the browser. How could I avoid this annoying fake error? Thanks!
var newLayout = cy.layout({name: 'cose'});
newLayout.run();
os: windows 7 x64 cytoscape V 2.7.16 jQuery V 3.2.1
chrome V 57.0.2987.133 Uncaught TypeError: newLayout.run is not a function at creatNetwork (viewnetwork.php:234) at Object.success (viewnetwork.php:188) at i (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at A (jquery.min.js:4) at XMLHttpRequest. (jquery.min.js:4)
IE V 11.0.9600.18617 Object doesn't support property or method 'run'