Skip to content
Snippets Groups Projects
Select Git revision
  • fc470293d86fe362b6e8766ff381247ec1ba59eb
  • master default protected
  • rednatco-v2
  • base-pairs-ladder
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

index.html

Blame
  • index.html 4.50 KiB
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="utf-8" />
            <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
            <title>Mol* Plugin Wrapper</title>
            <style>
                * {
                    margin: 0;
                    padding: 0;
                    box-sizing: border-box;
                }
                #app {
                    position: absolute;
                    left: 160px;
                    top: 100px;
                    width: 600px;
                    height: 600px;
                    border: 1px solid #ccc;
                }
    
                #controls {
                    position: absolute;
                    width: 130px;
                    top: 10px;
                    left: 10px;
                }
    
                #controls > button {
                    display: block;
                    width: 100%;
                    text-align: left;
                }
    
                #controls > hr {
                    margin: 5px 0;
                }
    
                #controls > input, #controls > select {
                    width: 100%;
                    display: block;
                }
            </style>
            <link rel="stylesheet" type="text/css" href="app.css" />
            <script type="text/javascript" src="./index.js"></script>
        </head>
        <body>
            <div id='controls'>
                <h3>Source</h3>
                <input type='text' id='url' placeholder='url' />
                <input type='text' id='assemblyId' placeholder='assembly id' />
                <select id='format'>
                    <option value='cif' selected>CIF</option>
                    <option value='pdb'>PDB</option>
                </select>
            </div>
            <div id="app"></div>
            <script>      
                function $(id) { return document.getElementById(id); }
            
                var pdbId = '1grm', assemblyId= '1';
                var url = 'https://www.ebi.ac.uk/pdbe/static/entry/' + pdbId + '_updated.cif';
                var format = 'cif';
                
                $('url').value = url;
                $('url').onchange = function (e) { url = e.target.value; }
                $('assemblyId').value = assemblyId;
                $('assemblyId').onchange = function (e) { assemblyId = e.target.value; }
                $('format').value = format;
                $('format').onchange = function (e) { format = e.target.value; }