mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 07:35:25 +00:00
Summary: All code styles are terribly ugly. We have the only choise - choise something and embrace it. This particular code style was borrowed from a neibour Fabric-friendly project because it follows established Facebook guides and respects client-side traditions. Reviewed By: mdvacca Differential Revision: D10218598 fbshipit-source-id: 8c4cf6713c07768566dadef479191661c79988f0
38 lines
994 B
C++
38 lines
994 B
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.
|
|
*/
|
|
|
|
#include "ScrollViewLocalData.h"
|
|
|
|
#include <fabric/debug/debugStringConvertibleUtils.h>
|
|
#include <fabric/graphics/conversions.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
ScrollViewLocalData::ScrollViewLocalData(Rect contentBoundingRect)
|
|
: contentBoundingRect(contentBoundingRect) {}
|
|
|
|
Size ScrollViewLocalData::getContentSize() const {
|
|
return Size{contentBoundingRect.getMaxX(), contentBoundingRect.getMaxY()};
|
|
}
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
std::string ScrollViewLocalData::getDebugName() const {
|
|
return "ScrollViewLocalData";
|
|
}
|
|
|
|
SharedDebugStringConvertibleList ScrollViewLocalData::getDebugProps() const {
|
|
return {
|
|
debugStringConvertibleItem("contentBoundingRect", contentBoundingRect)};
|
|
}
|
|
#endif
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|