Skip to content

Commit

Permalink
Merge branch 'release/2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gsarig committed Mar 26, 2023
2 parents 7bff82c + f6d55c6 commit 0e2257a
Show file tree
Hide file tree
Showing 79 changed files with 1,696 additions and 693 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}

.ootb_info {
grid-row-end: 5;
grid-row-end: 8;
grid-row-start: 1;
grid-column-start: 2;
}
Expand Down
14 changes: 12 additions & 2 deletions assets/ootb-openstreetmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

const providers = ootb.providers;
const options = ootb.options;
const gestureHandlingOptions = ootb.gestureHandlingOptions;
const maps = document.querySelectorAll('.ootb-openstreetmap--map');
maps.forEach(renderMap);

Expand Down Expand Up @@ -33,10 +34,19 @@
apiKey = options.api_mapbox;
}

const map = L.map(osmap, {
const mapOptions = {
minZoom: parseInt(minZoom),
maxZoom: parseInt(maxZoom),
}).setView(JSON.parse(bounds), parseInt(zoom));
};

if (options.prevent_default_gestures) {
mapOptions.gestureHandling = true;
if (gestureHandlingOptions && Object.keys(gestureHandlingOptions).length > 0) {
mapOptions.gestureHandlingOptions = gestureHandlingOptions;
}
}

const map = L.map(osmap, mapOptions).setView(JSON.parse(bounds), parseInt(zoom));

// Set the rest of the map options
if ('false' === dragging) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.leaflet-gesture-handling:after {
color: #fff;
font-family: Roboto, Arial, sans-serif;
font-size: 22px;
justify-content: center;
display: flex;
align-items: center;
padding: 15px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, .5);
z-index: 1001;
pointer-events: none;
text-align: center;
transition: opacity .8s ease-in-out;
opacity: 0;
content: ""
}

.leaflet-gesture-handling-warning:after {
transition-duration: .3s;
opacity: 1
}

.leaflet-gesture-handling-touch:after {
content: attr(data-gesture-handling-touch-content)
}

.leaflet-gesture-handling-scroll:after {
content: attr(data-gesture-handling-scroll-content)
}
315 changes: 315 additions & 0 deletions assets/vendor/leaflet-gesture-handling/leaflet-gesture-handling.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e2257a

Please sign in to comment.