<commit_before><!DOCTYPE html>
<html>
  <head>
    <title>OFraMP</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="static/css/style.css" />
    <!--[if IE]><script type="text/javascript" src="static/js/lib/excanvas.js"></script><![endif]-->
    <script type="text/javascript" src="static/js/compatibility/es5.js"></script>
    <script type="text/javascript" src="static/js/compatibility/json3.min.js"></script>
    <script type="text/javascript" src="static/js/compatibility/console.js"></script>
    <script type="text/javascript" src="static/js/compatibility/Element.js"></script>
    <script type="text/javascript" src="static/js/compatibility/Window.js"></script>

    <script type="text/javascript" src="static/js/lib/BrowserDetect.js"></script>
    <script type="text/javascript" src="static/js/lib/dat.gui.js"></script>

    <script type="text/javascript" src="static/js/extensions/extensions.js"></script>
    <script type="text/javascript" src="static/js/extensions/Array.js"></script>
    <script type="text/javascript" src="static/js/extensions/CanvasRenderingContext2D.js"></script>
    <script type="text/javascript" src="static/js/extensions/Date.js"></script>
    <script type="text/javascript" src="static/js/extensions/DOM.js"></script>
    <script type="text/javascript" src="static/js/extensions/MouseEvent.js"></script>
    <script type="text/javascript" src="static/js/extensions/Number.js"></script>
    <script type="text/javascript" src="static/js/extensions/Object.js"></script>
    <script type="text/javascript" src="static/js/extensions/String.js"></script>

    <script type="text/javascript" src="static/js/Tree/Tree.js"></script>
    <script type="text/javascript" src="static/js/Tree/TreeVis.js"></script>

    <script type="text/javascript" src="static/js/Cache/DummyCache.js"></script>
    <script type="text/javascript" src="static/js/Cache/Cache.js"></script>

    <script type="text/javascript" src="static/js/OFraMP/Atom.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/AtomList.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/Bond.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/BondList.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/Molecule.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/MoleculeViewer.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/OFraMP.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/SelectionArea.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/settings.js"></script>

    <script>
      window.onload = function() {
        var OAPoC_URL = document.URL.match(/vps955\.directvps\.nl/) ? "http://vps955.directvps.nl/OAPoC/" : "http://127.0.0.1:8000/";

        var oframp = new OFraMP("oframp", {
          oapoc : {
            url : OAPoC_URL
          }
        });

        // ONLY for debug purposes, TODO : remove
        doframp = oframp;

        var zi = document.getElementById("zoomin");
        zi.onclick = function() {
          oframp.zoom(1.1);
        };
        var zo = document.getElementById("zoomout");
        zo.onclick = function() {
          oframp.zoom(.9);
        };
        var zp = document.getElementById("zoom");
        zp.onclick = function(e, x, y, z) {
          switch(zp.value) {
            case 'min':
              oframp.minimize();
              break;

            case 'max':
              oframp.maximize();
              break;

            case 'avg':
              oframp.idealize();
              break;

            case 'fit':
              oframp.bestFit();
              break;
          }
          zp.value = 'pre';
        };

        var rp = document.getElementById("reset");
        rp.onclick = function() {
          oframp.resetPositions();
        };

        var dl = document.getElementById("download");
        dl.onclick = function() {
          var data = oframp.getMVDataURI('image/png');
          this.href = data.replace(/^data:image\/[^;]/, 'data:application/octet-stream');
          var date = $ext.date.format(new Date(), "%Y%m%d%H%M%S");
          this.download = "OFraMP-" + date + ".png";
        };

        var op = document.getElementById("opti");
        if ($ext.onBrokenIE()) {
          op.remove();
        } else {
          op.onclick = function() {
            oframp.settingsUI.toggle();
          };
        }

        function initControls() {
          var controls = document.getElementById("controls");
          var toggle = document.getElementById("controls_toggle");
          toggle.style.visibility = "visible";

          $ext.dom.onMouseOver(controls, function() {
            toggle.className = "hover";
          });
          $ext.dom.onMouseOut(controls, function() {
            toggle.className = "";
          });

          $ext.dom.onMouseClick(toggle, function() {
            if (controls.style.visibility === "visible") {
              controls.style.height = "0px";
              controls.style.padding = "0px";
              controls.style.visibility = "hidden";
              toggle.style.bottom = "0px";
              toggle.innerHTML = "Controls &#8673";
            } else {
              controls.style.visibility = "visible";
              controls.style.height = "40px";
              controls.style.padding = "5px";
              toggle.style.bottom = "40px";
              toggle.innerHTML = "Controls &#8675";
            }
          });
        }

        $ext.dom.addEventListener(oframp.container, 'moleculeentered', function() {
          initControls();
        });
      };<commit_msg>Fixed controls not working after loading a new molecule.<commit_after><!DOCTYPE html>
<html>
  <head>
    <title>OFraMP</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="static/css/style.css" />
    <!--[if IE]><script type="text/javascript" src="static/js/lib/excanvas.js"></script><![endif]-->
    <script type="text/javascript" src="static/js/compatibility/es5.js"></script>
    <script type="text/javascript" src="static/js/compatibility/json3.min.js"></script>
    <script type="text/javascript" src="static/js/compatibility/console.js"></script>
    <script type="text/javascript" src="static/js/compatibility/Element.js"></script>
    <script type="text/javascript" src="static/js/compatibility/Window.js"></script>

    <script type="text/javascript" src="static/js/lib/BrowserDetect.js"></script>
    <script type="text/javascript" src="static/js/lib/dat.gui.js"></script>

    <script type="text/javascript" src="static/js/extensions/extensions.js"></script>
    <script type="text/javascript" src="static/js/extensions/Array.js"></script>
    <script type="text/javascript" src="static/js/extensions/CanvasRenderingContext2D.js"></script>
    <script type="text/javascript" src="static/js/extensions/Date.js"></script>
    <script type="text/javascript" src="static/js/extensions/DOM.js"></script>
    <script type="text/javascript" src="static/js/extensions/MouseEvent.js"></script>
    <script type="text/javascript" src="static/js/extensions/Number.js"></script>
    <script type="text/javascript" src="static/js/extensions/Object.js"></script>
    <script type="text/javascript" src="static/js/extensions/String.js"></script>

    <script type="text/javascript" src="static/js/Tree/Tree.js"></script>
    <script type="text/javascript" src="static/js/Tree/TreeVis.js"></script>

    <script type="text/javascript" src="static/js/Cache/DummyCache.js"></script>
    <script type="text/javascript" src="static/js/Cache/Cache.js"></script>

    <script type="text/javascript" src="static/js/OFraMP/Atom.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/AtomList.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/Bond.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/BondList.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/Molecule.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/MoleculeViewer.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/OFraMP.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/SelectionArea.js"></script>
    <script type="text/javascript" src="static/js/OFraMP/settings.js"></script>

    <script>
      window.onload = function() {
        var OAPoC_URL = document.URL.match(/vps955\.directvps\.nl/) ? "http://vps955.directvps.nl/OAPoC/" : "http://127.0.0.1:8000/";

        var oframp = new OFraMP("oframp", {
          oapoc : {
            url : OAPoC_URL
          }
        });

        // ONLY for debug purposes, TODO : remove
        doframp = oframp;

        var zi = document.getElementById("zoomin");
        zi.onclick = function() {
          oframp.zoom(1.1);
        };
        var zo = document.getElementById("zoomout");
        zo.onclick = function() {
          oframp.zoom(.9);
        };
        var zp = document.getElementById("zoom");
        zp.onclick = function(e, x, y, z) {
          switch(zp.value) {
            case 'min':
              oframp.minimize();
              break;

            case 'max':
              oframp.maximize();
              break;

            case 'avg':
              oframp.idealize();
              break;

            case 'fit':
              oframp.bestFit();
              break;
          }
          zp.value = 'pre';
        };

        var rp = document.getElementById("reset");
        rp.onclick = function() {
          oframp.resetPositions();
        };

        var dl = document.getElementById("download");
        dl.onclick = function() {
          var data = oframp.getMVDataURI('image/png');
          this.href = data.replace(/^data:image\/[^;]/, 'data:application/octet-stream');
          var date = $ext.date.format(new Date(), "%Y%m%d%H%M%S");
          this.download = "OFraMP-" + date + ".png";
        };

        var op = document.getElementById("opti");
        if ($ext.onBrokenIE()) {
          op.remove();
        } else {
          op.onclick = function() {
            oframp.settingsUI.toggle();
          };
        }

        var controlsInitialized = false;
        function initControls() {
          var controls = document.getElementById("controls");
          var toggle = document.getElementById("controls_toggle");
          toggle.style.visibility = "visible";

          $ext.dom.onMouseOver(controls, function() {
            toggle.className = "hover";
          });
          $ext.dom.onMouseOut(controls, function() {
            toggle.className = "";
          });

          $ext.dom.onMouseClick(toggle, function() {
            if (controls.style.visibility === "visible") {
              controls.style.height = "0px";
              controls.style.padding = "0px";
              controls.style.visibility = "hidden";
              toggle.style.bottom = "0px";
              toggle.innerHTML = "Controls &#8673";
            } else {
              controls.style.visibility = "visible";
              controls.style.height = "40px";
              controls.style.padding = "5px";
              toggle.style.bottom = "40px";
              toggle.innerHTML = "Controls &#8675";
            }
          });

          controlsInitialized = true;
        }

        $ext.dom.addEventListener(oframp.container, 'moleculeentered', function() {
          if(!controlsInitialized) {
            initControls();
          }
        });
      };
{'fraction_non_alphanumeric': 0.16911891985459582, 'fraction_numerical': 0.006750908776181409, 'mean_word_length': 2.4318384318384316, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6836544', 'n_tokens_mistral': 3535, 'n_tokens_neox': 3421, 'n_words': 510}