Author: bpoussin Date: 2013-01-24 17:31:30 +0100 (Thu, 24 Jan 2013) New Revision: 58 Url: http://forge.codelutin.com/projects/cantharella/repository/revisions/58 Log: fix bug in editor when id contains dot '.' Modified: trunk/cantharella.web/src/main/webapp/js/moleditor.js Modified: trunk/cantharella.web/src/main/webapp/js/moleditor.js =================================================================== --- trunk/cantharella.web/src/main/webapp/js/moleditor.js 2013-01-24 11:34:39 UTC (rev 57) +++ trunk/cantharella.web/src/main/webapp/js/moleditor.js 2013-01-24 16:31:30 UTC (rev 58) @@ -9,7 +9,7 @@ // il faut faire un substring de 1 car on a ajoute un caractere pour // forcer l'existance du tag' var formulaString = $(formulaTag).attr('formula').substring(1); - var id = $(formulaTag).attr('id'); + var id = $(formulaTag).attr('id').replace(/\./g, '_') + '_editor'; $(formulaTag).after("<div><canvas id='"+id+"'/><div>"); // changes the default JMol color of hydrogen to black so it appears on white backgrounds
participants (1)
-
bpoussin@users.forge.codelutin.com