Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix coordinate hints in the GraphTool for restricted sine wave points.
After construction of a sine wave is completed, if the point that determines amplitude is selected and moved with the mouse cursor, then the x-coordinate of the point can't change. However, the x-coordinate of the coordinate hints in the lower right corner of the board does change if the mouse is moved to the left and right while dragging that point, and should not be. The same thing happens with the point that determines period on relative to the vertical axis. The y-coordinate of that point can't change, but the y-coordinate of the coordinate hints do change if the mouse cursor is moved up or down. This pull request fixes the issue by overriding the default graph object `updateTextCoords` method for the sine wave graph object. A flag set on the point when it is dragged, and the `updateTextCoords` override checks for the flag and sets the coordinate hints with the coordinates of the point instead of using the mouse cursor coordinates which might be incorrect. This is similar to the issue that @Alex-Jordan noticed in openwebwork#1157, although that was during the construction phase of the sine wave.
- Loading branch information