Skip to content

Commit 7fa6c9d

Browse files
matysonmarcus-oscarsson
authored andcommitted
fix displayImage in SampleImage
- input correct parameters - fix indexes position on click
1 parent 32fcf96 commit 7fa6c9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/src/components/SampleView/SampleImage.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,20 +533,20 @@ class SampleImage extends React.Component {
533533
const [cellIdxX, cellIdxY] = this.drawGridPlugin.getClickedCellIndex(
534534
shapeData,
535535
option.target,
536-
option.pointer,
536+
option.e,
537537
);
538538

539539
const imgNum = this.drawGridPlugin.countCells(
540540
shapeData.cellCountFun,
541-
cellIdxY,
542541
cellIdxX,
542+
cellIdxY,
543543
shapeData.numRows,
544544
shapeData.numCols,
545545
);
546546

547547
const { resultDataPath } = shapeData;
548548
if (resultDataPath !== undefined) {
549-
this.props.displayImage(`${resultDataPath}&img_num=${imgNum}`);
549+
this.props.displayImage(resultDataPath, imgNum);
550550
}
551551
}
552552
}

0 commit comments

Comments
 (0)