Set borders and spacing for control groups directly in js
Previous stylesheet code is more complicated.
This commit is contained in:
parent
7904b49bb1
commit
6acb032d4c
2 changed files with 8 additions and 19 deletions
|
@ -109,8 +109,14 @@ $(document).ready(function () {
|
||||||
control.addTo(map);
|
control.addTo(map);
|
||||||
});
|
});
|
||||||
|
|
||||||
var lastContainer = controls[controls.length -1].getContainer();
|
var firstContainer = controls[0].getContainer();
|
||||||
$(lastContainer).addClass("leaflet-control-group-end");
|
$(firstContainer).find(".control-button").first()
|
||||||
|
.css("border-start-start-radius", "4px");
|
||||||
|
|
||||||
|
var lastContainer = controls[controls.length - 1].getContainer();
|
||||||
|
$(lastContainer).find(".control-button").last()
|
||||||
|
.css("margin-bottom", "10px")
|
||||||
|
.css("border-end-start-radius", "4px");
|
||||||
}
|
}
|
||||||
|
|
||||||
addControlGroup([
|
addControlGroup([
|
||||||
|
|
|
@ -381,23 +381,6 @@ body.small-nav {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-control-group-end + .leaflet-control {
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control:first-child,
|
|
||||||
.leaflet-control-group-end + .leaflet-control {
|
|
||||||
&.control-button, .control-button:first-child {
|
|
||||||
border-start-start-radius: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-control-group-end {
|
|
||||||
&.control-button, .control-button:last-child {
|
|
||||||
border-end-start-radius: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Rules for the sidebar and main map area */
|
/* Rules for the sidebar and main map area */
|
||||||
|
|
||||||
.map-layout {
|
.map-layout {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue