PanOffSet not working anymore
See original GitHub issueDescribe the bug I design control elements in which the user can move my graph using arrow keys. In an earlier version I could move the graph by adding/subtracting values from the current panOffsetY & panOffsetX. However, after upgrading to v. 6.1.0 setting panOffsetX & Y does not change the position anymore.
To Reproduce Steps to reproduce the behavior:
<ngx-graph #graphWrapper [nodes]="hierarchicalGraph.nodes" [links]="hierarchicalGraph.links" [panOffsetY]="panOffsetY" [panOffsetX]="panOffsetX" [zoomLevel]="zoom" [curve]="curve" [view]="" [layoutSettings]="layoutSettings" [scheme]="colorScheme" > ... </ngx-graph>
@ViewChild('graphWrapper') el: NgxGraphInterface;
move(y, x) { this.panOffsetX = this.el.panOffsetX + x; this.panOffsetY = this.el.panOffsetY + y; }
Expected behavior panOffsetX & panOffsetY should update the position of the graph again.
ngx-graph version v. 6.1.0
Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
@KingDarBoja please check and test https://github.com/swimlane/ngx-graph/pull/278
Hi,
I think that keyboard navigation is something that should come from ngx-graph. I started to work on this and hope to release a PR soon.
Regrading the pan value, is it related to the pan to node functionality?