Skip to content

Add overlays for free-floating anchors on hovered/selected vector layers #2630

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

Merged

Conversation

seam0s-dev
Copy link
Contributor

@seam0s-dev seam0s-dev commented May 3, 2025

Support for overlays, closes #2558.

@seam0s-dev
Copy link
Contributor Author

Test cases:
free-floating anchors.graphite.txt

@seam0s-dev seam0s-dev marked this pull request as ready for review May 5, 2025 11:11
@seam0s-dev seam0s-dev closed this May 6, 2025
@seam0s-dev seam0s-dev reopened this May 6, 2025
@seam0s-dev seam0s-dev marked this pull request as draft May 6, 2025 08:47
@seam0s-dev seam0s-dev marked this pull request as ready for review May 9, 2025 06:49
@Keavon Keavon changed the title Add overlays for free-floating anchors for hovered/selected vector layers Add overlays for free-floating anchors on hovered/selected vector layers May 9, 2025
@Keavon
Copy link
Member

Keavon commented May 9, 2025

!build

Copy link

github-actions bot commented May 9, 2025

📦 Build Complete for 96b5e17
https://5420499d.graphite.pages.dev

@seam0s-dev
Copy link
Contributor Author

@0HyperCube Ready for review.

Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

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

Thanks for your work so far.

I'm not really sure of the choice of the ManipulatorGroup to represent a single unconnected point with no handles.

I would also request tests before merging.
I've not manually tested this either but presumably it works mostly OK?

@seam0s-dev seam0s-dev requested a review from 0HyperCube May 15, 2025 09:01
@Keavon
Copy link
Member

Keavon commented May 24, 2025

Could you please make it work so when hovering over a point, it shows the overlays for the layer geometry, as it also does when hovering over a segment or filled shape? It looks like clicking those points works, but they're invisible until you actually click because hovering doesn't show it.

I'm also observing a crash that is hard to reproduce. I'll keep trying to make it relicatable.

@seam0s-dev
Copy link
Contributor Author

seam0s-dev commented May 24, 2025

I didn't understand what you meant specifically. I assume you meant that when you hover over a free-floating point on a layer that every shape on that layer also gets outlined, correct? If so, that does seems to work on my test cases.

free_floating_points.mp4

Copy link
Contributor Author

@seam0s-dev seam0s-dev left a comment

Choose a reason for hiding this comment

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

@seam0s-dev seam0s-dev force-pushed the 2558-free-floating-anchors-overlays branch from afe8075 to 139ac6f Compare May 28, 2025 08:29
@seam0s-dev seam0s-dev closed this Jun 2, 2025
@seam0s-dev seam0s-dev deleted the 2558-free-floating-anchors-overlays branch June 2, 2025 06:22
@seam0s-dev seam0s-dev restored the 2558-free-floating-anchors-overlays branch June 2, 2025 06:22
@seam0s-dev seam0s-dev reopened this Jun 2, 2025
@Keavon
Copy link
Member

Keavon commented Jun 6, 2025

Can you please resolve the merge conflicts? Thanks.

@seam0s-dev seam0s-dev force-pushed the 2558-free-floating-anchors-overlays branch 2 times, most recently from 9792edb to 139ac6f Compare June 8, 2025 09:01
@Keavon
Copy link
Member

Keavon commented Jun 8, 2025

!build

Copy link

github-actions bot commented Jun 8, 2025

📦 Build Complete for 4131e1e
https://e5cff026.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jun 8, 2025

Working nicely, thank you.

@Keavon
Copy link
Member

Keavon commented Jun 8, 2025

Remember to leave a comment in the issue #2558 so I can assign you to it. Thanks!

@Keavon Keavon merged commit 0b31c1a into GraphiteEditor:master Jun 8, 2025
4 checks passed
Keavon added a commit that referenced this pull request Jun 20, 2025
…ers (#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

Co-authored-by: Keavon Chambers <[email protected]>
Moharum1 pushed a commit to Moharum1/Graphite that referenced this pull request Jun 23, 2025
…ers (GraphiteEditor#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

Co-authored-by: Keavon Chambers <[email protected]>
Keavon added a commit that referenced this pull request Jun 26, 2025
…spacing based on separation or quantity (#2727)

* Added Count point Radio button to property pannel

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* Fixing more linting problem

* Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (#2697)

Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'

* Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs (#2662)

* use kurbo's default accuracy constant

* fix append_bezpath() method

* refactor bounding box node

* fix append bezpath implementation.

* comments

---------

Co-authored-by: Keavon Chambers <[email protected]>

* Add overlays for free-floating anchors on hovered/selected vector layers (#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

Co-authored-by: Keavon Chambers <[email protected]>

* Add anchor sliding along adjacent segments in the Path tool (#2682)

* Improved comments

* Add point sliding with approximate t value

* Add similarity calculation

* Numerical approach to fit the curve

* Reliable point sliding for cubic segments

* Fix formatting and clean comments

* Fix cubic with one handle logic

* Cancel on right click and escape

* Two parameter optimization

* Esc/ Right click cancellation

* Code review

* Fix dynamic hints

* Revert selected_points_counts and fix comments

* Code review

---------

Co-authored-by: Keavon Chambers <[email protected]>

* Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (#2714)

* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes #2713

* Comment

---------

Co-authored-by: Keavon Chambers <[email protected]>

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* The sample count can now work with adaptive spacing

* Readying for production

* Rename to 'Sample Polyline' and add migration

* Upgrade demo artwork

* Add monomorphization

---------

Co-authored-by: Keavon Chambers <[email protected]>
Co-authored-by: Priyanshu <[email protected]>
Co-authored-by: seam0s <[email protected]>
Co-authored-by: Adesh Gupta <[email protected]>
Co-authored-by: Ezbaze <[email protected]>
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

Successfully merging this pull request may close these issues.

Add overlays for anchors, just like segments, for hovered/selected vector layers
3 participants