• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can i calculate the correct drag x,y position when rotate parent with style "-fx-rotate"

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello JavaFX friends,

i have problem whe I set style “fx-rotate” on the parents or parent.parent…. of the children node.
I have have a node with a drag listener which calculate the drag translateX, translateY.
It works fine and also works fine when i set for example node.setStyle("fx-rotate: 30").
But whne set the style on root.setStyle("fx-rotate: 30") or
parent.setStyle("fx-rotate: 30") the drag listener work incorect.
What can i do or have you an idea how can calculate the correct tranlatex, translatey
when the parent of node have an rotation on it’s style?

Here is an Example Code of my problem



Next exmple when i set style on each other parent of node the calculation is wrong



Thanks for your help
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic