JAL-4059 rename files from jsmol j2s zip from jsmol to swingjs
authorBen Soares <b.soares@dundee.ac.uk>
Mon, 4 Dec 2023 20:32:04 +0000 (20:32 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Mon, 4 Dec 2023 20:32:04 +0000 (20:32 +0000)
build.gradle
swingjs/SwingJS-site-3.1.1.zip [new file with mode: 0644]
swingjs/SwingJS-site-5.0.1.zip [new file with mode: 0644]
swingjs/SwingJS-site.zip [changed from file to symlink]
swingjs/j2s.core.jar
swingjs/timestamp
swingjs/ver/5.0.1/timestamp
utils/jalviewjs/libjs/Jmol-SwingJS.zip [moved from utils/jalviewjs/libjs/Jmol-SwingJS-16.1.40.zip with 95% similarity]
utils/jalviewjs/libjs/Jmol-j2s-site.zip [new file with mode: 0644]
utils/jalviewjs/site-resources/jalviewjs-core.html [moved from utils/jalviewjs/site-resources/jalview_bin_JalviewJS-corenamespace.html with 75% similarity]
utils/jalviewjs/site-resources/jalviewjs.html [moved from utils/jalviewjs/site-resources/jalview_bin_Jalview-namespace.html with 85% similarity]

index 1475cdb..6137539 100644 (file)
@@ -3427,6 +3427,19 @@ task jalviewjsTransferUnzipLib {
         from zipTree(file_zip)
         into "${jalviewDir}/${jalviewjsTransferSiteLibDir}"
 
+        // rename files in jsmol/j2s/... to swingjs/j2s/...
+        if (file_zip.getName().startsWith("Jmol-j2s-site")) {
+          eachFile { fcd ->
+            // jsmol/... -> swingjs/...
+            def relPathSegments = fcd.relativePath.getSegments()
+            if (relPathSegments[0] == "jsmol") {
+              def newRelPathSegments = relPathSegments
+              newRelPathSegments[0] = "swingjs"
+              fcd.relativePath = new RelativePath(true, newRelPathSegments)
+            }
+          }
+        }
+
         // The following replace() is needed due to a mismatch in Jmol calls to
         // colorPtToFFRGB$javajs_util_T3d when only colorPtToFFRGB$javajs_util_T3 is defined
         // in the SwingJS.zip (github or the one distributed with JSmol)
diff --git a/swingjs/SwingJS-site-3.1.1.zip b/swingjs/SwingJS-site-3.1.1.zip
new file mode 100644 (file)
index 0000000..08b1c33
Binary files /dev/null and b/swingjs/SwingJS-site-3.1.1.zip differ
diff --git a/swingjs/SwingJS-site-5.0.1.zip b/swingjs/SwingJS-site-5.0.1.zip
new file mode 100644 (file)
index 0000000..b80c529
Binary files /dev/null and b/swingjs/SwingJS-site-5.0.1.zip differ
deleted file mode 100644 (file)
index 08b1c3366323363112245b4a4286bb278e1ffce1..0000000000000000000000000000000000000000
Binary files a/swingjs/SwingJS-site.zip and /dev/null differ
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..4748e7fb574a00740825395d6cc8f7f77813c5f8
--- /dev/null
@@ -0,0 +1 @@
+SwingJS-site-5.0.1.zip
\ No newline at end of file
index e6f92de..e173208 100644 (file)
Binary files a/swingjs/j2s.core.jar and b/swingjs/j2s.core.jar differ
index 4b48c4a..46d4974 100644 (file)
@@ -1 +1 @@
-20231117083556 
+20231128000108 
index 4b48c4a..46d4974 100644 (file)
@@ -1 +1 @@
-20231117083556 
+20231128000108 
similarity index 95%
rename from utils/jalviewjs/libjs/Jmol-SwingJS-16.1.40.zip
rename to utils/jalviewjs/libjs/Jmol-SwingJS.zip
index ca35779..5aa9443 100644 (file)
Binary files a/utils/jalviewjs/libjs/Jmol-SwingJS-16.1.40.zip and b/utils/jalviewjs/libjs/Jmol-SwingJS.zip differ
diff --git a/utils/jalviewjs/libjs/Jmol-j2s-site.zip b/utils/jalviewjs/libjs/Jmol-j2s-site.zip
new file mode 100644 (file)
index 0000000..faff6c6
Binary files /dev/null and b/utils/jalviewjs/libjs/Jmol-j2s-site.zip differ
@@ -10,14 +10,16 @@ Info = {
   code: null,
   main: "jalview.bin.JalviewJS",
   core: "_jalview",
-  width: 850,
-  height: 550,
+  j2s_x: 100,
+  j2s_y: 100,
+  width: 200,
+  height: 100,
   readyFunction: null,
   serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
   j2sPath: 'swingjs/j2s',
   console:'sysoutdiv',
   allowjavascript: true,
-  // all j2s_... values can be accessed in Jalview.getInstance().getJSInfoValue(key)
+  // all j2s_... values can be accessed in JalviewJSUtil.getInstance().getJSInfoValue(key)
   j2s_namespace: "jv",
   j2s_overflow: true
 }
@@ -31,41 +33,12 @@ Info = {
     transform: rotate(360deg);
   }
 }
-@keyframes pulse {
-  0% {
-    transform: scale(1);
-  }
-  50% {
-    transform: scale(0.85);
-  }
-  100% {
-    transform: scale(1);
-  }
-}
-.jv1_jalviewjsSplashRotate {
-  animation: rotation 3s infinite cubic-bezier(0.4, 0.6, 0.6, 0.4);
-}
-.jv1_jalviewjsSplashActive {
-  display: visible;
-  opacity: 100%;
-  z-index: 100;
-}
-.jv1_jalviewjsSplashInactive {
-  opacity: 0%;
-  transition: opacity 1s;
-  z-index: 100;
-}
-.jv1_jalviewjsSplashFinal {
-  display: none;
-}
-
 .jv_jalviewjsSplashRotate {
-  animation: pulse 1s cubic-bezier(0.4, 0.6, 0.6, 0.4);
-  animation-iteration-count: infinite;
-  animation-fill-mode: forwards;
+  animation: rotation 6s infinite cubic-bezier(0.4, 0.6, 0.6, 0.4);
 }
 .jv_jalviewjsSplashActive {
-  z-index: 100;
+  display: visible;
+  opacity: 100%;
 }
 .jv_jalviewjsSplashInactive {
   animation-iteration-count: 1;
@@ -78,7 +51,6 @@ Info = {
   z-index: -1;
   opacity: 30%;
 }
-
 </style>
 </head>
 <body>
@@ -88,7 +60,7 @@ getClassList = function(){J2S._saveFile('_j2sclasslist.txt', Clazz.ClassFilesLoa
 </script>
 <div style="position:absolute;left:10px;top:10px;width:640px;height:1200px;">
 <div id="sysoutdiv" contentEditable="true" style="padding: 5px; border: 1px solid green; width: 100%; height: 95%; overflow: auto; font-family: 'Fira Mono', monospace; font-size: 8pt;">
-<div id="jv:jalviewjsSplash" class="jv_jalviewjsSplashRotate jv_jalviewjsSplashActive" style="position: absolute; right: 1rem; top: 1rem;">
+<div id="jv:jalviewjsSplash" class="jv_jalviewjsSplashRotate jv_jalviewjsSplashActive" style="position: absolute; right: 1rem; top: 1rem; z-index: 1000;">
 <img style="width; 2rem; height: 2rem;" src="images/jalview_logo_small.svg" />
 </div>
 </div>
@@ -8,16 +8,18 @@
 if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder in the same directory as ' + document.location.href)
 Info = {
   code: null,
-  main: "jalview.bin.Jalview",
+  main: "jalview.bin.JalviewJS",
   core: "NONE",
-  width: 850,
-  height: 550,
+  j2s_x: 100,
+  j2s_y: 100,
+  width: 200,
+  height: 100,
   readyFunction: null,
   serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
   j2sPath: 'swingjs/j2s',
   console:'sysoutdiv',
   allowjavascript: true,
-  // all j2s_... values can be accessed in Jalview.getInstance().getJSInfoValue(key)
+  // all j2s_... values can be accessed in JalviewJSUtil.getInstance().getJSInfoValue(key)
   j2s_namespace: "jv",
   j2s_overflow: true
 }
@@ -39,11 +41,15 @@ Info = {
   opacity: 100%;
 }
 .jv_jalviewjsSplashInactive {
-  opacity: 0%;
-  transition: opacity 1s;
+  animation-iteration-count: 1;
+  animation-fill-mode: forwards;
+  opacity: 30%;
+  transition: all 1s;
+  z-index: 100;
 }
 .jv_jalviewjsSplashFinal {
-  display: none;
+  z-index: -1;
+  opacity: 30%;
 }
 </style>
 </head>