ngx-graph
ngx-graph copied to clipboard
Fix panOffsetX and panOffsetY
Please fix this inconsistent code, either just replace the null by the current position of x or y or remove it all together and update your documentation , because today this is non working code
https://github.com/swimlane/ngx-graph/blob/d7d03ca1eba4e4b50f0fd66d5fb27a39ee32d746/projects/swimlane/ngx-graph/src/lib/graph/graph.component.ts#L186
so this code never worked
set panOffsetX(x) {
this.panTo(Number(x), null);
}
set panOffsetY(y) {
this.panTo(null, Number(y));
}
panTo(x: number, y: number): void {
if (x === null || x === undefined || isNaN(x) || y === null || y === undefined || isNaN(y)) {
return;
}
thanks
Any update or workaround for it?
panOffsfetX and panOffsetY still not working? Does anyone know any workaround?
@rcoletta get Component Access by using ViewChild https://angular.io/api/core/ViewChild and use the function pan
https://github.com/swimlane/ngx-graph/blob/master/projects/swimlane/ngx-graph/src/lib/graph/graph.component.ts#L826