phetsims / neuron

"Neuron" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

action potential can be cut off if zoomed out when paused #85

Closed jbphet closed 9 years ago

jbphet commented 9 years ago

The traveling action potential can end up looking cut off if the sim is paused while the action potential is off the edge, and then is zoomed out. The screenshots below illustrate. This is probably a result of recent changes to the code that draws the traveling action potential.

This was found during fuzz testing.

neuron-ap-1

neuron-ap-2

jbphet commented 9 years ago

This should now be fixed. The problem was that the canvas size that was being created for depicting the traveling action potential was matched to the viewport size, and this wasn't large enough to show the traveling action potential when the sim was zoomed out. The code now enlarges the viewport bounds enough so that the max zoom out is accounted for. Closing.