First Alpha
This commit is contained in:
@ -12,14 +12,14 @@ export class Router extends Component<{}, { next?: JSX.Element, current: JSX.Ele
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
Navigation.pageObservable.subscribe(this.onChange, true)
|
||||
Navigation.pageObservable.subscribe(this.onChange)
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
Navigation.pageObservable.unsubscribe(this.onChange)
|
||||
}
|
||||
|
||||
onChange([page]: JSX.Element[]) {
|
||||
onChange(page: JSX.Element) {
|
||||
this.setState({ next: page, current: this.state.next || this.state.current });
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ export class Router extends Component<{}, { next?: JSX.Element, current: JSX.Ele
|
||||
{this.state.next}
|
||||
</div>
|
||||
}
|
||||
return <div style="overflow:hidden; width: 1vw;">
|
||||
return <div style="position: relative; overflow-x: hidden; width: 100vw; height: 100vh;">
|
||||
<div class="transition_container" key={this.state.current.key} ref={elm => this.mounted = elm}>
|
||||
{this.state.current}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user