react-native-lahk-marquee-label
Advanced tools
Comparing version 1.1.1 to 1.1.2
14
index.js
@@ -29,6 +29,6 @@ import React, { Component } from 'react'; | ||
componentWillReceiveProps(nextProps) { | ||
let newText = nextProps.text || nextProps.children || '' | ||
let oldText = this.props.text || this.props.children || '' | ||
let newText = nextProps.text || nextProps.children || ''; | ||
let oldText = this.props.text || this.props.children || ''; | ||
if (newText !== oldText) { | ||
this.state.animation.stop() | ||
this.state.animation.stop(); | ||
this.setState({ | ||
@@ -60,5 +60,3 @@ text: newText, | ||
} | ||
} | ||
if (duration !== 0) { | ||
} else { | ||
if (animation === null) { | ||
@@ -146,3 +144,3 @@ this.animatedTransformX.setValue(bgViewWidth); | ||
style={{ | ||
...styles.textMeasuringViewStyle, | ||
...styles.textSizeMeasuringViewStyle, | ||
...textStyle | ||
@@ -171,3 +169,3 @@ }} | ||
}, | ||
textMeasuringViewStyle: { | ||
textSizeMeasuringViewStyle: { | ||
opacity: 0, | ||
@@ -174,0 +172,0 @@ fontSize: 20 |
{ | ||
"name": "react-native-lahk-marquee-label", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A react-native marquee label component.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10936
152