Jump to content
Search Community

Options Box around Transform Item

Boris test
Moderator Tag

Recommended Posts

Hi Together,

i want to build a small optionsbox besides the selected Transform Item and i like to position it always at the upper left corner - But when i position the box with the x and y values from the selected item and i rotate the item the position from the options box moves in strange way - So how can i force my box to follow the upper left corner?

Link to comment
Share on other sites

I'm confused - you want to attach something to the selection box so that it's always in the upper left corner even when the selection box is being rotated? So it would detach itself and float in the upper left corner as the item is rotating? Could you post a screen capture or something?

Link to comment
Share on other sites

OK - here is a screenshot - you see there is a object on the canvas with some button, where you can interact with that object to swap uo or swap down or to delete it .

I want that the position alters when i rotate or scale it

 

screen_transform.jpg

Link to comment
Share on other sites

Well, you could use globalToLocal() and localToGlobal() to figure out the local coordinates of that corner (inside your targetObject's coordinate space) and then use a SCALE and/or ROTATE event handler to reposition it at those coordinates (again, using localToGlobal() and globalToLocal() to figure it out).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...