mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-03 21:00:55 +00:00
calculate the Indicator position with scroll offset
This commit is contained in:
parent
1e7f0d35be
commit
e84e1867c7
@ -76,7 +76,7 @@ class Indicator extends PureComponent<Props, State> {
|
|||||||
const active = wrapper.querySelector('.active');
|
const active = wrapper.querySelector('.active');
|
||||||
if (!active) return;
|
if (!active) return;
|
||||||
const bounds = active.getBoundingClientRect();
|
const bounds = active.getBoundingClientRect();
|
||||||
const left = bounds.left - wrapper.getBoundingClientRect().left;
|
const left = bounds.left - wrapper.getBoundingClientRect().left + wrapper.scrollLeft;
|
||||||
const { state } = this;
|
const { state } = this;
|
||||||
|
|
||||||
if (state.style.left !== left) {
|
if (state.style.left !== left) {
|
||||||
|
Loading…
Reference in New Issue
Block a user