| 3410 | } |
| 3411 | |
| 3412 | int ViewNode::getScrollAnchorPosition() const { |
| 3413 | return _scrollAnchorPosition; |
| 3414 | } |
| 3415 | |
| 3416 | void ViewNode::setStickyPosition(int position) { |
| 3417 | int previous = _stickyPosition; |
| 3418 | _stickyPosition = position; |
| 3419 | // When transitioning out of sticky mode, release our native-priority hold on |
| 3420 | // translationY so JS writes (fade path, tests, or a later consumer) can regain |
| 3421 | // control. Without this, the header freezes at its last native-set displacement. |
| 3422 | if (previous == StickyPositionTop && position != StickyPositionTop && _viewNodeTree != nullptr) { |
| 3423 | _viewNodeTree->withLock([&]() { |
| 3424 | auto& scope = _viewNodeTree->getCurrentViewTransactionScope(); |
| 3425 | getAttributesApplier().removeAttribute( |