-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
50 lines (35 loc) · 1.17 KB
/
index.html
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
48
49
50
<!DOCTYPE html>
<html>
<head>
<!-- d3.js dependency script -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<!-- PDB Topology Viewer JS -->
<script type="text/javascript" src="build/pdb-topology-viewer-plugin-2.0.0.js" defer></script>
<style>
#pdb-topology-viewer {
position: relative;
width: 500px;
height: 500px;
}
</style>
</head>
<body>
<h4>PDB Topology Viewer Plugin Demo</h4>
<!-- PDB Topology Viewer container -->
<div id="pdb-topology-viewer"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
//Create plugin instance
const pluginInstance = new PdbTopologyViewerPlugin();
//Get element from HTML/Template to place the view
const viewContainer = document.getElementById('pdb-topology-viewer');
const options = {
entryId: '1cbs',
entityId: '1'
}
//Call render method to display the 2D view
pluginInstance.render(viewContainer, options);
});
</script>
</body>
</html>