This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsinistral_dynamicView.html
85 lines (75 loc) · 2.41 KB
/
sinistral_dynamicView.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
<!--
Dynamic View
By: Sinistral Revicane of Faerie
For configuration options, please see app/dynamicView/viewBuilderConfig.js
Coming Soon:
More cleanup
Better View Menu
ASC sorting
String sorting (I doubt many people would want this, but it might be useful for someone)
Ability to Hide/Show Overlay easily
..and more!
Example of the data structure being passed down
// var ActXiv = {
// "Encounter": {...},
// "Combatant": {
// "PlayerName1": {...},
// "PlayerName2": {...},
// ...
// }
// };
-->
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/dynamicView.css">
<script src="app/coreUtils.js"></script>
<script src="app/dynamicView/viewBuilderConfig.js"></script>
<script src="app/dynamicView/viewBuilder.js"></script>
<script>
function onOverlayDataUpdate(e) {
var data;
//Check for activity, no point in doing all the processing if nothing relevant has changed.
inactivityTracker.update(e.detail);
if(inactivityTracker.getIsActive())
{
viewBuilder.update(attachCustomOptions(e.detail));
}
}
document.addEventListener("onOverlayDataUpdate", onOverlayDataUpdate);
window.addEventListener("message", function(e) {
if (e.data.type === "onOverlayDataUpdate") {
onOverlayDataUpdate(e.data);
}
});
document.addEventListener("onOverlayStateUpdate", function (e) {
if (!e.detail.isLocked) {
displayResizeHandle();
} else {
hideResizeHandle();
}
});
function displayResizeHandle() {
document.documentElement.classList.add("resizeHandle");
}
function hideResizeHandle() {
document.documentElement.classList.remove("resizeHandle");
}
document.addEventListener('DOMContentLoaded', function() {
viewBuilder.init();
}, false);
</script>
</head>
<body>
<div id="wrapper">
<div id="views">
</div>
<div id="encounter">
<span id="encounterData" style="color:white;">No data to show.</span>
</div>
<table id="combatantTable">
</table>
</div>
</body>
</html>