diff --git a/src/components/SimpleMap.vue b/src/components/SimpleMap.vue index cef74d7a1..51f5d2f17 100644 --- a/src/components/SimpleMap.vue +++ b/src/components/SimpleMap.vue @@ -93,7 +93,7 @@ watch(showingLegend, async (newValue) => { emit('onZoomIn'); } " - class="w-8 h-8 border-crisiscleanup-dark-100 border-t border-l border-r bg-white shadow-xl text-xl text-crisiscleanup-dark-400" + class="my-2 w-12 h-12 border-crisiscleanup-dark-100 border-t border-l border-r bg-white shadow-xl text-xl text-crisiscleanup-dark-400" /> { emit('onZoomOut'); } " - class="w-8 h-8 border border-crisiscleanup-dark-100 bg-white shadow-xl text-xl text-crisiscleanup-dark-400" + class="w-12 h-12 border border-crisiscleanup-dark-100 bg-white shadow-xl text-xl text-crisiscleanup-dark-400" /> { " icon="tree" icon-size="lg" - class="w-8 h-8 border my-1 border-crisiscleanup-dark-100 bg-white shadow-xl text-crisiscleanup-dark-400" + class="w-12 h-12 border my-1 border-crisiscleanup-dark-100 bg-white shadow-xl text-crisiscleanup-dark-400" /> { diff --git a/src/hooks/live/useLiveChart.ts b/src/hooks/live/useLiveChart.ts index c64e3c635..50eff444d 100644 --- a/src/hooks/live/useLiveChart.ts +++ b/src/hooks/live/useLiveChart.ts @@ -25,7 +25,7 @@ export default function useLiveChart( function getHeight() { const chartContainer = d3.select(`#${chartId}`); if (chartContainer) { - return Number(chartContainer.style('height').slice(0, -2)) || 0; + return Number(chartContainer.style('height')?.slice(0, -2)) || 0; } return 0; diff --git a/src/pages/phone/PhoneSystem.vue b/src/pages/phone/PhoneSystem.vue index 63c9d9045..2ed84df76 100644 --- a/src/pages/phone/PhoneSystem.vue +++ b/src/pages/phone/PhoneSystem.vue @@ -776,7 +776,7 @@ import { INTERACTIVE_ZOOM_LEVEL, } from '@/constants'; import { averageGeolocation } from '@/utils/map'; -import type { MapUtils } from '@/hooks/worksite/useLiveMap'; +import type { MapUtils } from '@/hooks/worksite/useWorksiteMap'; import { useCurrentUser } from '@/hooks'; import PhoneOverlay from '@/components/phone/PhoneOverlay.vue'; import useAcl from '@/hooks/useAcl'; @@ -1489,21 +1489,23 @@ export default defineComponent({ } function zoomIn() { - mapUtils.value?.getMap().zoomIn(); + mapUtils.value!.getMap().zoomIn(); } function zoomOut() { - mapUtils.value?.getMap().zoomOut(); + mapUtils.value!.getMap().zoomOut(); + } + + function fitLocation(location: Location) { + console.log(location) + mapUtils.value!.fitLocation(location); } function getIncidentCenter() { const { incident_center } = Incident.find( currentIncidentId.value, ) as Incident; - if (incident_center) { - return [incident_center.coordinates[1], incident_center.coordinates[0]]; - } - return [35.746_512_259_918_5, -96.411_509_631_256_56]; + return [incident_center.coordinates[1], incident_center.coordinates[0]]; } function goToIncidentCenter() {