Skip to content

Commit 88b2028

Browse files
committed
test
1 parent 2f6d739 commit 88b2028

13 files changed

Lines changed: 93 additions & 78 deletions

File tree

docs/data/charts/map/MapZoomControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function isConicProjection(projection) {
6767
);
6868
}
6969

70-
export default function MapZoomOptions() {
70+
export default function MapZoomControl() {
7171
const [projection, setProjection] = React.useState('naturalEarth1');
7272
const apiRef = useChartPremiumApiRef();
7373

docs/data/charts/map/ProjectionMapShape.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export default function ProjectionMapShape() {
108108
<ChartsGeoDataProviderPremium
109109
geoData={isConicProjection(projection) ? USAStates : countries}
110110
projection={projection}
111-
{...(!autoRotation && { rotate: rotation })}
112-
{...(!autoTranslation && { translate: translation })}
113-
{...(!autoScale && { scale })}
111+
// {...(!autoRotation && { rotate: rotation })}
112+
// {...(!autoTranslation && { translate: translation })}
113+
// {...(!autoScale && { scale })}
114114
zoom={{ rotationAllowed: 'long', translationAllowed: 'both' }}
115115
height={360}
116116
>

docs/data/charts/map/ZoomMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function ZoomMap() {
5454
min: 0,
5555
max: 100,
5656
color: ['#e3f2fd', '#0d47a1'],
57-
unownedColor: '#f5f5f5',
57+
unknownColor: '#f5f5f5',
5858
},
5959
},
6060
]}

docs/data/charts/map/ZoomMap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function ZoomMap() {
5757
min: 0,
5858
max: 100,
5959
color: ['#e3f2fd', '#0d47a1'],
60-
unownedColor: '#f5f5f5',
60+
unknownColor: '#f5f5f5',
6161
},
6262
},
6363
]}

packages/x-charts-premium/src/ChartsGeoDataProviderPremium/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ export {
1010
GEO_PREMIUM_PLUGINS,
1111
type GeoPremiumPluginSignatures,
1212
} from './ChartsGeoDataProviderPremium.plugins';
13-
export type { MapZoomOptions } from '../internals/plugins/useGeoProjectionZoom/useGeoProjectionZoom.types';
14-
export type { MapZoomView } from '../internals/plugins/useGeoProjectionZoom/mapZoom.utils';
13+
export type {
14+
MapZoomView,
15+
MapZoomOptions,
16+
} from '../internals/plugins/useGeoProjectionZoom/useGeoProjectionZoom.types';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { type useGeoProjectionTypes } from '@mui/x-charts/internals';
22

3-
export type UseGeoProjectionSignature = useGeoProjectionTypes.UseGeoProjectionSignature;
3+
export type UseGeoProjectionSignature = useGeoProjectionTypes.UseGeoProjectionSignature;
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
export { useGeoProjectionZoom } from './useGeoProjectionZoom';
2-
export type {
3-
UseGeoProjectionZoomSignature,
4-
UseGeoProjectionZoomParameters,
5-
UseGeoProjectionZoomInstance,
6-
UseGeoProjectionZoomPublicApi,
7-
} from './useGeoProjectionZoom.types';
8-
export type { MapZoomView } from './mapZoom.utils';
2+
export type { UseGeoProjectionZoomSignature, MapZoomView } from './useGeoProjectionZoom.types';

packages/x-charts-premium/src/internals/plugins/useGeoProjectionZoom/mapZoom.utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { type GeoProjection } from '@mui/x-charts-vendor/d3-geo';
22
import { type ChartUsedStore, selectorChartDrawingArea } from '@mui/x-charts/internals';
33
import type { MapRotationAxis, MapTranslationAxis } from './useGeoProjectionZoom.types';
44

5-
65
const DEG = Math.PI / 180;
76
const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));
87

packages/x-charts-premium/src/internals/plugins/useGeoProjectionZoom/useGeoProjectionZoom.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ import type {
1414
MapTranslationAxis,
1515
MapRotationAxis,
1616
MapZoomView,
17-
UseGeoProjectionZoomSignature
17+
UseGeoProjectionZoomSignature,
1818
} from './useGeoProjectionZoom.types';
19-
import {
20-
getRotation,
21-
getTranslation,
22-
} from './mapZoom.utils';
19+
import { getRotation, getTranslation } from './mapZoom.utils';
2320

2421
/** Multiplicative zoom step applied per wheel tick. */
2522
const WHEEL_ZOOM_STEP = 1.1;
@@ -47,7 +44,6 @@ export const useGeoProjectionZoom: ChartPlugin<UseGeoProjectionZoomSignature> =
4744
[store],
4845
);
4946

50-
5147
// The view is the source of truth, stored directly: no pixel <-> view conversion on write/read.
5248
const applyView = React.useCallback(
5349
(newView: MapZoomView) => {
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import type { useGeoProjectionZoomTypes } from "@mui/x-charts/internals";
1+
import type { useGeoProjectionZoomTypes } from '@mui/x-charts/internals';
22

3-
4-
export type UseGeoProjectionZoomSignature = useGeoProjectionZoomTypes.UseGeoProjectionZoomSignature
3+
export type UseGeoProjectionZoomSignature = useGeoProjectionZoomTypes.UseGeoProjectionZoomSignature;
54

65
export type MapRotationAxis = useGeoProjectionZoomTypes.MapRotationAxis;
76
export type MapTranslationAxis = useGeoProjectionZoomTypes.MapTranslationAxis;
87

9-
export interface MapZoomView extends useGeoProjectionZoomTypes.MapZoomView { };
10-
export interface MapZoomOptions extends useGeoProjectionZoomTypes.MapZoomOptions { };
8+
export interface MapZoomView extends useGeoProjectionZoomTypes.MapZoomView {}
9+
export interface MapZoomOptions extends useGeoProjectionZoomTypes.MapZoomOptions {}

0 commit comments

Comments
 (0)