Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- static/3Dmol-min.js +0 -0
- static/panel.css +42 -0
- static/panel.js +22 -0
static/3Dmol-min.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
static/panel.css
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.tabulator {
|
| 2 |
+
font-family: Courier New !important;
|
| 3 |
+
font-weight: normal !important;
|
| 4 |
+
font-size: 12px !important;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
.tabulator-cell {
|
| 8 |
+
overflow: visible !important;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
.image-zoom-viewer {
|
| 13 |
+
display: inline-block;
|
| 14 |
+
overflow: visible;
|
| 15 |
+
z-index: 1000;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.image-zoom-viewer::after {
|
| 19 |
+
content: "";
|
| 20 |
+
top: 0;
|
| 21 |
+
left: 0;
|
| 22 |
+
width: 100%;
|
| 23 |
+
height: 100%;
|
| 24 |
+
pointer-events: none;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.image-zoom-viewer:hover::after {
|
| 28 |
+
pointer-events: all;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* When hovering over the container, scale its child (the SVG) */
|
| 32 |
+
.tabulator-cell:hover .image-zoom-viewer svg {
|
| 33 |
+
padding: 3px;
|
| 34 |
+
position: absolute;
|
| 35 |
+
background-color: rgba(250, 250, 250, 0.854);
|
| 36 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.618);
|
| 37 |
+
border-radius: 3px;
|
| 38 |
+
transform: scale(3); /* Scale up the SVG */
|
| 39 |
+
transition: transform 0.3s ease;
|
| 40 |
+
pointer-events: none; /* Prevents the SVG from blocking mouse interactions */
|
| 41 |
+
z-index: 1000;
|
| 42 |
+
}
|
static/panel.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function executeScriptFormatter(cell, formatterParams, onRendered) {
|
| 2 |
+
onRendered(function(){
|
| 3 |
+
const shadowRoot = cell.getElement().getRootNode();
|
| 4 |
+
if (shadowRoot instanceof ShadowRoot) {
|
| 5 |
+
const script = cell.getElement().querySelector('script');
|
| 6 |
+
if (script) {
|
| 7 |
+
// Replace "document." with "shadowRoot." in the script code
|
| 8 |
+
const scriptCode = script.innerText.replace(/document\./g, 'shadowRoot.');
|
| 9 |
+
// Execute the modified script code
|
| 10 |
+
const func = new Function('shadowRoot', scriptCode);
|
| 11 |
+
func(shadowRoot);
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
});
|
| 15 |
+
return cell.getValue();
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
Tabulator.extendModule("format", "formatters", {
|
| 21 |
+
executeScriptFormatter: executeScriptFormatter,
|
| 22 |
+
});
|