Skip to content

Commit

Permalink
[BUILD]
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Dec 5, 2024
1 parent 04d355a commit cb99036
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 17 deletions.
26 changes: 23 additions & 3 deletions dist/ol-ext.css
Original file line number Diff line number Diff line change
Expand Up @@ -6377,15 +6377,23 @@ ul.ol-legend li div {
}
.ol-ext-toggle-switch input[type="radio"],
.ol-ext-toggle-switch input[type="checkbox"] {
display: none;
/* display: none; */
opacity: 0;
width: 0;
height: 0;
margin: 0;
padding: 0;
display: inline-block;
}
.ol-ext-toggle-switch span {
color: rgba(0,60,136,.5);
position: relative;
cursor: pointer;
background-color: #ccc;
-webkit-transition: .4s, background-color 0s, border-color 0s;
transition: .4s, background-color 0s, border-color 0s;
-webkit-transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;
transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;
transition: .4s, background-color 0s, border-color 0s, box-shadow 0s;
transition: .4s, background-color 0s, border-color 0s, box-shadow 0s, -webkit-box-shadow 0s;
width: 1.6em;
height: 1em;
display: inline-block;
Expand Down Expand Up @@ -6439,6 +6447,9 @@ ul.ol-legend li div {
cursor: pointer;
height: 0;
width: 0;
margin: 0;
padding: 0;
display: inline-block;
}
.ol-ext-check span {
color: rgba(0,60,136,.5);
Expand Down Expand Up @@ -6490,6 +6501,15 @@ ul.ol-legend li div {
background-color: currentColor;
}

/* focus */
.ol-ext-toggle-switch input:focus-visible + span {
-webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);
box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);
}
.ol-ext-check input:focus-visible + span {
-webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);
box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);
}
.ol-collection-list {
margin: 0;
padding: 0;
Expand Down
31 changes: 19 additions & 12 deletions dist/ol-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -8152,6 +8152,10 @@ ol.control.Dialog = class olcontrolDialog extends ol.control.Control {
/** Close the dialog
*/
hide() {
// Remove focus on dialog
if (document.activeElement && document.activeElement !== document.body) {
document.activeElement.blur();
}
this.element.classList.remove('ol-visible');
this.element.setAttribute('aria-hidden', true)
this.dispatchEvent({ type: 'hide' });
Expand Down Expand Up @@ -16032,10 +16036,11 @@ ol.control.SearchGPS = class olcontrolSearchGPS extends ol.control.Search {
html: 'decimal',
after: 'DMS',
change: function (e) {
if (e.target.checked)
if (e.target.checked) {
this.element.classList.add('ol-dms');
else
} else {
this.element.classList.remove('ol-dms');
}
}.bind(this),
parent: this.element
});
Expand Down Expand Up @@ -16076,16 +16081,18 @@ ol.control.SearchGPS = class olcontrolSearchGPS extends ol.control.Search {
this._input.value = '';
}
if (!e.target.classList.contains('ol-dms')) {
var s = ol.coordinate.toStringHDMS([Number(lon.value), Number(lat.value)]);
var c = s.replace(/(N|S|E|W)/g, '').split('″');
c[1] = c[1].trim().split(' ');
lond.value = (/W/.test(s) ? -1 : 1) * parseInt(c[1][0]);
lonm.value = parseInt(c[1][1]);
lons.value = parseInt(c[1][2]);
c[0] = c[0].trim().split(' ');
latd.value = (/W/.test(s) ? -1 : 1) * parseInt(c[0][0]);
latm.value = parseInt(c[0][1]);
lats.value = parseInt(c[0][2]);
var s = ol.coordinate.toStringHDMS([Number(lon.value) || 0, Number(lat.value) || 0]);
var c = s.replace(/(N|S)/g,'-').replace(/(E|W)/g, '').split('-');
try {
c[1] = c[1].trim().split(' ');
lond.value = (/W/.test(s) ? -1 : 1) * parseInt(c[1][0]);
lonm.value = parseInt(c[1][1] || 0);
lons.value = parseInt(c[1][2] || 0);
c[0] = c[0].trim().split(' ');
latd.value = (/S/.test(s) ? -1 : 1) * parseInt(c[0][0]);
latm.value = parseInt(c[0][1] || 0);
lats.value = parseInt(c[0][2] || 0);
} catch(e) { /* oops */ }
}
this.search();
}.bind(this);
Expand Down
2 changes: 1 addition & 1 deletion dist/ol-ext.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ol-ext.min.js

Large diffs are not rendered by default.

0 comments on commit cb99036

Please sign in to comment.