Skip to content

Commit

Permalink
fix(controlList): plante si controle sans dialog listable (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz authored Nov 26, 2024
1 parent 875f584 commit 7f079ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "geopf-extensions-openlayers",
"description": "French Geoportal Extensions for OpenLayers libraries",
"version": "1.0.0-beta.0-278",
"version": "1.0.0-beta.0-281",
"date": "25/11/2024",
"module": "src/index.js",
"directories": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ <h2>Ajout de tous les widgets</h2>
map.addControl(measureLength);

var measureArea = new ol.control.MeasureArea({
position : "top-left"
position : "top-left",
listable : true,
});
map.addControl(measureArea);

Expand Down
4 changes: 3 additions & 1 deletion src/packages/Controls/ControlList/ControlListDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ var ControlListDOM = {
divText.appendChild(spanTitle);
if (controlContainer.querySelector(".GPpanelTitle")) {
spanTitle.innerText = controlContainer.querySelector(".GPpanelTitle").innerText;
} else {
} else if (controlContainer.querySelector("[class^='gpf-btn-header-']")) {
spanTitle.innerText = controlContainer.querySelector("[class^='gpf-btn-header-']").title;
} else {
spanTitle.innerText = controlContainer.querySelector(".GPshowOpen").ariaLabel;
}
if (control.description) {
var spanDescription = document.createElement("span");
Expand Down

0 comments on commit 7f079ee

Please sign in to comment.