Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Multidrag Callbacks #416

Open
mossy426 opened this issue Jul 24, 2024 · 2 comments
Open

Issue with Multidrag Callbacks #416

mossy426 opened this issue Jul 24, 2024 · 2 comments
Assignees

Comments

@mossy426
Copy link

Hey guys, thanks for implementing the multidrag feature! It's very helpful :)

I'm not sure if we're doing this right, but I'm trying to trigger the callbacks for the selection brush and dragging as mentioned in the documentation.

I have this example in stackblitz:
https://stackblitz.com/edit/angular-pxlb2c?file=src%2Fforce-graph%2Fforce-graph.component.html

Using Unovis v1.4.3, Angular 16

HTML

<vis-single-container [data]="data" height="60vh">
  <vis-graph
    [layoutType]="layoutType"
    [forceLayoutSettings]="forceLayoutSettings"
    [linkLabel]="linkLabel"
    [nodeFill]="nodeFill"
    [nodeLabel]="nodeLabel"
    [nodeSize]="40"
    (onNodeSelectionBrush)="onSelectionBrush($event.selectedNodes, $event.event)"
    (onNodeSelectionDrag)="onSelectionDrag($event.selectedNodes, $event.event)"
  ></vis-graph>
</vis-single-container>

TS

 onSelectionBrush(selectedNodes: any[], event: any): void {
    console.log('Brushed Nodes:', selectedNodes);
    // Implement additional logic for brushed nodes here
  }

  onSelectionDrag(selectedNodes: any[], event: any): void {
    console.log('Dragged Nodes:', selectedNodes);
    // Implement additional logic for dragged nodes here
  }
@reb-dev reb-dev self-assigned this Jul 24, 2024
@reb-dev
Copy link
Collaborator

reb-dev commented Jul 24, 2024

@mossy426 thanks for reporting! I just realized these callbacks didn't make it into @unovis/angular, will publish a new version with the changes soon.

@mossy426
Copy link
Author

@reb-dev Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants