forked from nathancarter/group-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CayleyDiagram.html
129 lines (117 loc) · 4.68 KB
/
CayleyDiagram.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!--
Cayley diagram visualizer
-->
<html>
<head>
<title>Cayley Diagram Visualizer</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/png" href="./images/favicon.png"></link>
<link rel="stylesheet" href="./style/fonts.css" type="text/css"></link>
<link rel="stylesheet" href="./style/menu.css" type="text/css"></link>
<link rel="stylesheet" href="./style/sliders.css" type="text/css"></link>
<link rel="stylesheet" href="./visualizerFramework/visualizer.css" type="text/css"></link>
<link rel="stylesheet" href="./style/SubsetHighlightController.css" type="text/css"></link>
<link rel="stylesheet" href="./style/CayleyDiagramController.css" type="text/css"></link>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<style>
#graphic {
background-color: #E8C8C8;
overflow-x: hidden;
-webkit-user-select: none; /* prevents cut-and-paste in graphic */
}
#controls {
display: grid;
grid-template-columns: auto;
grid-template-rows: auto 1fr;
grid-template-areas: 'options' 'panels';
}
#options {
grid-area: options;
background-color: var(--visualizer-body-background);
text-align: center;
}
#options > button {
margin-bottom: 0.5em;
min-width: 15%;
}
#subset-control {
grid-area: panels;
padding: 2px;
overflow: auto;
visibility: visible;
}
#view-control, #diagram-control {
grid-area: panels;
background-color: var(--visualizer-controls-background);
visibility: hidden;
display: none;
}
.tooltip ul {
margin: 0;
padding-inline-start: 1em;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
CommonHTML: {
scale: 100, /* scale MathJax to match the HTML around it */
},
showMathMenu: false, /* disable MathJax context menu (it interferes with subsetDisplay context menu) */
});
MathJax.Hub.processUpdateTime = 1000; // allow MathJax to work longer at a stretch, improves initial load time
MathJax.Hub.processSectionDelay = 0; // no pause to let browser handle interaction -- only busy during loading
MathJax.Hub.processUpdateDelay = 0;
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=MML_CHTML"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery-resizable.js"></script>
<script type="module">
import {load} from "./CayleyDiagram.js";
window.addEventListener('load', load, {once: true});
</script>
</head>
<body>
<div id="bodyDouble">
<div id="header">
<div id="heading"></div>
</div>
<div id="graphic"></div>
<div id="splitter"></div>
<div id="controls">
<div id="options">
<button id="subset-button">Subsets</button>
<button id="view-button">View</button>
<button id="diagram-button">Diagram</button>
</div>
<div id="subset-control" class="panel">
<!-- This is filled in by subsetDisplay/subsets.html -->
</div>
<div id="view-control" class="panel">
<!-- This is filled in by cayleyViewController/view.html -->
</div>
<div id="diagram-control" class="panel">
<!-- This is filled in by diagramController/diagram.html -->
</div>
</div>
</div>
</body>
<!-- Templates for tooltips -->
<template id="single-object-template">
<div id="tooltip" class="tooltip remove-on-clean" objectIDs="${objectIDs_string}">${top}</div>
</template>
<template id="double-object-template">
<div id="tooltip" class="tooltip remove-on-clean" objectIDs="${objectIDs_string}">
<b>In front:</b> ${top}<br>
<b>Behind:</b> ${rest[0]}
</div>
</template>
<template id="multi-object-template">
<div id="tooltip" class="tooltip remove-on-clean" objectIDs="${objectIDs_string}">
<b>In front:</b> ${top}<br>
<b>Others behind:</b>
<ul>
${rest.map( function (obj) { return `<li>${obj}</li>` } ).join('')}
</ul>
</div>
</template>
</html>