Skip to content

Commit

Permalink
css: smart align any leaflet control (not only zoom control / zoom sl…
Browse files Browse the repository at this point in the history
…ider)

N.B.: L.Control.Pan.ie.css: smart align attempt removed (who cares about IE<9 today)
  • Loading branch information
johndoe committed Mar 19, 2019
1 parent 88a50d2 commit 80f31b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
25 changes: 9 additions & 16 deletions src/L.Control.Pan.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,20 @@
should make all the child boxes be center-aligned instead.
Not sure if that is possible though.
*/
.leaflet-left.has-leaflet-pan-control .leaflet-control-zoom {
position: relative;
left: 24px;
.leaflet-left.has-leaflet-pan-control .leaflet-control {
left: 24px
}
.leaflet-right.has-leaflet-pan-control .leaflet-control-zoom {
position: relative;

.leaflet-right.has-leaflet-pan-control .leaflet-control {
right: 24px;
}

/*
Make the zoomSlider control
(https://github.com/mattiasbengtsson/Leaflet.zoomslider)
align with the pan control.
*/
.leaflet-left.has-leaflet-pan-control .leaflet-control-zoomslider {
position: relative;
left: 22px;
.leaflet-left .leaflet-control.leaflet-control-pan {
left: 0
}
.leaflet-right.has-leaflet-pan-control .leaflet-control-zoomslider {
position: relative;
right: 22px;

.leaflet-right .leaflet-control.leaflet-control-pan {
right: 0
}

.leaflet-control-pan {
Expand Down
8 changes: 0 additions & 8 deletions src/L.Control.Pan.ie.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,3 @@
left:27px;
top:54px;
}

.leaflet-control-zoom {
left:23px;
}
.leaflet-control-zoomslider {
position: relative;
left:23px;
}

0 comments on commit 80f31b8

Please sign in to comment.