Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for l-pane custom element #22

Merged
merged 7 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove console.logs
  • Loading branch information
andrewgryan committed Jul 12, 2024
commit 64e63017bf6a53e40734a5ed984624c4f8155566
1 change: 1 addition & 0 deletions docs/content/articles/panes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This tutorial illustrates how to make effective use of Leaflet panes.
<l-geojson id="countries"></l-geojson>
</l-map>

<script type="text/javascript" src="/leaflet-html/panes/eu-countries.js"></script>
<script type="text/javascript" src="/panes/eu-countries.js"></script>
<script>
document.getElementById("countries").setAttribute("geojson", JSON.stringify(euCountries))
Expand Down
2 changes: 0 additions & 2 deletions src/l-image-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class LImageOverlay extends LLayer {
}

connectedCallback() {

const url = this.getAttribute("url");
if (url === null) {
console.warn("attribute 'url' not set");
Expand All @@ -27,7 +26,6 @@ class LImageOverlay extends LLayer {
opacity: parseFloat(this.getAttribute("opacity") || "1.0"),
alt: this.getAttribute("alt") || "",
};

this.layer = imageOverlay(url, JSON.parse(bounds), options);
this.dispatchEvent(
new CustomEvent(layerConnected, {
Expand Down
3 changes: 1 addition & 2 deletions src/l-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ class LMap extends HTMLElement {

// Observe l-pane
this.addEventListener(paneConnected, (ev) => {
const { name, el } = ev.detail
console.log("create pane: ", { name })
const { name } = ev.detail
this.map.createPane(name)
})

Expand Down
1 change: 0 additions & 1 deletion src/l-tile-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class LTileLayer extends LLayer {
})
const options = parse(schema, this)
this.layer = tileLayer(urlTemplate, { ...templateOptions, ...paneOptions, ...options });
console.log(this.layer)
const event = new CustomEvent(layerConnected, {
detail: { name, layer: this.layer },
bubbles: true,
Expand Down