Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone System Zoom and Focus Issue #865

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/SimpleMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
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"

Check warning on line 96 in src/components/SimpleMap.vue

View check run for this annotation

Codecov / codecov/patch

src/components/SimpleMap.vue#L96

Added line #L96 was not covered by tests
/>
<base-button
text=""
Expand All @@ -108,7 +108,7 @@
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"

Check warning on line 111 in src/components/SimpleMap.vue

View check run for this annotation

Codecov / codecov/patch

src/components/SimpleMap.vue#L111

Added line #L111 was not covered by tests
/>
</div>
<base-button
Expand All @@ -131,7 +131,7 @@
"
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"

Check warning on line 134 in src/components/SimpleMap.vue

View check run for this annotation

Codecov / codecov/patch

src/components/SimpleMap.vue#L134

Added line #L134 was not covered by tests
/>
<base-button
v-tooltip="{
Expand All @@ -153,7 +153,7 @@
emit('onZoomIncidentCenter');
}
"
class="w-8 h-8 border border-crisiscleanup-dark-100 my-1 bg-white shadow-xl text-crisiscleanup-dark-400"
class="w-12 h-12 border border-crisiscleanup-dark-100 my-1 bg-white shadow-xl text-crisiscleanup-dark-400"

Check warning on line 156 in src/components/SimpleMap.vue

View check run for this annotation

Codecov / codecov/patch

src/components/SimpleMap.vue#L156

Added line #L156 was not covered by tests
/>
<base-button
v-if="props.showMapLayerToggle"
Expand Down
1 change: 1 addition & 0 deletions src/components/tags/LanguageTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
},
setup(props) {
console.log(props.languageId)

Check warning on line 32 in src/components/tags/LanguageTag.vue

View check run for this annotation

Codecov / codecov/patch

src/components/tags/LanguageTag.vue#L32

Added line #L32 was not covered by tests

Check failure on line 32 in src/components/tags/LanguageTag.vue

View workflow job for this annotation

GitHub Actions / Lint 💅

Insert `;`
const { theme } = config;
const language = ref(null);
const styles = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/live/useLiveChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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;

Check warning on line 28 in src/hooks/live/useLiveChart.ts

View check run for this annotation

Codecov / codecov/patch

src/hooks/live/useLiveChart.ts#L28

Added line #L28 was not covered by tests
}

return 0;
Expand Down
16 changes: 9 additions & 7 deletions src/pages/phone/PhoneSystem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
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';
Expand Down Expand Up @@ -1489,21 +1489,23 @@
}

function zoomIn() {
mapUtils.value?.getMap().zoomIn();
mapUtils.value!.getMap().zoomIn();

Check warning on line 1492 in src/pages/phone/PhoneSystem.vue

View check run for this annotation

Codecov / codecov/patch

src/pages/phone/PhoneSystem.vue#L1492

Added line #L1492 was not covered by tests
}

function zoomOut() {
mapUtils.value?.getMap().zoomOut();
mapUtils.value!.getMap().zoomOut();
}

Check warning on line 1497 in src/pages/phone/PhoneSystem.vue

View check run for this annotation

Codecov / codecov/patch

src/pages/phone/PhoneSystem.vue#L1496-L1497

Added lines #L1496 - L1497 were not covered by tests

function fitLocation(location: Location) {
console.log(location)
mapUtils.value!.fitLocation(location);

Check warning on line 1501 in src/pages/phone/PhoneSystem.vue

View check run for this annotation

Codecov / codecov/patch

src/pages/phone/PhoneSystem.vue#L1499-L1501

Added lines #L1499 - L1501 were not covered by tests
}

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]];

Check warning on line 1508 in src/pages/phone/PhoneSystem.vue

View check run for this annotation

Codecov / codecov/patch

src/pages/phone/PhoneSystem.vue#L1508

Added line #L1508 was not covered by tests
}

function goToIncidentCenter() {
Expand Down
Loading