Skip to content
Snippets Groups Projects
Commit 805a56ce authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

bugfix: render molecule after first validation in the modal sketch

parent c0c30b20
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ function update_molecule_composition_fields() { ...@@ -10,6 +10,7 @@ function update_molecule_composition_fields() {
that.val('').prop("disabled", true); that.val('').prop("disabled", true);
} }
if ($this.attr("name").indexOf("smiles") > 0) { if ($this.attr("name").indexOf("smiles") > 0) {
showCanvas(this);
let canvas = $("#canvas-" + $this.attr("name")); let canvas = $("#canvas-" + $this.attr("name"));
//console.log("canvas name:",canvas); //console.log("canvas name:",canvas);
canvas.attr("data-smiles", $this.val()); canvas.attr("data-smiles", $this.val());
...@@ -82,7 +83,6 @@ function showCanvas(Compound){ ...@@ -82,7 +83,6 @@ function showCanvas(Compound){
var z = Compound.value; var z = Compound.value;
var x = document.getElementById('canvas_window-'.concat(Compound.name)); var x = document.getElementById('canvas_window-'.concat(Compound.name));
var y = document.getElementById('canvas_placeholder-'.concat(Compound.name)); var y = document.getElementById('canvas_placeholder-'.concat(Compound.name));
console.log("test onclick",Compound);
if (z!="") { if (z!="") {
x.style.display = "flex"; x.style.display = "flex";
y.style.display = "none"; y.style.display = "none";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment