Fabric: Proper defaults for ScrollView's alwaysBounce*

Summary: That's actually proper defaults. That fixes problems with horizontally bouncing ScrollView.

Reviewed By: mdvacca

Differential Revision: D10159458

fbshipit-source-id: b2b6df911b0a23f5e13539caeb48e51cdbc56528
This commit is contained in:
Valentin Shergin 2018-10-09 16:24:58 -07:00 committed by Facebook Github Bot
parent 4876928f9e
commit d38dffc8a0
2 changed files with 4 additions and 6 deletions

View File

@ -23,13 +23,11 @@ ScrollViewProps::ScrollViewProps(
alwaysBounceHorizontal(convertRawProp( alwaysBounceHorizontal(convertRawProp(
rawProps, rawProps,
"alwaysBounceHorizontal", "alwaysBounceHorizontal",
sourceProps.alwaysBounceHorizontal, sourceProps.alwaysBounceHorizontal)),
true)),
alwaysBounceVertical(convertRawProp( alwaysBounceVertical(convertRawProp(
rawProps, rawProps,
"alwaysBounceVertical", "alwaysBounceVertical",
sourceProps.alwaysBounceVertical, sourceProps.alwaysBounceVertical)),
true)),
bounces(convertRawProp(rawProps, "bounces", sourceProps.bounces, true)), bounces(convertRawProp(rawProps, "bounces", sourceProps.bounces, true)),
bouncesZoom(convertRawProp( bouncesZoom(convertRawProp(
rawProps, rawProps,

View File

@ -21,8 +21,8 @@ class ScrollViewProps final : public ViewProps {
#pragma mark - Props #pragma mark - Props
const bool alwaysBounceHorizontal{true}; const bool alwaysBounceHorizontal{};
const bool alwaysBounceVertical{true}; const bool alwaysBounceVertical{};
const bool bounces{true}; const bool bounces{true};
const bool bouncesZoom{true}; const bool bouncesZoom{true};
const bool canCancelContentTouches{true}; const bool canCancelContentTouches{true};