You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When moving the selection window there is some but not enough checking for bounds. Specifically when you reach one or more edges of the screen the selection window should not move in that direction.
The text was updated successfully, but these errors were encountered:
is there a way to know the screen width of the device on which we are viewing the image. Cause for the bounds I was thinking of creating something like this
// Check if the new corners exceed the bounds of the screen
let max_re = screen_width;
let min_re = 0.0;
let max_im = screen_height;
let min_im = 0.0;
am I going in right direction for this problem or I am completely wrong
Yeah you're on the right lines. There are functions such as move_selection_right, move_selection_down and so on. You need to calculate whether the thing is going out of bounds. Sorry it's been a while since I looked at the code, but there are essentially two coordinate systems in play, the terminal coords and the window coords. You may need to add some print! instructions to the various variables and print them out while moving things around and see what they do. The idea is to figure out the bounds and keep the user within them.
When moving the selection window there is some but not enough checking for bounds. Specifically when you reach one or more edges of the screen the selection window should not move in that direction.
The text was updated successfully, but these errors were encountered: