Created
November 16, 2020 13:20
-
-
Save followthemoney1/c24e710cbf43e6c878f07281ecde7388 to your computer and use it in GitHub Desktop.
medium
This file contains 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
bool calcOverflowClosestElement( | |
{@required List<SuggestionItem> line, | |
@required SuggestionItem current, | |
bool check = false}) { | |
for (SuggestionItem element in line) { | |
if (current.rect.intersect(element.rect).height > 0 && | |
current.rect.intersect(element.rect).width > 0) { | |
if (current.rect.intersect(element.rect).height > 0) { | |
if (!check) { | |
current.y += element.rect.intersect(current.rect).height; | |
} | |
} | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment