Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

59
Views
Zoom in a selected node

I come to you because I am trying to implement a feature to zoom in on a node I have selected.

For this, I used the camera and the animated function by providing the coordinates of my node and my zoom ratio: 0.1.

However, when I zoom on my node the zoom does not center on my node because when I zoom the coordinates of my camera change and do not seem to follow a logic allowing me to add a director coefficient.

Here is my code:

let camera = this.renderer.getCamera();
      
        camera.animate({
            x: this.graph.getNodeAttribute(node.id, "x"),
            y: this.graph.getNodeAttribute(node.id, "y"),               
        });

        camera.setState({ x: this.graph.getNodeAttribute(node.id, "x"), y: this.graph.getNodeAttribute(node.id, "y") })

        camera.animate({
            ratio: 0.1
        });

Thanks everyone for your help !

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!