Skip to content

Commit addfdbc

Browse files
authored
Merge branch 'master' into master
2 parents c0897dd + 3fc33bb commit addfdbc

File tree

2 files changed

+45
-14
lines changed

2 files changed

+45
-14
lines changed

Libraries/StyleSheet/StyleSheetTypes.js

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,41 @@ export type LayoutStyle<+Dimension = DimensionValue> = {
2424
+display?: 'none' | 'flex',
2525
+width?: Dimension,
2626
+height?: Dimension,
27-
+top?: Dimension,
2827
+bottom?: Dimension,
28+
+end?: Dimension,
2929
+left?: Dimension,
3030
+right?: Dimension,
31+
+start?: Dimension,
32+
+top?: Dimension,
3133
+minWidth?: Dimension,
3234
+maxWidth?: Dimension,
3335
+minHeight?: Dimension,
3436
+maxHeight?: Dimension,
3537
+margin?: Dimension,
36-
+marginVertical?: Dimension,
37-
+marginHorizontal?: Dimension,
38-
+marginTop?: Dimension,
3938
+marginBottom?: Dimension,
39+
+marginEnd?: Dimension,
40+
+marginHorizontal?: Dimension,
4041
+marginLeft?: Dimension,
4142
+marginRight?: Dimension,
43+
+marginStart?: Dimension,
44+
+marginTop?: Dimension,
45+
+marginVertical?: Dimension,
4246
+padding?: Dimension,
43-
+paddingVertical?: Dimension,
44-
+paddingHorizontal?: Dimension,
45-
+paddingTop?: Dimension,
4647
+paddingBottom?: Dimension,
48+
+paddingEnd?: Dimension,
49+
+paddingHorizontal?: Dimension,
4750
+paddingLeft?: Dimension,
4851
+paddingRight?: Dimension,
52+
+paddingStart?: Dimension,
53+
+paddingTop?: Dimension,
54+
+paddingVertical?: Dimension,
4955
+borderWidth?: number,
50-
+borderTopWidth?: number,
5156
+borderBottomWidth?: number,
57+
+borderEndWidth?: number,
5258
+borderLeftWidth?: number,
5359
+borderRightWidth?: number,
60+
+borderStartWidth?: number,
61+
+borderTopWidth?: number,
5462
+position?: 'absolute' | 'relative',
5563
+flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse',
5664
+flexWrap?: 'wrap' | 'nowrap',
@@ -124,21 +132,29 @@ export type ViewStyle<+Dimension = DimensionValue, +Color = ColorValue> = {
124132
+backfaceVisibility?: 'visible' | 'hidden',
125133
+backgroundColor?: Color,
126134
+borderColor?: Color,
127-
+borderTopColor?: Color,
128-
+borderRightColor?: Color,
129135
+borderBottomColor?: Color,
136+
+borderEndColor?: Color,
130137
+borderLeftColor?: Color,
138+
+borderRightColor?: Color,
139+
+borderStartColor?: Color,
140+
+borderTopColor?: Color,
131141
+borderRadius?: number,
132-
+borderTopLeftRadius?: number,
133-
+borderTopRightRadius?: number,
142+
+borderBottomEndRadius?: number,
134143
+borderBottomLeftRadius?: number,
135144
+borderBottomRightRadius?: number,
145+
+borderBottomStartRadius?: number,
146+
+borderTopEndRadius?: number,
147+
+borderTopLeftRadius?: number,
148+
+borderTopRightRadius?: number,
149+
+borderTopStartRadius?: number,
136150
+borderStyle?: 'solid' | 'dotted' | 'dashed',
137151
+borderWidth?: number,
138-
+borderTopWidth?: number,
139-
+borderRightWidth?: number,
140152
+borderBottomWidth?: number,
153+
+borderEndWidth?: number,
141154
+borderLeftWidth?: number,
155+
+borderRightWidth?: number,
156+
+borderStartWidth?: number,
157+
+borderTopWidth?: number,
142158
+opacity?: number | AnimatedNode,
143159
+elevation?: number,
144160
};

Libraries/Text/Text/RCTTextShadowView.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,21 @@ - (NSTextStorage *)textStorageAndLayoutManagerThatFitsSize:(CGSize)size
235235
return textStorage;
236236
}
237237

238+
- (void)applyLayoutNode:(YGNodeRef)node
239+
viewsWithNewFrame:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
240+
absolutePosition:(CGPoint)absolutePosition
241+
{
242+
if (YGNodeGetHasNewLayout(self.yogaNode)) {
243+
// If the view got new layout, we have to redraw it because `contentFrame`
244+
// and sizes of embedded views may change.
245+
_needsUpdateView = YES;
246+
}
247+
248+
[super applyLayoutNode:node
249+
viewsWithNewFrame:viewsWithNewFrame
250+
absolutePosition:absolutePosition];
251+
}
252+
238253
- (void)applyLayoutWithFrame:(CGRect)frame
239254
layoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection
240255
viewsWithUpdatedLayout:(NSMutableSet<RCTShadowView *> *)viewsWithUpdatedLayout

0 commit comments

Comments
 (0)