visjs / ngx-vis

An angular 5+ vis.js project

Home Page:https://visjs.github.io/ngx-vis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getPositions definition

kalvarez2 opened this issue · comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository

Current Behavior

The definition of getPositions on vis-network.service.d.ts:724:38 specifies the nodeids are required, when the vis.js does not require that argument and will respond will all the nodes positions:
https://visjs.github.io/vis-network/docs/network/

Expected Behavior

getPositions() function should require only one argument, the rest should be optional.

Failure Information

Angular fails with an error message:
error TS2554: Expected 2 arguments, but got 1.
console.log(this.visNetworkService.getPositions(this.visNetwork));
Even though it errors out the code works in dev mode, production mode might not work.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

add this to your code:
console.log(this.visNetworkService.getPositions(this.visNetwork));

Reproduce code snippet

console.log(this.visNetworkService.getPositions(this.visNetwork));
...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Angular version:
    9.1.4
  • NodeJS version:
    14.3
  • Operating System:
    Linux

Failure Logs

 error TS2554: Expected 2 arguments, but got 1.

thanks for your PR

fixed with ngx-vis@3.1.0-build1591159265