Closed pixelzoom closed 3 years ago
I changed the amplitude range from [0,0.2] to [0,0.1]. It had the desired effect of changing the range of the sliders. But it also messed up the icons that appear above each slider, see screenshot below. So unfortunately not trivial, more investigation will be needed.
The code that draws the icons above the sliders is in StaticModeGraphCanvasNode update
, and this magic number probably needs to be cut in half:
const amplitude = 0.15;
As requested, the amplitude range has been cut in half, from [0,0.2] to [0,0.1]. And the icons above the sliders still look correct.
Note that this change was for the 'One Dimension' screen only. The 'Two Dimension' screen uses a totally different algorithm for amplitude range, based on the number of masses. The largest range is [0,0.3] with 1 mass, and that range is used to compute the range for other number of masses. Despite the title of this issue, I wasn't sure whether you wanted this range adjusted too.
@ariel-phet please review the 'One Dimension' screen. And let me know if you'd like any changes to the 'Two Dimensions' screen.
Discussed with @ariel-phet on Zoom.
In the above commit, I adjusted the height of the plots in the Normal Modes accordion box to match the new amplitude range. This involved changing a magic number in ModeGraphCanvasNode.js.
There are still a couple of things that aren't perfect. The mode 1 plot gets a little clipped. But we're not going to worry about that for the Prototype, and it's behaving way better than it was.
Checked on master, looking great for the prototype. Closing.
For https://github.com/phetsims/qa/issues/724, @ariel-phet requested for the Prototype:
On the 'One Dimension' screen, reduce the range of the sliders by half, so that the midpoint value is the max value.