Skip to content

Fix pointer focus for the center of a circle.#676

Merged
pstaabp merged 1 commit intoopenwebwork:PG-2.17from
drgrice1:graphtool-circle-center-focus
May 20, 2022
Merged

Fix pointer focus for the center of a circle.#676
pstaabp merged 1 commit intoopenwebwork:PG-2.17from
drgrice1:graphtool-circle-center-focus

Conversation

@drgrice1
Copy link
Member

Curently the center point of a circle can not be focused by clicking on it with the mouse. This is because the jsxgraph circle hasPoint method only returns true if the circle itself contains the given point, but not if the center point contains the given point. So redefine the hasPoint method for a circle to fix that.

Curently the center point of a circle can not be focused by clicking on
it with the mouse.  This is because the jsxgraph circle hasPoint method
only returns true if the circle itself contains the given point, but not
if the center point contains the given point.  So redefine the hasPoint
method for a circle to fix that.
@drgrice1
Copy link
Member Author

To test this you can use the attached problem. In that problem, graph a circle and then click on the point on the circle itself. Then click on the center point again. Without this pull request, focus will not go back to the center point when you click on it. With this pull request it will.

Note that with or without this pull request you can get focus to the center point using tab or shift-tab (whichever is needed, depending on where focus is).

Demo.pg.txt

@pstaabp pstaabp merged commit 9b6d1e8 into openwebwork:PG-2.17 May 20, 2022
@drgrice1 drgrice1 deleted the graphtool-circle-center-focus branch May 20, 2022 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants