phetsims / expression-exchange

"Expression Exchange" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

Problems with cards being included in term bounds #80

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago

Go to the Game screen (the only screen with terms on cards). The outline of the cards are included in the calculations of a terms bounds....until the card fades away. Below is an example where the bounds of an expression are taller when the joining term has a card, and shorter once the card fades away: ee13

That's all well and good, but it gets a little confusing when trying to combine terms. Terms will get a halo when they have a card, then the halo fades away when the card fades away. You cannot actually combine the terms when you see the halo in this video: ee12

The sim can also find itself in a buggy situation where expressions retain a hint even when there is no user controlled term. I showed @jbphet this in person, but it is confusing to write a procedure to cause it (it happens quite often). This is different from the first video because I'm not controlling the term when the card disappears. The joining hint should be gone when I release, but it stays: ee11

@jbphet can you look into removing the card bounds from being included in the total term bounds? I believe that would fix all three above scenarios. I can't think of any adverse affects if we go forward with this change.

For phetsims/tasks/issues/807.

jbphet commented 7 years ago

I've made it so that the card bounds are not included when the model is deciding when to activate halos or how things go into expressions. @phet-steele - please try this out on master and close if this looks reasonable. It looks pretty good to me.

jbphet commented 7 years ago

Unassigning since QA is backed up, will have on the list of issues to test against the first RC for this sim, which should be soon.

phet-steele commented 7 years ago

Thanks @jbphet, the sim is behaving quite nicely with these changes.