First Alpha

This commit is contained in:
Fabian
2019-03-24 21:25:08 -04:00
parent 3ef36ab6ca
commit 8b6c71247f
30 changed files with 636 additions and 478 deletions

View File

@ -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>