open image on double click

This commit is contained in:
Denis-Cosmin NUTIU 2024-04-06 14:07:23 +03:00
parent 9866ca9262
commit 30bee0db25

View file

@ -59,9 +59,15 @@ class ImageTagsEntryControl(private val imagePath: String, predictions: List<Str
setupEventHandlers()
}
/**
* Sets up event handlers.
*/
private fun setupEventHandlers() {
// Open image on double-click.
imageView.addEventHandler(MouseEvent.MOUSE_CLICKED) {
onOpenImageClick()
if (it.clickCount >= 2) {
onOpenImageClick()
}
it.consume()
}
}