PhysicsEngine Undefined gravitySolver; Appears PhysicsEngine init() is never called.
Sciumo opened this issue · comments
Appears PhysicsEngine init() is never called.
Versions:
"vis": "^4.21.0-EOL",
"vis-data": "^7.1.6",
"vis-network": "^9.1.6",
"vis-timeline": "^7.7.2"
Usage in a React application:
import { Network, Data } from "vis-network";
graph: Data // assigned elsewhere
network = new Network(visJsRef.current, graph );
Error:
this.gravitySolver.solve();
PhysicsEngine.js:377 Uncaught TypeError: Cannot read properties of undefined (reading 'solve')
at PhysicsEngine2.physicsStep (PhysicsEngine.js:377:24)
at PhysicsEngine2.physicsTick (PhysicsEngine.js:450:12)
at PhysicsEngine2._stabilizationBatch (PhysicsEngine.js:784:12)
at PhysicsEngine.js:744:27
Passing in options={} fixes, but it is supposedly optional.
This resolved my problem 👍🏽