fix(ui) - heatmaps index

This commit is contained in:
Shekar Siri 2021-08-04 16:42:39 +05:30
parent 39eb71b009
commit 0046539bf2
2 changed files with 3 additions and 3 deletions

View file

@ -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}/>)
}

View file

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