mirror of
https://github.com/nicbarker/clay.git
synced 2026-07-26 04:48:38 +00:00
[Core] Fix Clay_GetScrollOffset not finding the same element accross frames (#606)
This commit is contained in:
parent
30d051373c
commit
e4aa952816
1 changed files with 1 additions and 1 deletions
2
clay.h
2
clay.h
|
|
@ -4230,7 +4230,7 @@ Clay_Vector2 Clay_GetScrollOffset(void) {
|
|||
Clay_LayoutElement *openLayoutElement = Clay__GetOpenLayoutElement();
|
||||
for (int32_t i = 0; i < context->scrollContainerDatas.length; i++) {
|
||||
Clay__ScrollContainerDataInternal *mapping = Clay__ScrollContainerDataInternalArray_Get(&context->scrollContainerDatas, i);
|
||||
if (mapping->layoutElement == openLayoutElement) {
|
||||
if (mapping->elementId == openLayoutElement->id) {
|
||||
return mapping->scrollPosition;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue