Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private _enableScene(sceneIndex: number, force = false) {
let sceneStyle = Styles.combine([_styles.baseScene, _styles.sceneStyle, _styles.defaultSceneStyle]) as any;
// Then restore the top value for this scene.
const enabledSceneNativeProps = {
style: {
top: sceneStyle['top'],
bottom: sceneStyle['bottom'],
opacity: 1,
zIndex: 0,
transform: ''
}
};
if (!force && sceneIndex !== this.state.transitionFromIndex &&
sceneIndex !== this.state.presentedIndex) {
// If we are not in a transition from this index, make sure opacity is 0 to prevent the enabled scene from
// flashing over the presented scene.
render() {
assert(this.props.width && this.props.height, 'The width and height on imagesvg are mandatory.');
if (this.props.width > 0 && this.props.height > 0) {
let combinedStyles = RXStyles.combine([{
display: 'flex',
position: 'relative'
} as any, this.props.style]) as any;
if (this.props.fillColor !== undefined) {
combinedStyles.fill = this.props.fillColor;
}
if (this.props.fillOpacity !== undefined) {
combinedStyles.fillOpacity = this.props.fillOpacity.toString();
}
if (this.props.strokeColor !== undefined) {
combinedStyles.stroke = this.props.strokeColor;
}