Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map((scene, index) => ({
...NavigationPropTypes.extractSceneRendererProps(this.props),
scene,
index,
navigation: addNavigationHelpers({
...this.props.navigation,
state: scene.route,
}),
}));
appBar = scenesProps.map(this._renderHeader, this);
} else {
appBar = this._renderHeader({
...NavigationPropTypes.extractSceneRendererProps(this.props),
position: new Animated.Value(this.props.scene.index),
progress: new Animated.Value(0),
});
}
// eslint-disable-next-line no-unused-vars
const { scenes, scene, style, position, progress } = this.props;
return (
);
}
}
constructor(props, context: any) {
super(props, context);
// The initial layout isn't measured. Measured layout will be only available
// when the component is mounted.
const layout = {
height: new Animated.Value(0),
initHeight: 0,
initWidth: 0,
isMeasured: false,
width: new Animated.Value(0),
};
this.state = {
layout,
position: new Animated.Value(this.props.navigation.state.index),
progress: new Animated.Value(1),
scenes: navigationScenesReducer([], this.props.navigation.state),
};
this._prevTransitionProps = null;
this._transitionProps = buildTransitionProps(props, this.state);
this._isMounted = false;
this._isTransitionRunning = false;
this._queuedTransition = null;
}
super(props, context);
// The initial layout isn't measured. Measured layout will be only available
// when the component is mounted.
const layout = {
height: new Animated.Value(0),
initHeight: 0,
initWidth: 0,
isMeasured: false,
width: new Animated.Value(0),
};
this.state = {
layout,
position: new Animated.Value(this.props.navigation.state.index),
progress: new Animated.Value(1),
scenes: navigationScenesReducer([], this.props.navigation.state),
};
this._prevTransitionProps = null;
this._transitionProps = buildTransitionProps(props, this.state);
this._isMounted = false;
this._isTransitionRunning = false;
this._queuedTransition = null;
}
constructor(props, context: any) {
super(props, context);
// The initial layout isn't measured. Measured layout will be only available
// when the component is mounted.
const layout = {
height: new Animated.Value(0),
initHeight: 0,
initWidth: 0,
isMeasured: false,
width: new Animated.Value(0),
};
this.state = {
layout,
position: new Animated.Value(this.props.navigation.state.index),
progress: new Animated.Value(1),
scenes: navigationScenesReducer([], this.props.navigation.state),
};
this._prevTransitionProps = null;
this._transitionProps = buildTransitionProps(props, this.state);
this._isMounted = false;
this._isTransitionRunning = false;
this._queuedTransition = null;
}
constructor(props, context: any) {
super(props, context);
// The initial layout isn't measured. Measured layout will be only available
// when the component is mounted.
const layout = {
height: new Animated.Value(0),
initHeight: 0,
initWidth: 0,
isMeasured: false,
width: new Animated.Value(0),
};
this.state = {
layout,
position: new Animated.Value(this.props.navigation.state.index),
progress: new Animated.Value(1),
scenes: navigationScenesReducer([], this.props.navigation.state),
};
this._prevTransitionProps = null;
this._transitionProps = buildTransitionProps(props, this.state);
this._isMounted = false;
import {createElement, Component, render} from 'rax';
import Text from 'rax-text';
import View from 'rax-view';
import Image from 'rax-image';
import Animated from 'rax-animated';
class AnimatedSample extends Component {
state = {
bounceValue: new Animated.Value(0),
translateValue: new Animated.ValueXY({
x: 0,
y: 0
}),
rotateValue: new Animated.Value(0),
};
render() {
return (
componentWillMount() {
this._animations = {
xRotationPercentage: new Animated.Value(0),
yRotationPercentage: new Animated.Value(0),
xTranslationPercentage: new Animated.Value(0),
yTranslationPercentage: new Animated.Value(0)
};
this._panResponder = PanResponder.create({
onStartShouldSetPanResponder: (evt, gestureState) => true,
onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
onMoveShouldSetPanResponder: (evt, gestureState) => true,
onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
onPanResponderMove: (e, gestureState) => {
var {
pageX: x,
pageY: y
} = e.changedTouches[0];
this._animations.xRotationPercentage.setValue(calculatePercentage(y, height));
this._animations.yRotationPercentage.setValue(calculatePercentage(x, width) * -1);
this._animations.xTranslationPercentage.setValue(calculatePercentage(x, width));
import {createElement, Component, render} from 'rax';
import Text from 'rax-text';
import View from 'rax-view';
import Image from 'rax-image';
import Animated from 'rax-animated';
class AnimatedSample extends Component {
state = {
bounceValue: new Animated.Value(0),
translateValue: new Animated.ValueXY({
x: 0,
y: 0
}),
rotateValue: new Animated.Value(0),
};
render() {
return (
componentWillMount() {
this._animations = {
xRotationPercentage: new Animated.Value(0),
yRotationPercentage: new Animated.Value(0),
xTranslationPercentage: new Animated.Value(0),
yTranslationPercentage: new Animated.Value(0)
};
this._panResponder = PanResponder.create({
onStartShouldSetPanResponder: (evt, gestureState) => true,
onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
onMoveShouldSetPanResponder: (evt, gestureState) => true,
onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
onPanResponderMove: (e, gestureState) => {
var {
pageX: x,
pageY: y
} = e.changedTouches[0];
constructor(props: {}) {
super(props);
var tile = this.props.tile;
this.state = {
opacity: new Animated.Value(0),
top: new Animated.Value(Tile._getPosition(tile.toRow())),
left: new Animated.Value(Tile._getPosition(tile.toColumn())),
};
}