Skip to content

Commit ab00745

Browse files
authored
Merge pull request #406 from DigitalSlideArchive/plot-onhover
Reduce console warning on plot hover
2 parents ecad238 + ab744d2 commit ab00745

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

histomicsui/web_client/panels/MetadataPlot.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ var MetadataPlot = Panel.extend({
217217
}
218218
const idx = evt.points[0].pointIndex;
219219
const image = this.lastPlotData.data[idx].image;
220+
if (!image) {
221+
return;
222+
}
220223
const maxw = 100, maxh = 100;
221224
const imgw = Math.min(Math.ceil(image.right - image.left) * 2, maxw);
222225
const imgh = Math.min(Math.ceil(image.bottom - image.top) * 2, maxh);

0 commit comments

Comments
 (0)