X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=examples%2Fjavascript%2Fjalview.js;h=43d03bdc7a9da22f8136b7effbb12e0f669492d6;hb=1d415c4766233d4710950f6b5384eab64bb629bb;hp=9196b4adce114ce0bbad298561010355989f08ec;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/examples/javascript/jalview.js b/examples/javascript/jalview.js index 9196b4a..43d03bd 100644 --- a/examples/javascript/jalview.js +++ b/examples/javascript/jalview.js @@ -1,6 +1,6 @@ /** - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -17,6 +17,14 @@ * The Jalview Authors are detailed in the 'AUTHORS' file. */ + + + + + + + + // default console to report messages var _console = document.getElementById("stdout"); var _jvapps = new Array(); @@ -145,7 +153,8 @@ function linkJvJmol(applet, jmolView, modeltofiles) { var sep = applet.getSeparator(); var oldjm=jmolView; // recover full id of Jmol applet - jmolView=_jmolGetApplet(jmolView).id; +// jmolView=_jmolGetApplet(jmolView).id; // Jmol 12.4 + jmolView=jmolFindTarget(jmolView).id; // Jmol 14.2.14 var jmbinding=_jvjmols.get(jmolView); if (!jmbinding) { @@ -338,3 +347,37 @@ function _jmolMessagecallback(jmid, statmess) { } } + + + function lJvApp() { + setTimeout(function() { + //alert("in lJvApp"); + var jvapp = document.getElementById("jvapp"); + var jvfollower = document.getElementById("jvfollower"); + //console.log(">>>>>>>> lJvApp" + jvapp); + linkJvJmol(jvapp); + }, 100); + setConsole(document.getElementById("stdout")); + }; + + function lJvFollow() { + setTimeout(function() { + //alert("in lJvFollow"); + var jvapp = document.getElementById("jvapp"); + var jvfollower = document.getElementById("jvfollower"); + console.log(">>>>>>> lJvFollow" + jvfollower); + linkJvJmol(jvfollower); + }, 100); + }; + + function lJvA() { + setTimeout(function() { + //alert("lJvA"); + jvfollower = document.getElementById("jvA"); + setConsole(document.getElementById("stdout")); + //sep = jvfollower.getSeparator(); + //jvapp.setSeparator(""+jvapp.getSeparator()); + linkJvJmol(jvfollower, "jmolView", modeltofiles); + }, 100); + }; +