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
There was an error in the bounds calculation. The right/bottom sides were compared to pos + extents. But the extents are already a combination of pos + size.
Tested this using the drag & drop functionality. Before the fix, you could drag images by clicking outside their bounds.
Good catch! Though if the offsets are not really offsets, I feel we should change the name to match. How about start_pos_x, start_pos_y, end_pos_x and end_pos_y?
Sure, I could rename them.
I also just noticed in the texts.lua there is a similar setup for hover, but it uses windower.text.get_extents which only returns width / height according to the documentation. Images uses a custom get_extents. This is kind of inconsistent and probably the cause of the bug, but I didn't want to change the images.get_extents function, who knows who uses it and what it would break.
Thoughts?
Good catch and good instincts. Changing it at this point would likely cause too much breakage. Let's leave it as it is and just adjust this part where it is used. This fits well into the rapidly growing "lesson learned for v5" category.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was an error in the bounds calculation. The right/bottom sides were compared to pos + extents. But the extents are already a combination of pos + size.
Tested this using the drag & drop functionality. Before the fix, you could drag images by clicking outside their bounds.