Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class MarqueeText extends PureComponent<IMarqueeTextProps, IMarqu
marqueeOnStart: false,
marqueeDelay: 0,
marqueeResetDelay: 0,
onMarqueeComplete: () => {},
onMarqueeComplete: () => { },
useNativeDriver: true,
};

Expand Down Expand Up @@ -215,11 +215,11 @@ export default class MarqueeText extends PureComponent<IMarqueeTextProps, IMarqu
render(): ReactNode {
const { children, style, ...rest } = this.props;
const { animating } = this.state;
const { width, height } = StyleSheet.flatten(style);
const { width, height, opacity } = StyleSheet.flatten(style);

return (
<View style={[styles.container, { width, height }]}>
<Text numberOfLines={1} {...rest} style={[style, { opacity: animating ? 0 : 1 }]}>
<Text numberOfLines={1} {...rest} style={[style, { opacity: opacity ? 0 : animating ? 0 : 1 }]}>
{children}
</Text>
<ScrollView
Expand Down