0 Replies Latest reply on Oct 25, 2012 10:53 AM by Marcello

    Centering node on screen during a ScaleTransition

      My node is hold in some managed containers (e.g. HBox within BorderPane.. etc..). What I want to do is to create aTransition that Scales this node by a factor 2x and after a while sclaes it back. In parallel the zoomed node is supposed to appear in the center of the screen.

      The scaling is no problem but how can i achieve the centering ?

      Do I have to (complicated) figure out the coordinates then create a TranslateTransition etc. ?
       Point2D p =  node.localToScene( node.getLayoutX(), node.getLayoutY());
      Or is there an easier way ?