Small preact-based (like React.js) project https://inga-lovinde.github.io/static/komoot-demo/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
955 B

import { Coordinates, Waypoint } from '../shared/types';
export type Marker = Waypoint & {
key: string;
remove: () => void;
moveUp: () => void;
moveDown: () => void;
changeLongLabel: (newLongLabel: string) => void;
/**
* Should be at most 1-2 characters (to be displayed on map markers), can change at any time
*/
shortLabel: string;
/**
* Displayed in the list, should only change when explicitly requested by user
*/
longLabel: string;
};
export type ReorderMarkersParams = {
oldIndex: number;
newIndex: number;
};
export type MarkersProps = {
markers: Marker[];
onMarkersReorder: (params: ReorderMarkersParams) => void;
};
export type MapProps = {
markers: Marker[];
onMapClick: (coordinates: Coordinates) => void;
};
export type ExportProps = {
markers: Marker[];
};
export type MarkerProps = {
marker: Marker;
isFirst: boolean;
isLast: boolean;
};