Mercurial > repos > goeckslab > vitessce_spatial
comparison index.html @ 4:068da7f7cd83 draft
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit bc4c0bb6784a55399241f99a29b176541a164a18
| author | goeckslab |
|---|---|
| date | Thu, 20 Feb 2025 19:47:16 +0000 |
| parents | 9f60ef2d586e |
| children | 97be83fc3677 |
comparison
equal
deleted
inserted
replaced
| 3:7cc457aa78b1 | 4:068da7f7cd83 |
|---|---|
| 1 <!doctype html> | 1 <!DOCTYPE html> |
| 2 <html lang="en"> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="UTF-8" /> |
| 5 <style> | 5 <title>Vitessce</title> |
| 6 body,html{height:100%} | 6 </head> |
| 7 body{ | 7 <body style="background-color:#666666"> |
| 8 font-family:-apple-system,'Helvetica Neue',Arial,sans-serif;display:flex;flex-direction:column} | 8 <div id="root"></div> |
| 9 #full-app{flex:1} | 9 <noscript> |
| 10 #full-app .vitessce-container{ | 10 <div> |
| 11 height:max(100%,100vh);width:100%;overflow:hidden} | 11 This Galaxy visualization uses JavaScript -- to view this an admin must allow the tool to execute JS in it's HTML output |
| 12 #full-app #small-app .vitessce-container{height:600px} | |
| 13 </style> | |
| 14 <title>Vitessce</title> | |
| 15 <link href="./static/css/2.f290e260.chunk.css" rel="stylesheet"> | |
| 16 <link href="./static/css/main.a53cc462.chunk.css" rel="stylesheet"> | |
| 17 </head> | |
| 18 <body> | |
| 19 <div id="full-app"> | |
| 20 <div class="container-fluid"> | |
| 21 <div class="row p-2"> | |
| 22 <div class="col col-full"> | |
| 23 <h1>Vitessce is loading...</h1> | |
| 24 <div style="width:1000px"> | |
| 25 <div id="small-app"> | |
| 26 </div> | |
| 27 </div> | |
| 28 </div> | |
| 29 </div> | |
| 30 </div> | |
| 31 </div> | 12 </div> |
| 32 <noscript>You need to enable JavaScript to run this app.</noscript> | 13 </noscript> |
| 33 <script> | 14 <script type="importmap"> |
| 34 !function(e){function t(t){for(var n,i,l=t[0],f=t[1],a=t[2],p=0,s=[];p<l.length;p++)i=l[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,l=1;l<r.length;l++){var f=r[l];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./";var l=this.webpackJsonpvitessce=this.webpackJsonpvitessce||[],f=l.push.bind(l);l.push=t,l=l.slice();for(var a=0;a<l.length;a++)t(l[a]);var c=f;r()}([]) | 15 { |
| 35 </script> | 16 "imports": { |
| 36 <script src="./static/js/2.eb2fd6ea.chunk.js"></script> | 17 "react": "https://esm.sh/react@18.2.0?dev", |
| 37 <script src="./static/js/main.303f671d.chunk.js"></script> | 18 "react-dom": "https://esm.sh/react-dom@18.2.0?dev", |
| 38 </body> | 19 "react-dom/client": "https://esm.sh/react-dom@18.2.0/client?dev", |
| 20 "vitessce": "https://unpkg.com/vitessce@3.5.1" | |
| 21 } | |
| 22 } | |
| 23 </script> | |
| 24 <script type="module"> | |
| 25 import React from 'react'; | |
| 26 import { createRoot } from 'react-dom/client'; | |
| 27 import { Vitessce } from 'vitessce'; | |
| 28 import { config } from './config.js'; | |
| 29 | |
| 30 console.log('here be url: '+window.location.href); | |
| 31 var current_url = window.location.href.replace(new RegExp('\/[^\/]*$'), ''); | |
| 32 console.log(current_url); | |
| 33 function rewriteURL(input) { | |
| 34 for (let k in input) { | |
| 35 if (typeof input[k] === 'string' || input[k] instanceof String) { | |
| 36 input[k] = input[k].replace('http://localhost', current_url) | |
| 37 } | |
| 38 else { | |
| 39 input[k] = rewriteURL(input[k]) | |
| 40 } | |
| 41 } | |
| 42 return input; | |
| 43 }; | |
| 44 var fixed_conf = {...config}; | |
| 45 fixed_conf = rewriteURL(fixed_conf); | |
| 46 console.log('conf fixed:'); | |
| 47 console.log(fixed_conf); | |
| 48 function MyApp() { | |
| 49 return React.createElement( | |
| 50 Vitessce, | |
| 51 { | |
| 52 height: 1000, | |
| 53 theme: 'dark', | |
| 54 config: fixed_conf, | |
| 55 } | |
| 56 ); | |
| 57 } | |
| 58 | |
| 59 const container = document.getElementById('root'); | |
| 60 const root = createRoot(container); | |
| 61 root.render(React.createElement(MyApp)); | |
| 62 </script> | |
| 63 </body> | |
| 39 </html> | 64 </html> |
