-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.html
More file actions
48 lines (35 loc) · 1.36 KB
/
bootstrap.html
File metadata and controls
48 lines (35 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>
<head>
<title>Structure modified and atom mark demo</title>
<link href="bootstrap.css" rel="stylesheet">
<script type="text/javascript" language="javascript" src="jsme/jsme.nocache.js"></script>
<style>
em {background-color:rgb(102,255,255);}
</style>
<script>
//this function will be called after the JavaScriptApplet code has been loaded.
function jsmeOnLoad() {
jsmeApplet = new JSApplet.JSME("jsme_container", "380px", "340px", {
"options" : "oldlook,marker"
});
jsmeApplet.setCallBack("AfterStructureModified", showEvent);
document.getElementById("log").value = "";
}
var patt=/\[([A-Za-z][a-z]?)H?\d*:\d+\]/g; //regexp pattern for numbered atom
function showEvent(event) {
var log = document.getElementById("log");
log.value = event.action + " at: " + event.atom + " b: " + event.bond + " m: " + event.molecule + " " + event.src.smiles() + "\n" + log.value;
}
</script>
</head>
<body>
<H1>Structure modified and atom mark demo</H1>
<p>
Draw a structure, click on the circle icon of the editor and click on one or more atoms
</p>
<div id="jsme_container"></div>
<button type="button" id="clear_but" onclick='document.getElementById("log").value=""'>Clear log</button>
<BR>
<textarea id = "log" rows="24" cols="50"> </textarea>
</body>
</html>