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

Dragging a puller shifts the object upon move #87

Closed
jessegreenberg opened this issue Oct 5, 2022 · 3 comments
Closed

Dragging a puller shifts the object upon move #87

jessegreenberg opened this issue Oct 5, 2022 · 3 comments

Comments

@jessegreenberg
Copy link
Contributor

If you drag an object by the puller the initial translation gets way offset and the puller is detached from the mouse. It is as though this clickOffset may have changed, so Ill bet its actually a problem for all ISLC sims

    this.dragListener = new DragListener( {
      allowTouchSnag: true,
      start: event => {
        clickOffset = this.dragNode.globalToParentPoint( event.pointer.point ).x - event.target.x;
        object.isDraggingProperty.value = true;
@jessegreenberg
Copy link
Contributor Author

Yes, I see this for other ISLC sims, moving to that repo.

@jessegreenberg jessegreenberg transferred this issue from phetsims/coulombs-law Oct 5, 2022
@jessegreenberg jessegreenberg self-assigned this Mar 28, 2023
@jessegreenberg
Copy link
Contributor Author

I don't see any changes to the block of code listed, but if the Node scene graph location changed, I could see this behaving differently.

jessegreenberg added a commit that referenced this issue Mar 28, 2023
@jessegreenberg
Copy link
Contributor Author

Fixed in the above commit. I didn't investigate what change to break this.

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

No branches or pull requests

1 participant