Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectangle Position in MouseControlUtil.addSelectionRectangleGesture incorrect #127

Open
IARI opened this issue Mar 21, 2019 · 2 comments
Open

Comments

@IARI
Copy link

IARI commented Mar 21, 2019

The Bug described here was first also described in this comment on a stackoverflow answer which suggests the use of MouseControlUtil.addSelectionRectangleGesture:

Whenever I call the function with the final Parent root argument being some Pane within a Scene, the rectangle position is incorrect:

2019-03-22-00-33-08

The reason to me seems to be in the performDragBegin method, MouseControlUtil.java L385-L386
The initial position is obtained from the scene-absolute coordinates, but the rectangle is attached to an element down in the hierarchy of the scene tree - that does not seem correct and i suspect it is the cause of this problem.

Sidenote:
from the design of this peace of te code, it seems to be intended in a way, that the final Parent root argument is in fact - as in this example - down in the hierarchy of the scene tree.

I am aware that this is experimental code, so I am submitting this issue, so this can be fixed.

@tbee
Copy link
Member

tbee commented Mar 22, 2019

As you mention yourself, labs is our sandbox and any code in there may be abandoned. I'll see if the owner still is supporting it.

@miho
Copy link
Member

miho commented Mar 22, 2019

The MouseControlUtil does only compute the scaling (LocalToSceneTransform) but it ignores the necessary translation. In VWorkflows we do the necessary translation: See lines 408 - 445.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants