@@ -54,6 +54,7 @@ class Index extends React.Component {
54
54
mouseOperationsDialogIsOpen : false ,
55
55
aboutDialogIsOpen : false ,
56
56
fitGraph : localStorage . getItem ( 'fitGraph' ) === 'true' ,
57
+ transitionDuration : localStorage . getItem ( 'transitionDuration' ) || 1 ,
57
58
tweenPaths : localStorage . getItem ( 'tweenPaths' ) !== 'false' ,
58
59
tweenShapes : localStorage . getItem ( 'tweenShapes' ) !== 'false' ,
59
60
tweenPrecision : localStorage . getItem ( 'tweenPrecision' ) || '1%' ,
@@ -183,6 +184,12 @@ class Index extends React.Component {
183
184
} ) ;
184
185
}
185
186
187
+ handleTransitionDurationChange = ( transitionDuration ) => {
188
+ this . setPersistentState ( {
189
+ transitionDuration : transitionDuration ,
190
+ } ) ;
191
+ }
192
+
186
193
handleTweenPathsSwitchChange = ( tweenPaths ) => {
187
194
this . setPersistentState ( {
188
195
tweenPaths : tweenPaths ,
@@ -420,11 +427,13 @@ class Index extends React.Component {
420
427
open = { this . state . settingsDialogIsOpen }
421
428
engine = { this . state . engine }
422
429
fitGraph = { this . state . fitGraph }
430
+ transitionDuration = { this . state . transitionDuration }
423
431
tweenPaths = { this . state . tweenPaths }
424
432
tweenShapes = { this . state . tweenShapes }
425
433
tweenPrecision = { this . state . tweenPrecision }
426
434
onEngineSelectChange = { this . handleEngineSelectChange }
427
435
onFitGraphSwitchChange = { this . handleFitGraphSwitchChange }
436
+ onTransitionDurationChange = { this . handleTransitionDurationChange }
428
437
onTweenPathsSwitchChange = { this . handleTweenPathsSwitchChange }
429
438
onTweenShapesSwitchChange = { this . handleTweenShapesSwitchChange }
430
439
onTweenPrecisionChange = { this . handleTweenPrecisionChange }
@@ -499,6 +508,7 @@ class Index extends React.Component {
499
508
dotSrc = { this . state . dotSrc }
500
509
engine = { this . state . engine }
501
510
fit = { this . state . fitGraph }
511
+ transitionDuration = { this . state . transitionDuration }
502
512
tweenPaths = { this . state . tweenPaths }
503
513
tweenShapes = { this . state . tweenShapes }
504
514
tweenPrecision = { this . state . tweenPrecision }
0 commit comments