dbf-mirador 4.5.2 → 4.5.4
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/dist/mirador.es.js +2539 -2429
- package/dist/mirador.es.js.map +1 -1
- package/dist/mirador.min.js +73 -73
- package/dist/mirador.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MapViewer.jsx +18 -2
- package/src/plugins/fillView.ts +46 -0
- package/src/plugins/mapInteractionPlugin.tsx +8 -92
- package/src/plugins/nestedMapPlugin.tsx +91 -3
- package/src/plugins/poiPreviewPlugin.tsx +198 -30
- package/src/plugins/siteMapToolsPlugin.tsx +10 -8
- package/src/plugins/sitePanelState.ts +17 -1
- package/src/plugins/sitePins.ts +38 -17
- package/src/plugins/tourOrder.ts +8 -0
package/src/plugins/tourOrder.ts
CHANGED
|
@@ -46,3 +46,11 @@ export const getTourPois = <T extends OrderedAnnotation>(items: T[]): T[] => {
|
|
|
46
46
|
|
|
47
47
|
return topLevel.flatMap((item) => (item['dbf:kind'] === 'Journey' ? stopsOf(item.id) : [item]));
|
|
48
48
|
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Each POI's number in the tour, from 1: what every pin and journey card shows on a map that
|
|
52
|
+
* numbers all its POIs (MapViewer's `numberPins`, AlMadar-Digital/platform#549), rather than each
|
|
53
|
+
* journey's stops alone.
|
|
54
|
+
*/
|
|
55
|
+
export const getTourNumbers = <T extends OrderedAnnotation>(items: T[]): Map<string, number> =>
|
|
56
|
+
new Map(getTourPois(items).map((poi, index) => [poi.id, index + 1]));
|