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

Preserve point IDs without a path node #2068

Open
0HyperCube opened this issue Oct 22, 2024 · 2 comments
Open

Preserve point IDs without a path node #2068

0HyperCube opened this issue Oct 22, 2024 · 2 comments
Labels
Architecture Involves architecture or engineering work or discussion Crash A panic which crashed the editor Rust Involves Rust programming for the backend

Comments

@0HyperCube
Copy link
Member

When there is no path node, the compute_modified_vector function (included below) relies on the click_targets. However click targets don't store PointIds, SegementIds, or colinear handles. This leads to a couple of issues:

  • If you select a point on ellipse (no dragging) the colinear check box won't be filled.
  • If the segments are in an odd order (e.g. with the bevel node), inserting a point in a segment crashes.

self.document_metadata
.click_targets
.get(&layer)
.map(|click| click.iter().map(ClickTarget::subpath))
.map(|subpaths| VectorData::from_subpaths(subpaths, true))
}

@0HyperCube 0HyperCube added Architecture Involves architecture or engineering work or discussion Rust Involves Rust programming for the backend Crash A panic which crashed the editor labels Oct 22, 2024
@adamgerhant
Copy link
Collaborator

I think it would be best to automatically insert a Path node when the editor creates vector data. I don't think relying on the click targets is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Involves architecture or engineering work or discussion Crash A panic which crashed the editor Rust Involves Rust programming for the backend
Projects
Status: Short-Term
Development

No branches or pull requests

3 participants
@0HyperCube @adamgerhant and others