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

Fix selection logic #569

Merged
merged 4 commits into from
Nov 7, 2024
Merged

Conversation

martinRenou
Copy link
Member

@martinRenou martinRenou commented Nov 7, 2024

Finalize fix #557

  • Prevent triggering selection upon transform
  • Fix non-reliable clicking logic where a single click would not always work
  • Fix initial visibility of the bounding box highlight for selected objects
  • Fix initial transform control position if an object is originally selected when the scene is loaded

@martinRenou martinRenou added the bug PR that fixes a bug label Nov 7, 2024
@martinRenou martinRenou changed the title Selection logic improvements Fix selection logic Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Preview PR at appsharing.space

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Integration tests report: appsharing.space

@martinRenou martinRenou marked this pull request as ready for review November 7, 2024 12:14
Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works Great, thanks @martinRenou

@arjxn-py arjxn-py merged commit 8328c77 into jupytercad:main Nov 7, 2024
11 checks passed
private _hasOrbited = false; // Whether the last orbit control run has actually orbited
private _disabledNextClick = false; // We set this when we stop orbiting, to prevent the next click event
private _controls: OrbitControls; // Camera controls
private _startMousePosition = new THREE.Vector2(); // Start mouse position when dragging the camera controls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grouping these 2 properties under one object helps us reduce 1 line of code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll do it in a follow up PR

@martinRenou martinRenou deleted the improve_clicking branch November 7, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PR that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selecting objects is not smooth
3 participants