Skip to content

Commit 8526426

Browse files
committed
sadly I have to inform you that I included jQuery to lessen my burden...
1 parent 37de475 commit 8526426

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

comparator-control.js

+36-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,48 @@ L.Control.ComparatorControl = L.Control.extend({
33
//L.DomEvent.on();
44

55
var parent = L.DomUtil.create('div');
6-
parent.setAttribute("class","comp-control-parent");
6+
parent.setAttribute("class","comp-control-parent MenuContainer");
7+
8+
9+
var upContainer = L.DomUtil.create("div");
10+
upContainer.setAttribute("class","MenuRow");
711

812
this._root = L.DomUtil.create('div');
913
this._root.setAttribute("class","btn-group-vertical");
1014

11-
parent.appendChild(this._root);
15+
upContainer.appendChild(this._root);
16+
17+
var dwnContainer = L.DomUtil.create("div");
18+
dwnContainer.setAttribute("class","MenuRow");
19+
var loglinToggle = L.DomUtil.create("div");
20+
loglinToggle.setAttribute("class", "btn-group btn-group-toggle loglinToggle");
21+
22+
var logButton = L.DomUtil.create("label");
23+
logButton.setAttribute("class","btn btn-sm btn-secondary active toggleBtn");
24+
var logInput = L.DomUtil.create("input");
25+
logInput.setAttribute("type","checkbox");
26+
27+
logButton.innerHTML = "dB";
28+
29+
logButton.appendChild(logInput);
30+
31+
var linButton = L.DomUtil.create("label");
32+
linButton.setAttribute("class","btn btn-sm btn-secondary toggleBtn");
33+
var linInput = L.DomUtil.create("input");
34+
linInput.setAttribute("type","checkbox");
35+
linButton.innerHTML = "linear";
36+
37+
linButton.appendChild(linInput);
38+
39+
40+
loglinToggle.appendChild(logButton);
41+
loglinToggle.appendChild(linButton);
42+
dwnContainer.appendChild(loglinToggle);
1243

1344

45+
parent.appendChild(upContainer);
46+
parent.appendChild(dwnContainer);
47+
parent.appendChild(dwnContainer);
1448

1549
return parent;
1650
},

index.html

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
.comp-control-parent>.btn{
5151
opacity: 1;
5252
}
53+
.loglinToggle{
54+
border-top: 10px solid rgba(255, 255, 255, .8);
55+
width: 100%;
56+
}
57+
.toggleBtn{
58+
width: 50%;
59+
}
5360
</style>
5461

5562
</head>
@@ -84,6 +91,7 @@ <h6 class="card-subtitle mb-2 text-muted">Geographical Diff of WSJT Logfiles</h6
8491
</div>
8592

8693
<!-- debug -->
94+
<script src="jquery.js"></script>
8795
<script src="leaflet.js"></script>
8896
<script src="comparator-control.js"></script>
8997
<script src="cake-marker.js"></script>

0 commit comments

Comments
 (0)