Commit 97855db 1 parent 874aebf commit 97855db Copy full SHA for 97855db
File tree 2 files changed +9
-2
lines changed
ui-manchette-with-spacetimechart/src
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ const useManchettesWithSpaceTimeChart = (
100
100
}
101
101
} , [ yZoom ] ) ;
102
102
103
+ const resetZoom = useCallback ( ( ) => {
104
+ setState ( ( prev ) => ( { ...prev , yZoom : 1 } ) ) ;
105
+ } , [ yZoom ] ) ;
106
+
103
107
const handleScroll = useCallback ( ( ) => {
104
108
if ( ! isShiftPressed && manchetteWithSpaceTimeChartContainer . current ) {
105
109
const { scrollTop } = manchetteWithSpaceTimeChartContainer . current ;
@@ -146,6 +150,7 @@ const useManchettesWithSpaceTimeChart = (
146
150
operationalPoints : operationalPointsWithHeight ,
147
151
zoomYIn,
148
152
zoomYOut,
153
+ resetZoom,
149
154
toggleMode,
150
155
yZoom,
151
156
isProportional,
Original file line number Diff line number Diff line change @@ -69,10 +69,12 @@ const ManchetteWithSpaceTimeWrapper = ({
69
69
) ;
70
70
} ;
71
71
72
- export default {
72
+ const meta = {
73
73
title : 'Manchette with SpaceTimeChart/rendering' ,
74
74
component : ManchetteWithSpaceTimeWrapper ,
75
- } as Meta < typeof ManchetteWithSpaceTimeWrapper > ;
75
+ } satisfies Meta < typeof ManchetteWithSpaceTimeWrapper > ;
76
+
77
+ export default meta ;
76
78
77
79
export const Default = {
78
80
args : {
You can’t perform that action at this time.
0 commit comments