open image on double click
This commit is contained in:
parent
9866ca9262
commit
30bee0db25
1 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue