-
Notifications
You must be signed in to change notification settings - Fork 6
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
Should a 'ControlPanel.js' Type be factored out? #60
Comments
Factoring out ControlPanel.js feels a bit "forced" to me. There are significant differences between all 3 control panels, especially the set of "View" check boxes. What they share is parts of the control panel, specifically the "Surface" and "Electric Field" controls. I'll look at factoring out SurfaceControl.js and ElectricFieldControl.js, then use those in the existing control panels. |
I definitely understand about the "forced" feeling. Your plan sounds like a good one. If we find that it isn't helpful than I think it is fine how it is. |
Major changes to control panels, see above commits. Summary of new types: MPControlPanel - used throughout, responsible for inserting horizontal separators Example usage in TwoAtomsScreenView: var controlPanel = new MPControlPanel( [
new TwoAtomsViewControls( viewProperties ),
new SurfaceTypeControl( viewProperties.surfaceTypeProperty ),
new EFieldControl( model.eField.enabledProperty )
] ); @zepumph please review. |
Btw... I compared to 1.0.0-dev.24 (looks identical) and tested with |
This looks really nice. Thanks, closing |
from code review #30
I see a lot of duplicated code in all three of the control panels. Perhaps there is a way to save code by factoring that out into its own file. jsinspect noticed multiple sections in all three control panels that were basically the exact same.
The text was updated successfully, but these errors were encountered: