tscircuit / core

8 stars 16 forks source link

`getInheritedProperty` on `PrimitiveComponent` #337

Closed seveibar closed 1 day ago

seveibar commented 2 days ago

This function should traverse upward until it finds the property defined in the _parsedProps of any component

<board minTraceWidth={0.2}>
  <group>
   <chip />
  </group>
</board>

For example if I do chip.getInheritedProperty("minTraceWidth") it will return the 0.2

seveibar commented 2 days ago

/bounty $5

algora-pbc[bot] commented 2 days ago

💎 $5 bounty • tscircuit

Steps to solve:

  1. Start working: Comment /attempt #337 with your implementation plan
  2. Submit work: Create a pull request including /claim #337 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tscircuit/core!

Add a bounty • Share on socials

ShiboSoftwareDev commented 1 day ago

@seveibar this method is already present in PrimitiveComponent class, did you mean to add it to NormalComponent? Image

Abse2001 commented 1 day ago

@ShiboSoftwareDev I pushed it yesterday .

Abse2001 commented 1 day ago

PR #339