add compositeChild flag to prevent copying
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
A to-do for me. The composite shapes have some API weirdness:
+ Currently `Box` uses `BoxRect` class, which like a `Rect` only it isn't copied with `copyGraph`, because a `Box` will add its on `BoxRect` children when created.
+ `Cone` also has a `Anchor` which gets duplicated, it should be a `ConeAnchor` or something.
+ And I'm considering adding an `Anchor` inside `Hemisphere` for keeping track of its apex.
Rather than creating special classes like `BoxRect`, I think a cleaner solution would be to add a flag property like `compositeChild`. So that items with this flag will not get copied with `copyGraph`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Box, BoxRect, Cone, Anchor, Hemisphere, and copyGraph entry points to understand how composite children are created and copied. Done means a supported compositeChild flag prevents flagged items from being copied by copyGraph without requiring special classes such as BoxRect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100