Skip to content

Commit 1cdb254

Browse files
committed
prettier
1 parent fd0e2ff commit 1cdb254

7 files changed

Lines changed: 27 additions & 24 deletions

File tree

packages/x-charts-pro/src/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,35 +87,35 @@ type WheelInteraction = Unpack<
8787
{
8888
type: 'wheel';
8989
} & NoModeProp &
90-
AllKeysProp
90+
AllKeysProp
9191
>;
9292

9393
type PinchInteraction = Unpack<
9494
{
9595
type: 'pinch';
9696
} & NoModeProp &
97-
NoKeysProp
97+
NoKeysProp
9898
>;
9999

100100
type DragInteraction = Unpack<
101101
{
102102
type: 'drag';
103103
} & AllModeProp &
104-
AllKeysProp
104+
AllKeysProp
105105
>;
106106

107107
type TapAndDragInteraction = Unpack<
108108
{
109109
type: 'tapAndDrag';
110110
} & AllModeProp &
111-
AllKeysProp
111+
AllKeysProp
112112
>;
113113

114114
type PressAndDragInteraction = Unpack<
115115
{
116116
type: 'pressAndDrag';
117117
} & AllModeProp &
118-
AllKeysProp
118+
AllKeysProp
119119
>;
120120

121121
type WheelPanInteraction = Unpack<
@@ -130,21 +130,21 @@ type WheelPanInteraction = Unpack<
130130
*/
131131
allowedDirection?: 'x' | 'y' | 'xy';
132132
} & NoModeProp &
133-
AllKeysProp
133+
AllKeysProp
134134
>;
135135

136136
type DoubleTapResetInteraction = Unpack<
137137
{
138138
type: 'doubleTapReset';
139139
} & AllModeProp &
140-
AllKeysProp
140+
AllKeysProp
141141
>;
142142

143143
type BrushInteraction = Unpack<
144144
{
145145
type: 'brush';
146146
} & AllModeProp &
147-
AllKeysProp
147+
AllKeysProp
148148
>;
149149

150150
export type AnyInteraction = {

packages/x-charts-pro/src/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const useZoomOnPinch = (
2828

2929
const isZoomOnPinchEnabled: boolean = Object.keys(optionsLookup).length > 0 && Boolean(config);
3030

31-
3231
usePinchGesture(instance, {
3332
enabled: isZoomOnPinchEnabled,
3433
requiredKeys: config?.requiredKeys,
@@ -58,5 +57,4 @@ export const useZoomOnPinch = (
5857
});
5958
},
6059
});
61-
6260
};

packages/x-charts-pro/src/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ export const useZoomOnWheel = (
5353

5454
return { axisId: zoom.axisId, start: newMinRange, end: newMaxRange };
5555
});
56-
})
57-
}
58-
})
59-
56+
});
57+
},
58+
});
6059
};

packages/x-charts-pro/src/internals/plugins/zoomGestures/usePanGesture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface UsePanGestureOptions {
2323
/**
2424
* Called once when a pan ends.
2525
* @param {PanEvent} event The original pan end event.
26-
*/
26+
*/
2727
onPanEnd?: (event: PanEvent) => void;
2828
}
2929

@@ -61,7 +61,7 @@ export function usePanGesture(instance: GestureInstance, options: UsePanGestureO
6161
React.useEffect(() => {
6262
const element = chartsLayerContainerRef.current;
6363
if (element === null || !enabled) {
64-
return () => { };
64+
return () => {};
6565
}
6666

6767
let isInteracting = false;

packages/x-charts-pro/src/internals/plugins/zoomGestures/usePanOnPressGesture.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface UsePanOnPressGestureOptions {
2323
/**
2424
* Called once when a pan ends.
2525
* @param {PanEvent} event The original pan end event.
26-
*/
26+
*/
2727
onPanEnd?: (event: PanEvent) => void;
2828
}
2929

@@ -34,7 +34,10 @@ export interface UsePanOnPressGestureOptions {
3434
* the rAF throttling. What to do with the delta is entirely up to `onPan` — cartesian
3535
* zoom translates an axis range, a map translates the projection, etc.
3636
*/
37-
export function usePanOnPressGesture(instance: GestureInstance, options: UsePanOnPressGestureOptions): void {
37+
export function usePanOnPressGesture(
38+
instance: GestureInstance,
39+
options: UsePanOnPressGestureOptions,
40+
): void {
3841
const { enabled, config, onPanStart, onPan, onPanEnd } = options;
3942
const { chartsLayerContainerRef } = instance;
4043

@@ -61,7 +64,7 @@ export function usePanOnPressGesture(instance: GestureInstance, options: UsePanO
6164
React.useEffect(() => {
6265
const element = chartsLayerContainerRef.current;
6366
if (element === null || !enabled) {
64-
return () => { };
67+
return () => {};
6568
}
6669

6770
let isInteracting = false;
@@ -97,7 +100,10 @@ export function usePanOnPressGesture(instance: GestureInstance, options: UsePanO
97100
};
98101

99102
const panHandler = instance.addInteractionListener('zoomPressAndDrag', handlePan);
100-
const panStartHandler = instance.addInteractionListener('zoomPressAndDragStart', handlePanStart);
103+
const panStartHandler = instance.addInteractionListener(
104+
'zoomPressAndDragStart',
105+
handlePanStart,
106+
);
101107
const panEndHandler = instance.addInteractionListener('zoomPressAndDragEnd', handlePanEnd);
102108

103109
return () => {

packages/x-charts-pro/src/internals/plugins/zoomGestures/usePinchGesture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function usePinchGesture(instance: GestureInstance, options: UsePinchGest
4141
React.useEffect(() => {
4242
const element = chartsLayerContainerRef.current;
4343
if (element === null || !enabled) {
44-
return () => { };
44+
return () => {};
4545
}
4646

4747
const latest = { point: { x: 0, y: 0 }, deltaScale: 0, direction: 0, valid: false };

packages/x-charts-pro/src/internals/plugins/zoomGestures/useWheelGesture.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function useWheelGesture(instance: GestureInstance, options: UseWheelGest
4242
React.useEffect(() => {
4343
const element = chartsLayerContainerRef.current;
4444
if (element === null || !enabled) {
45-
return () => { };
45+
return () => {};
4646
}
4747

4848
const handler = instance.addInteractionListener('zoomTurnWheel', (event) => {
@@ -66,8 +66,8 @@ export function useWheelGesture(instance: GestureInstance, options: UseWheelGest
6666
}
6767

6868
event.detail.srcEvent.preventDefault();
69-
70-
onWheelRef.current(point, event.detail.srcEvent as WheelEvent);
69+
70+
onWheelRef.current(point, event.detail.srcEvent as WheelEvent);
7171
});
7272

7373
return () => {

0 commit comments

Comments
 (0)