rn-marquee-text 2.1.0-beta.1 → 2.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MarqueeText.js +7 -16
- package/package.json +1 -1
package/dist/MarqueeText.js
CHANGED
|
@@ -170,24 +170,15 @@ var MarqueeText = React.forwardRef(function (_a, ref) {
|
|
|
170
170
|
{ backgroundColor: backgroundColor },
|
|
171
171
|
style,
|
|
172
172
|
{
|
|
173
|
-
height: isVertical &&
|
|
174
|
-
?
|
|
175
|
-
:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
? contentSize.width
|
|
180
|
-
: !isVertical
|
|
181
|
-
? 100 // fallback width
|
|
182
|
-
: undefined,
|
|
173
|
+
height: isVertical && contentMeasurement.value.height > 0
|
|
174
|
+
? contentMeasurement.value.height
|
|
175
|
+
: undefined,
|
|
176
|
+
width: !isVertical && contentMeasurement.value.width > 0
|
|
177
|
+
? contentMeasurement.value.width
|
|
178
|
+
: undefined,
|
|
183
179
|
},
|
|
184
180
|
]} onLayout={function (ev) {
|
|
185
|
-
|
|
186
|
-
contentMeasurement.value = layout;
|
|
187
|
-
runOnJS(setContentSize)({
|
|
188
|
-
width: layout.width,
|
|
189
|
-
height: layout.height,
|
|
190
|
-
});
|
|
181
|
+
containerMeasurement.value = ev.nativeEvent.layout;
|
|
191
182
|
}} pointerEvents="box-none">
|
|
192
183
|
<GestureDetector gesture={pan}>
|
|
193
184
|
<Animated.View style={isVertical ? styles.column : styles.row} pointerEvents="box-none">
|