Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

60
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda