Add refresh() to ForceGraphInstance (#35596)

This commit is contained in:
Peter Kimberley 2019-05-21 03:03:10 +10:00 committed by Ryan Cavanaugh
parent cdc7decebc
commit ac5a85c9af
2 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,8 @@ graph
.cooldownTicks(Infinity)
.cooldownTime(15000)
.onEngineTick(() => {})
.onEngineStop(() => {});
.onEngineStop(() => {})
.refresh();
graph
.onNodeClick(() => {})

View File

@ -1,4 +1,4 @@
// Type definitions for force-graph 1.14
// Type definitions for force-graph 1.15
// Project: https://github.com/vasturiano/force-graph
// Definitions by: Peter Kimberley <https://github.com/p-kimberley>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@ -121,6 +121,7 @@ declare namespace ForceGraph {
pauseAnimation(): ForceGraphInstance;
stopAnimation(): ForceGraphInstance; // Alias for pauseAnimation()
resumeAnimation(): ForceGraphInstance;
refresh(): ForceGraphInstance;
centerAt(x?: number, y?: number, milliseconds?: number): ForceGraphInstance & {x: number, y: number};
zoom(zoomLevel?: number, duration?: number): ForceGraphInstance & number;