forked from xeokit/xeokit-bim-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
embeddedViewer.html
71 lines (54 loc) · 1.53 KB
/
embeddedViewer.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html, body {
height: 100%;
background: #f2f2f2;
}
body {
font-family: 'Roboto', sans-serif;
font-size: 14px;
line-height: 1.50;
-webkit-font-smoothing: antialiased;
margin: 0;
overflow: hidden;
}
.column {
float: left;
width: 100%;
}
.row:after {
content: "";
display: table;
clear: both;
}
iframe {
width: 100%;
height: 800px;
}
</style>
</head>
<body onload="init()">
<script>
function init() {
const iframeBaseURL = "./viewer.html?projectId=Systhema&modelId=170133_Asvest_20200131";
const iframeElement = document.getElementById("embeddedViewer");
if (!iframeElement) {
throw "IFRAME not found";
}
iframeElement.src = iframeBaseURL;
window.selectObject = function (objectId) {
iframeElement.src = iframeBaseURL + "#actions=focusObject,openTab&objectId=" + objectId + "&tabId=objects";
}
}
</script>
<ul>
<li><a href="javascript:selectObject('0FazZzVxL0ZAC2Xz9Lc_VS')">Focus object "0FazZzVxL0ZAC2Xz9Lc_VS"</a></li>
<li><a href="javascript:selectObject('12NjfiY$5BWxO3cGvRvhMM')">Focus object "12NjfiY$5BWxO3cGvRvhMM"</a></li>
</ul>
<iframe id="embeddedViewer"></iframe>
</body>
</html>