-
Notifications
You must be signed in to change notification settings - Fork 0
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
Drag bug with electromagnet coil "background layer" #56
Comments
This problem exposes some weirdness in the class hierarchy. PickupCoil extends Coil, and has LightBulb and Voltmeter fields. Electromagnet extends CoilMagnet, and has fields SourceCoil, DCPowerSupply, and ACPowerSupply. And SourceCoil has its own positionProperty, which is what is being set when dragging the background layer of the coil. This is also a problem for PhET-iO, because we have both I'm thinking that Or maybe there should be another class ( |
This was addressed in the above commits. Rather than have PickupCoil extends Coil, I made PickupCoil have a Coil as a subcomponent. This allows me to get rid of positionProperty in Coil, which is what is causing the problem with the electromagnet background being draggable separately. I don't feel like it needs a review, so closing. |
The background layer of ElectromagnetNode's CoilNode detaches from the coil when dragging it:
The text was updated successfully, but these errors were encountered: