Closed samreid closed 8 years ago
@arouinfar said:
Something's still not quite right here @samreid.
I think we should add a rule that components cannot be connected when outside of the black box in build mode.
If I connect a fixed-length component to the outside of the black box in Build mode, it remains outside. I can continue to build outside of the black box if I connect other fixed-length components to the first one.
After deleting the battery attached to the black box, the other battery floats in the playspace. It does not snap to the inside of the black box until it is clicked.
To avoid this issue, would it be possible for fixed-length components to rotate into the black box if they are connected to a black box vertex from the outside? Sort of like this:
Assigning to @phet-steele to be on the lookout for additional related issues when he works on #134.
My original thought was to prevent that kind of connection in the first place. I like the idea of rotating batteries in, so I'll investigate that next, but it will likely be instantaneous rather than animated.
Also, I'm somewhat concerned that flipping the battery inside the box could cause it to overlap some other vertex and make it bump out of the way--so there could be odd interactions.
I'm somewhat concerned that flipping the battery inside the box could cause it to overlap some other vertex and make it bump out of the way
You raise an excellent point @samreid. Perhaps it's better to prevent the connection altogether.
OK I'll investigate preventing the connection first.
This is implemented as prescribed and it seems like it is working nicely. I wouldn't be surprised to find many corner cases though, so it should be thoroughly tested.
Please refer to https://github.com/phetsims/circuit-construction-kit/issues/140 for testing.
This seems like it is working properly, closing.
From #128