Skip to content

Commit

Permalink
Hammer zoom (#746)
Browse files Browse the repository at this point in the history
* Change zoom to 0.5

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fixing default zoom values from app-events

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth authored Aug 25, 2023
1 parent 58db1e9 commit f903af6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/dashboard/src/components/app-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export const AppEvents = {
refreshAlertCount: new Subject<number>(),
alertListOpenedAlert: new Subject<Alert | null>(),
disabledLayers: new ReplaySubject<Record<string, boolean>>(),
zoom: new BehaviorSubject<number>(5),
zoom: new BehaviorSubject<number>(0.5),
mapCenter: new BehaviorSubject<[number, number]>([0, 0]),
};
2 changes: 1 addition & 1 deletion packages/dashboard/src/components/map-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const MapApp = styled(
const [imageUrl, setImageUrl] = React.useState<string | null>(null);
const [bounds, setBounds] = React.useState<L.LatLngBoundsLiteral | null>(null);
const [center, setCenter] = React.useState<L.LatLngTuple>([0, 0]);
const [zoom, setZoom] = React.useState<number>(5);
const [zoom, setZoom] = React.useState<number>(0.5);

React.useEffect(() => {
const sub = AppEvents.zoom.subscribe((currentValue) => {
Expand Down

0 comments on commit f903af6

Please sign in to comment.