Skip to content

Commit 272dcfd

Browse files
committed
formatting
1 parent 6d735ba commit 272dcfd

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

packages/react-native/React/Fabric/Mounting/RCTMountingManager.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#import <UIKit/UIKit.h>
99

10+
#import <React/RCTFabricSurface.h>
1011
#import <React/RCTMountingManagerDelegate.h>
1112
#import <React/RCTPrimitives.h>
12-
#import <React/RCTFabricSurface.h>
1313
#import <react/renderer/core/ComponentDescriptor.h>
1414
#import <react/renderer/core/RawProps.h>
1515
#import <react/renderer/core/ReactPrimitives.h>
@@ -71,7 +71,9 @@ NS_ASSUME_NONNULL_BEGIN
7171
changedProps:(folly::dynamic)props
7272
componentDescriptor:(const facebook::react::ComponentDescriptor &)componentDescriptor;
7373

74-
- (void)measureAsyncOnUI:(ReactTag)reactTag rootView:(UIView*)rootView callback:(const std::function<void (folly::dynamic)> &)callback;
74+
- (void)measureAsyncOnUI:(ReactTag)reactTag
75+
rootView:(UIView *)rootView
76+
callback:(const std::function<void(folly::dynamic)> &)callback;
7577
@end
7678

7779
NS_ASSUME_NONNULL_END

packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -344,28 +344,28 @@ - (void)synchronouslyDispatchAccessbilityEventOnUIThread:(ReactTag)reactTag even
344344

345345
- (void)measureAsyncOnUI:(ReactTag)reactTag rootView:(UIView*)rootView callback:(const std::function<void (folly::dynamic)> &)callback {
346346
RCTAssertMainQueue();
347-
348-
UIView<RCTComponentViewProtocol> *view = [self->_componentViewRegistry findComponentViewWithTag:reactTag];
349-
if (!view) {
350-
// this view was probably collapsed out
351-
RCTLogWarn(@"measure cannot find view with tag #%@", reactTag);
352-
callback({});
353-
return;
354-
}
355-
356-
// By convention, all coordinates, whether they be touch coordinates, or
357-
// measurement coordinates are with respect to the root view.
358-
CGRect frame = view.frame;
359-
CGRect globalBounds = [view convertRect:view.bounds toView:rootView];
360-
361-
callback(
362-
folly::dynamic::array(frame.origin.x,
363-
frame.origin.y,
364-
globalBounds.size.width,
365-
globalBounds.size.height,
366-
globalBounds.origin.x,
367-
globalBounds.origin.y)
368-
);
347+
348+
UIView<RCTComponentViewProtocol> *view = [self->_componentViewRegistry findComponentViewWithTag:reactTag];
349+
if (!view) {
350+
// this view was probably collapsed out
351+
RCTLogWarn(@"measure cannot find view with tag #%@", reactTag);
352+
callback({});
353+
return;
354+
}
355+
356+
// By convention, all coordinates, whether they be touch coordinates, or
357+
// measurement coordinates are with respect to the root view.
358+
CGRect frame = view.frame;
359+
CGRect globalBounds = [view convertRect:view.bounds toView:rootView];
360+
361+
callback(
362+
folly::dynamic::array(frame.origin.x,
363+
frame.origin.y,
364+
globalBounds.size.width,
365+
globalBounds.size.height,
366+
globalBounds.origin.x,
367+
globalBounds.origin.y)
368+
);
369369
}
370370

371371
@end

0 commit comments

Comments
 (0)