Skip to content

Commit

Permalink
Merge pull request #257 from IGNF/fix/248-scalebar-over-tooltip
Browse files Browse the repository at this point in the history
fix(scalebar): surcharge ol pour passer l'echelle sous les tooltips
  • Loading branch information
elias75015 authored Nov 15, 2024
2 parents fc7ccce + 8ccbea4 commit 851bb76
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "geopf-extensions-openlayers",
"description": "French Geoportal Extensions for OpenLayers libraries",
"version": "1.0.0-beta.0-251",
"date": "05/11/2024",
"version": "1.0.0-beta.0-257",
"date": "14/11/2024",
"module": "src/index.js",
"directories": {},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ <h2>Ajout de tous les widgets</h2>

{{#content "js"}}
<script type="text/javascript">

const scaleControl = new ol.control.ScaleLine({
units: 'metric',
bar: true,
steps: 4,
text: true,
minWidth: 140,
});
var createMap = function () {
// on cache l'image de chargement du Géoportail.
document.getElementById("map").style.backgroundImage = "none";
Expand All @@ -88,6 +94,9 @@ <h2>Ajout de tous les widgets</h2>
})
});


map.addControl(scaleControl);

var catalog = new ol.control.Catalog({
draggable: true,
position : "top-left"
Expand Down
5 changes: 5 additions & 0 deletions src/packages/CSS/DSFRgeneralWidget.css
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
border-bottom: 1px dotted #666;
}

/* surcharge css OpenLayers */
.ol-disabled {
--idle: transparent;
--hover: var(--background-disabled-grey-hover);
Expand All @@ -519,6 +520,10 @@
display: block;
}

.ol-scale-bar, .ol-scale-line {
z-index: -1;
}

/* surcharge DSFR pour coller aux règles et au rendu de https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants/accordeon/ */
/* FIXME: pourquoi on a besoin de faire ça ?? normalement ces règles devraient être importées avec le reste... */
.fr-collapse {
Expand Down

0 comments on commit 851bb76

Please sign in to comment.