@canopy-iiif/app 1.5.13 → 1.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.5.13",
3
+ "version": "1.5.14",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
package/ui/dist/index.mjs CHANGED
@@ -3089,6 +3089,9 @@ var DEFAULT_TILE_LAYERS = [
3089
3089
  maxZoom: 19
3090
3090
  }
3091
3091
  ];
3092
+ var CUSTOM_MARKER_SIZE = 40;
3093
+ var CUSTOM_MARKER_RADIUS = CUSTOM_MARKER_SIZE / 2;
3094
+ var CUSTOM_MARKER_POPUP_OFFSET = -CUSTOM_MARKER_RADIUS + 6;
3092
3095
  function resolveGlobalLeaflet() {
3093
3096
  try {
3094
3097
  if (typeof globalThis !== "undefined" && globalThis.L) return globalThis.L;
@@ -3295,8 +3298,8 @@ function buildTileLayers(inputLayers, leaflet) {
3295
3298
  function buildMarkerIcon(marker, leaflet) {
3296
3299
  if (!leaflet) return null;
3297
3300
  const hasThumbnail = Boolean(marker && marker.thumbnail);
3298
- const size = 56;
3299
- const anchor = size / 2;
3301
+ const size = CUSTOM_MARKER_SIZE;
3302
+ const anchor = CUSTOM_MARKER_RADIUS;
3300
3303
  const html = hasThumbnail ? `<div class="canopy-map__marker-thumb"><img src="${escapeHtml(
3301
3304
  marker.thumbnail
3302
3305
  )}" alt="" loading="lazy" /></div>` : '<span class="canopy-map__marker-solid"></span>';
@@ -3305,7 +3308,7 @@ function buildMarkerIcon(marker, leaflet) {
3305
3308
  className: "canopy-map__marker",
3306
3309
  iconSize: [size, size],
3307
3310
  iconAnchor: [anchor, anchor],
3308
- popupAnchor: [0, -anchor + 10],
3311
+ popupAnchor: [0, CUSTOM_MARKER_POPUP_OFFSET],
3309
3312
  html
3310
3313
  });
3311
3314
  } catch (_) {
@@ -3314,8 +3317,8 @@ function buildMarkerIcon(marker, leaflet) {
3314
3317
  }
3315
3318
  function buildClusterOptions(leaflet) {
3316
3319
  if (!leaflet) return null;
3317
- const size = 56;
3318
- const anchor = size / 2;
3320
+ const size = CUSTOM_MARKER_SIZE;
3321
+ const anchor = CUSTOM_MARKER_RADIUS;
3319
3322
  return {
3320
3323
  chunkedLoading: true,
3321
3324
  iconCreateFunction: (cluster) => {