pcww / builder

0 stars 0 forks source link

End Grain Options #63

Closed voltaaage closed 7 years ago

voltaaage commented 7 years ago

WIP: Creates the UI for defining strips to be made with end grains.

43

Wizard State Vars
allGrainSelected
allGrainAligned

COMPONENTS
Select all
TRUE
- onClick: call onGrainSelectAll (true)
- isChecked: this.state.allGrainAligned && this.state.allGrainSelected
FALSE
- onClick: call onGrainSelectAll (false)
- isChecked: this.state.allGrainAligned && !this.state.allGrainSelected

Strips
TRUE
- onClick: onEndGrainSelection (true)
    - Update the strip state = true
    - Call checkGrainAlignment
FALSE
- onClick: onEndGrainSelection (false)
    - Update the strip state = false
    - Call checkGrainAlignment

METHODS

Wizard.jsx
onGrainSelectAll (state)
- Update all board strips = true
- Update allGrainSelected = state
- Update allGrainAligned = true

checkGrainAlignment ()
- Check to see that all end grains are the same
- Update allGrainAligned

StripPanel.jsx
onGrainSelection (event)
- Update the strip state = event.currentTarget.value
- Call checkGrainAlignment (May be tricky since this is in the child - maybe call this on wizard's mount)
brian-slate commented 7 years ago

Added the strip end grain props in the API. Let me know when this is ready to review.

voltaaage commented 7 years ago

Going to stop wasting time on making a method look prettier b/c the map isn't grabbing the element of the strips collection for some reason.

Next thing to do is textures - @bmherold, what textures am I trying to replace it with? Are these images available somewhere? I'm looking for the end grain versions of the woods we have

brian-slate commented 7 years ago

I would say we want on the visual side of this. As long as everything is functional here, I think this is done. Ready to review?