-
Notifications
You must be signed in to change notification settings - Fork 0
/
xenium_landscape_pair_sync.html
109 lines (91 loc) · 2.56 KB
/
xenium_landscape_pair_sync.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* Flexbox container for landscape and matrix */
#container {
display: flex;
width: 100%;
height: 100vh; /* Full viewport height */
}
/* Landscape (left) */
#landscape-1 {
flex: 1;
width: 50%;
height: 100%;
border-right: 1px solid #ccc;
height: 77%;
margin: auto;
overflow: hidden;
position: relative;
line-height: 10px;
margin-top: 0em;
}
/* Matrix (right) */
#landscape-2 {
flex: 1;
width: 50%;
height: 100%;
border-right: 1px solid #ccc;
height: 77%;
margin: auto;
overflow: hidden;
position: relative;
line-height: 10px;
margin-top: 0em;
}}
</style>
</head>
<body>
<!-- <div id="landscape" style="width: 600px; height: 500px; position: relative;"></div>
<div id="matrix" style="width: 600px; height: 500px; position: relative; margin-top: 100px"></div> -->
<!-- Flex container -->
<div id="container">
<!-- Landscape visualization -->
<div id="landscape-1"></div>
<div id="landscape-2"></div>
</div>
<script type="module">
import celldega from './src/celldega/static/widget.js';
console.log(celldega);
// Use the imported functions
const token = '';
const ini_x = 15500;
const ini_y = 12200;
const ini_z = 0;
const ini_zoom = -6;
const base_url = 'http://127.0.0.1:8081/notebooks/data/xenium_landscapes/Xenium_Prime_Human_Skin_FFPE_outs';
const landscape_1 = await celldega.landscape_ist(
document.querySelector("#landscape-1"),
{},
token,
ini_x,
ini_y,
ini_z,
ini_zoom,
base_url,
'',
0.25,
'95%',
'85%',
);
const landscape_2 = await celldega.landscape_ist(
document.querySelector("#landscape-2"),
{},
token,
ini_x,
ini_y,
ini_z,
ini_zoom,
base_url,
'',
0.25,
'95%',
'85%',
landscape_1.update_view_state
);
</script>
</body>
</html>