0

I'm implementing a graph based on a cytoscape.js example from the official website(this example). The problem is that even in their example, if you click the same node twice(see the steps bellow) the qtip will be empty the second time. Here is the exact scenario:

  1. You click a node. The qtip with 'START' appears. You press 'start'.
  2. You click another node. The qtip with 'END' appears. You press 'end'.
  3. You click 'CLEAR'.
  4. You click again on the node from step 1. The qtip appears but is empty(the 'START' is not there anymore). => PROBLEM

Any idea how to fix this? I tried debugging it but I got stuck(they use a wrapper to emulate qtip2 on their elements).

Thank you.

miraco
  • 298
  • 5
  • 10

1 Answers1

1

QTip is a great lib, but it can be a bit finicky. I've added a workaround to the demo you can reference. It basically uses the functional value for content.text: http://qtip2.com/options#content

maxkfranz
  • 11,896
  • 1
  • 27
  • 36
  • Thank you MAX for your work on this amazing library, the workaround does the trick. Another thing that seems to work is to add the qtip on clicked node(rather than on all nodes on binding - be aware of performance) and then destroy it(hiding didn't work as expected). As a side note: after you click 'START' you can see the 'END' for a split second in its place. – miraco May 22 '15 at 19:45