-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
153 lines (149 loc) · 4.81 KB
/
index.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script defer src="bundle.js"></script>
</head>
<body>
<main>
<div id="vue-app">
<div id="hamburger-button" v-if="graphOptionsIsHidden">
<button @click="toggleHidden()">☰</button>
</div>
<div class="side-container" v-else>
<button id="hide" @click="toggleHidden()" class="hide-show-button">
X
</button>
<h2>Graph</h2>
<br />
<label for="graphtype-select">Graph Type:</label>
<select
name="graphtype-select"
id="graphtype-select"
v-model="graphOptions.type"
>
<option value="AdjList">Adjacency List</option>
<option value="EdgeList">Edge List</option>
<option value="AdjMatrix">Adjacency Matrix</option>
</select>
<label id="help-icon">?</label>
<p class="help-box">
<strong>Help</strong>
<a v-bind:href="link">Github Readme</a>
<br />
{{graphHelp}}
</p>
<br />
<div :class="{ dimmed: graphOptions.type == 'AdjMatrix' }">
<label for="weighted-checkbox">Weighted:</label>
<input
type="checkbox"
name="weighted-checkbox"
id="weighted-checkbox"
v-model="graphOptions.weighted"
/>
</div>
<div
:class="{ dimmed: graphOptions.type == 'AdjMatrix' || graphOptions.type == 'AdjList' }"
>
<label for="bidirectional-checkbox"> Bi-directional: </label>
<input
type="checkbox"
v-model="graphOptions.bidirectional"
name="bidirectional-checkbox"
id="bidirectional-checkbox"
/>
</div>
<span>Starting index:</span>
<input
type="radio"
id="zero-indexed-radio"
value="0"
v-model="proxyStartingIndex"
/>
<label for="zero-indexed-radio">0</label>
<input
type="radio"
id="one-indexed-radio"
value="1"
v-model="proxyStartingIndex"
/>
<label for="one-indexed-radio">1</label>
<label for="graph-text">Input:</label>
<textarea
name="graph-text"
id="graph-text"
cols="30"
rows="10"
v-model="graphText"
></textarea>
<button @click="updateGraph">Apply</button>
</div>
<br />
<div id="hamburger-button" v-if="displayIsHidden">
<button
id="show-display"
@click="toggleDisplayHidden()"
class="hide-show"
>
☰
</button>
</div>
<div class="side-container" style="margin-top: 30px" v-else>
<button @click="toggleDisplayHidden()" class="hide-show">X</button>
<h2>Display</h2>
<fieldset>
<div :class="{ dimmed: isUnweighted }">
<label for="thickness-checkbox"
>Show weight with thickness:</label
>
<input
type="checkbox"
v-model="edgeDisplayOptions.showThickness"
id="thickness-checkbox"
:disabled="isUnweighted"
/>
</div>
<br />
<div :class="{ dimmed: edgeDisplayOptions.showThickness }">
<label for="thickness-length">Default Thickness: </label>
<input
type="range"
min="1"
max="50"
id="thickness-length"
v-model="edgeDisplayOptions.thickness"
:disabled="edgeDisplayOptions.showThickness"
/>
</div>
</fieldset>
<fieldset>
<div :class="{ dimmed: isUnweighted }">
<label for="length-checkbox">Show weight with length:</label>
<input
type="checkbox"
name="length-checkbox"
v-model="edgeDisplayOptions.showLength"
id="length-checkbox"
:disabled="isUnweighted"
/>
</div>
<br />
<div :class="{ dimmed: edgeDisplayOptions.showLength }">
<label for="Edge-length">Default Edge Length: </label>
<input
type="range"
min="1"
max="500"
name="edge-length"
id="edge-length"
v-model="edgeDisplayOptions.length"
:disabled="edgeDisplayOptions.showLength"
/>
</div>
</fieldset>
</div>
</div>
</main>
</body>
</html>