Skip to content

Commit

Permalink
Cleanup vendored code
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Feb 9, 2025
1 parent 49c5051 commit 3a526b9
Show file tree
Hide file tree
Showing 8 changed files with 423 additions and 1,815 deletions.
22 changes: 12 additions & 10 deletions site/assets/js/details.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/* eslint-disable no-undef */
const openDetailsOnLoad = () => {
const target = window.location.hash,
// eslint-disable-next-line sort-vars
elTarget = document.querySelector(target);
const openDetailsOnLoad = function openDetailsOnLoad() {
const target = window.location.hash;
let qTarget = null;
if (target) {
qTarget = document.querySelector(target);
}

if (!elTarget) { return; }
let elDetails = elTarget.closest("details");
while (elDetails) {
if (elDetails.matches("details")) { elDetails.open = true; }
elDetails = elDetails.parentElement;
if (!qTarget) { return; }
let qDetails = qTarget.closest("details");
while (qDetails) {
if (qDetails.matches("details")) { qDetails.open = true; }
qDetails = qDetails.parentElement;
}

// Scroll to the target element
elTarget.scrollIntoView();
qTarget.scrollIntoView();
};

window.addEventListener("load", openDetailsOnLoad);
4 changes: 3 additions & 1 deletion site/assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/* eslint-disable class-methods-use-this */
import { asyncBufferFromUrl, byteLengthFromUrl, parquetMetadataAsync, parquetRead } from "hyparquet";
import { compressors } from "hyparquet-compressors";
import maplibregl from "maplibre-gl";
import { Protocol } from "pmtiles";

const TIMES_DEFAULT_MODE = "car",
TIMES_GEOGRAPHY = "tract",
Expand Down Expand Up @@ -245,7 +247,7 @@ class Map {
}

init() {
const protocol = new pmtiles.Protocol();
const protocol = new Protocol();
maplibregl.addProtocol("pmtiles", protocol.tile);

this.map = new maplibregl.Map({
Expand Down
59 changes: 0 additions & 59 deletions site/assets/vendor/maplibre-gl-4.7.0.min.js

This file was deleted.

Loading

0 comments on commit 3a526b9

Please sign in to comment.