Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
timingFunction: 'ease-in-out',
delay: 0,
duration: 400
});
const curr = this.curr - 1;
if (curr > 0 && curr % length === 0) {
const round = curr / length;
const itemRound = Math.round(round / 2);
if (round % 2 === 1) {
this.fastAnimate(this.animateElement1, this.itemHeight * length * 2 * itemRound);
} else if (round % 2 === 0) {
this.fastAnimate(this.animateElement2, this.itemHeight * length * (2 * itemRound + 1));
}
// 兼容安卓高度不够被内容被隐藏的bug
setNativeProps(this.animateElement, {
style: {
height: this.itemHeight * this.itemHeight * length * (2 * itemRound + 2)
}
});
}
}
this.props.onRefresh(() => {
setNativeProps(findDOMNode(this._refresh), {
display: 'hide'
});
});
}
function ApplyAnimatedValues(instance, props) {
setNativeProps(instance, {
style: mapStyle(props.style)
});
}
clear = () => {
setNativeProps(this.refs.input, {value: ''});
};
fastAnimate(ref, height) {
setNativeProps(ref, {
style: {
top: height
}
});
}
animate = (visible) => {
if (!this.menuList) {
return;
}
const menuList = findDOMNode(this.menuList);
if (visible) {
setNativeProps(this.menuList, {
style: {
opacity: 0
}
});
setTimeout(() => {
transition(menuList, {
opacity: 1
}, {
timingFunction: 'ease',
delay: 0,
duration: 300,
}, () => {});
}, 50);
} else {
setTimeout(() => {
transition(menuList, {
componentWillReceiveProps(newProps) {
setNativeProps(this.refs.input, {value: newProps.value});
}