-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something strange about x, y positioning for certain screens #3900
Comments
Did you try refreshing your screen after switching over to the smart board? I can only reproduce the error if I change the size of my browser window and run the code w/o a refresh in between. If I refresh, the grid is properly configured. |
I did not think to refresh... |
Hi! For convenience I am attaching a video file to this comment explaining my observations. As it may assist other "first time contributors" like myself while testing this and other issues on this repo. I understand that this issue is old but indeed quite important for user-experience. The first video is on the bug mentioned in this issue I'd now study this repo to figure out exactly where the bug is and provide updates on what I find and work on accordingly. |
Hmm. Maybe we should refresh the grid on resize? Or at least when Play is hit? |
The refresh-when-play option seems better. My plan is to update the graph after the main logic of the
if (this.graph) {
this.graph.update(); //assuming an update function exists
} if the /**
* Updates the graph dimensions or re-renders it.
*/
this.update = () => {
// Logic to refresh or re-render the graph
this.clear();
this.render();
}; do let me know if my approach has issues in any way. I would appreciate any guidance. |
A follow-up of my last comment. I studied the code more and realized a few things. Firstly I break down the problem and its potential solution(s):
|
Yes. The mouse is set to the new 0,0 but not the grid. |
I've run into this a few times.
Today, I ran into it with a classroom smart board. x and y were offset enough to cause issues for any projects that used "set x/y".
I've also seen something similar on laptops, which becomes evident for our projects that set the height based on pitch.
In terms of reproducibility, if you use dev tools, and short code that prints Cartesian and sets x/y to zero, you can get results like this:
The text was updated successfully, but these errors were encountered: