rn-marquee-text 2.1.0-beta.1 → 2.1.1-beta.1

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.
@@ -170,24 +170,15 @@ var MarqueeText = React.forwardRef(function (_a, ref) {
170
170
  { backgroundColor: backgroundColor },
171
171
  style,
172
172
  {
173
- height: isVertical && contentSize.height > 0
174
- ? contentSize.height
175
- : isVertical
176
- ? 20 // fallback height
177
- : undefined,
178
- width: !isVertical && contentSize.width > 0
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
- var layout = ev.nativeEvent.layout;
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">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-marquee-text",
3
- "version": "2.1.0-beta.1",
3
+ "version": "2.1.1-beta.1",
4
4
  "description": "A customizable marquee (scrolling) text component for React Native",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",