On 09/26/2014 11:44 AM, Roberto Mosca wrote: > Dear all, > > I am experiencing some very nasty problem when using a library for network > visualization called Cytoscape.js together with JSmol. I don't know if the > problem depends on Cytoscape.js or JSmol. When loading the two libraries > separately they work perfectly, but loading them together generates erratic > behaviour in Cytoscape.js. > > The problem is manifesting in Cytoscape.js, so I understand it shouldn't be > something related to JSmol, but if anyone can give me any idea it would be > greatly appreciated as I am completely stuck on it and I don't want to > loose either JSmol nor Cytoscape.js... > > I prepared a tarball ( > https://www.dropbox.com/s/0k8lufk4gdj602g/cytoscape.js_jsmol.tgz?dl=0) of a > very simple page that shows the problem: > The page contains a cytoscape network on the left and a JSmol view on the > right. If you click on any of the nodes in the network to select it, it > becomes green (correct). But when you click on the background to unselect > the node, then it looses its original format. This does not happen if you > load Cytoscape.js alone. > > It looks like JSmol is breaking something inside Cytoscape.js... > > Any idea why? > > Any help would be greatly appreciated! :) > The problem seems to be how 'Cytoscape.js' is storing it's internal 'CSS'-like settings for elements like 'nodes'. There seem to be two places where it is stored. The original one where it is defined and another one (which I havn't figured out) which is actually used if a 'node' is deselected. The original one is still intact at the time the border color is not restored to the initial value. If the 'CSS'-like setting for 'nodes' is changed from "data(borderColor)" to a fixed value like "red" restoring works also with JSmol running in the page. So you will need to find out where this value is actually taken from during restoring the initial 'node' settings.
Regards, Rolf -- Rolf Huehne Postdoc Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) Beutenbergstrasse 11 07745 Jena, Germany Phone: +49 3641 65 6205 Fax: +49 3641 65 6210 E-Mail: [email protected] Website: http://www.fli-leibniz.de Scientific Director: Prof. Dr. K. Lenhard Rudolph Head of Administration: Dr. Daniele Barthel Chairman of Board of Trustees: Dennys Klein VAT No: DE 153 925 464 Register of Associations: No. 230296, Amtsgericht Jena Tax Number: 162/141/08228 ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

