|
|
@ -6,7 +6,7 @@ import React, { PureComponent } from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type Props = {
|
|
|
|
pathname: string;
|
|
|
|
pathname: string;
|
|
|
|
wrapper: ?HTMLElement;
|
|
|
|
wrapper: () => ?HTMLElement;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type State = {
|
|
|
|
type State = {
|
|
|
@ -71,8 +71,8 @@ class Indicator extends PureComponent<Props, State> {
|
|
|
|
handleResize: () => void;
|
|
|
|
handleResize: () => void;
|
|
|
|
|
|
|
|
|
|
|
|
reposition(resetAnimation: boolean = true) {
|
|
|
|
reposition(resetAnimation: boolean = true) {
|
|
|
|
if (!this.props.wrapper) return;
|
|
|
|
const wrapper = this.props.wrapper();
|
|
|
|
const { wrapper } = this.props;
|
|
|
|
if (!wrapper) return;
|
|
|
|
const active = wrapper.querySelector('.active');
|
|
|
|
const active = wrapper.querySelector('.active');
|
|
|
|
if (!active) return;
|
|
|
|
if (!active) return;
|
|
|
|
const bounds = active.getBoundingClientRect();
|
|
|
|
const bounds = active.getBoundingClientRect();
|
|
|
|