- npm updates, remove rxjs
- add draw.component.vue - only load needed leaflet classes into map.component.vue an Submitter/Create.vue - rename js/store.Map.ts to js/Stores/map.service.ts -
This commit is contained in:
parent
cd66f318b6
commit
a744ae7e5b
19 changed files with 683 additions and 275 deletions
|
@ -24,7 +24,7 @@ export const MapService = defineStore('map', {
|
|||
}
|
||||
},
|
||||
|
||||
getMap(id: string): L.Map {
|
||||
getMap(id: string) {
|
||||
return this.mapService.get(id);
|
||||
},
|
||||
|
37
resources/js/Stores/time.service.ts
Normal file
37
resources/js/Stores/time.service.ts
Normal file
|
@ -0,0 +1,37 @@
|
|||
import { defineStore } from 'pinia';
|
||||
// import axios from 'axios';
|
||||
// import dayjs from 'dayjs';
|
||||
|
||||
export const TimeService = defineStore('map', {
|
||||
state: () => ({
|
||||
// dataset: {} as Dataset,
|
||||
mapService: new Map<string, any>(),
|
||||
}),
|
||||
actions: {
|
||||
|
||||
getMap(id: string) {
|
||||
return this.mapService.get(id);
|
||||
},
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
|
||||
},
|
||||
|
||||
hasMap(id: string): boolean {
|
||||
return this.mapService.has(id);
|
||||
},
|
||||
|
||||
deleteMap(id: string): boolean {
|
||||
return this.mapService.delete(id);
|
||||
},
|
||||
|
||||
// getDuration(timespan: Timespan): dayjs. {
|
||||
// const from = dayjs(timespan.from);
|
||||
// const to = dayjs(timespan.to);
|
||||
// return dayjs.duration(to.diff(from));
|
||||
// },
|
||||
|
||||
|
||||
},
|
||||
});
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue