mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c429ee9974
Summary: Changelog: [internal] Fabric's ScrollView was ignoring value of `ScrollView.contentInsetAdjustmentBehavior`, this diff fixes that. Reviewed By: shergin Differential Revision: D23102235 fbshipit-source-id: 8cf42e730b560a21d56d7e007059109ccd01154e
66 lines
1.8 KiB
C++
66 lines
1.8 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <react/renderer/components/scrollview/primitives.h>
|
|
#include <react/renderer/components/view/ViewProps.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
// TODO (T28334063): Consider for codegen.
|
|
class ScrollViewProps final : public ViewProps {
|
|
public:
|
|
ScrollViewProps() = default;
|
|
ScrollViewProps(ScrollViewProps const &sourceProps, RawProps const &rawProps);
|
|
|
|
#pragma mark - Props
|
|
|
|
bool alwaysBounceHorizontal{};
|
|
bool alwaysBounceVertical{};
|
|
bool bounces{true};
|
|
bool bouncesZoom{true};
|
|
bool canCancelContentTouches{true};
|
|
bool centerContent{};
|
|
bool automaticallyAdjustContentInsets{};
|
|
Float decelerationRate{0.998};
|
|
bool directionalLockEnabled{};
|
|
ScrollViewIndicatorStyle indicatorStyle{};
|
|
ScrollViewKeyboardDismissMode keyboardDismissMode{};
|
|
Float maximumZoomScale{1.0};
|
|
Float minimumZoomScale{1.0};
|
|
bool scrollEnabled{true};
|
|
bool pagingEnabled{};
|
|
bool pinchGestureEnabled{true};
|
|
bool scrollsToTop{true};
|
|
bool showsHorizontalScrollIndicator{true};
|
|
bool showsVerticalScrollIndicator{true};
|
|
Float scrollEventThrottle{};
|
|
Float zoomScale{1.0};
|
|
EdgeInsets contentInset{};
|
|
Point contentOffset{};
|
|
EdgeInsets scrollIndicatorInsets{};
|
|
Float snapToInterval{};
|
|
ScrollViewSnapToAlignment snapToAlignment{};
|
|
bool disableIntervalMomentum{false};
|
|
std::vector<Float> snapToOffsets{};
|
|
bool snapToStart{true};
|
|
bool snapToEnd{true};
|
|
ContentInsetAdjustmentBehavior contentInsetAdjustmentBehavior{
|
|
ContentInsetAdjustmentBehavior::Never};
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
SharedDebugStringConvertibleList getDebugProps() const override;
|
|
#endif
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|