From ac5a85c9afcdccf1e5da533ef34a5aeddc9494d3 Mon Sep 17 00:00:00 2001 From: Peter Kimberley Date: Tue, 21 May 2019 03:03:10 +1000 Subject: [PATCH] Add `refresh()` to ForceGraphInstance (#35596) --- types/force-graph/force-graph-tests.ts | 3 ++- types/force-graph/index.d.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/force-graph/force-graph-tests.ts b/types/force-graph/force-graph-tests.ts index a47b551e11..d128fb813d 100644 --- a/types/force-graph/force-graph-tests.ts +++ b/types/force-graph/force-graph-tests.ts @@ -72,7 +72,8 @@ graph .cooldownTicks(Infinity) .cooldownTime(15000) .onEngineTick(() => {}) - .onEngineStop(() => {}); + .onEngineStop(() => {}) + .refresh(); graph .onNodeClick(() => {}) diff --git a/types/force-graph/index.d.ts b/types/force-graph/index.d.ts index b78737e74e..6ed52ad923 100644 --- a/types/force-graph/index.d.ts +++ b/types/force-graph/index.d.ts @@ -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 // 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;