mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
[Core] Fix a bug with the implementation of clip .childOffset
This commit is contained in:
parent
ea8288158e
commit
90b45f059c
2 changed files with 3 additions and 9 deletions
10
clay.h
10
clay.h
|
|
@ -2690,12 +2690,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
if (mapping->layoutElement == currentElement) {
|
||||
scrollContainerData = mapping;
|
||||
mapping->boundingBox = currentElementBoundingBox;
|
||||
if (clipConfig->horizontal) {
|
||||
scrollOffset.x = mapping->scrollPosition.x;
|
||||
}
|
||||
if (clipConfig->vertical) {
|
||||
scrollOffset.y = mapping->scrollPosition.y;
|
||||
}
|
||||
scrollOffset = clipConfig->childOffset;
|
||||
if (context->externalScrollHandlingEnabled) {
|
||||
scrollOffset = CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
|
||||
}
|
||||
|
|
@ -2917,8 +2912,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
for (int32_t i = 0; i < context->scrollContainerDatas.length; i++) {
|
||||
Clay__ScrollContainerDataInternal *mapping = Clay__ScrollContainerDataInternalArray_Get(&context->scrollContainerDatas, i);
|
||||
if (mapping->layoutElement == currentElement) {
|
||||
if (clipConfig->horizontal) { scrollOffset.x = mapping->scrollPosition.x; }
|
||||
if (clipConfig->vertical) { scrollOffset.y = mapping->scrollPosition.y; }
|
||||
scrollOffset = clipConfig->childOffset;
|
||||
if (context->externalScrollHandlingEnabled) {
|
||||
scrollOffset = CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue