fix(ui) - heatmaps index
This commit is contained in:
parent
39eb71b009
commit
0046539bf2
2 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import Marker from './ElementsMarker/Marker';
|
||||
|
||||
export default function ElementsMarker({ targets, activeIndex }) {
|
||||
return targets && targets.map(t => <Marker target={t} active={activeIndex === t.index}/>)
|
||||
return targets && targets.map(t => <Marker target={t} active={activeIndex === t.index - 1}/>)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ export default function Marker({ target, active }: Props) {
|
|||
height: `${ target.boundingRect.height }px`,
|
||||
}
|
||||
return (
|
||||
<div className={ cn(stl.marker, { [stl.active] : active }) } style={ style } onClick={() => activeTarget(target.index)}>
|
||||
<div className={stl.index}>{target.index + 1}</div>
|
||||
<div className={ cn(stl.marker, { [stl.active] : active }) } style={ style } onClick={() => activeTarget(target.index - 1)}>
|
||||
<div className={stl.index}>{target.index}</div>
|
||||
<Tooltip
|
||||
open={active}
|
||||
arrow
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue