CompositionInteraction
Interaction with a composition by the mouse, like the pointer events of SVG documents in browsers: entered and exited when the pointer moves onto or off a node and the groups it is in, pressed, released and clicked for the topmost node under the pointer. transform maps the coordinates of the composition to those of the mouse, the transform the composition is drawn with.
val interaction = CompositionInteraction(composition).apply { listenTo(mouse) }
interaction.clicked.listen { println("clicked ${it.node.id} ${it.link}") }Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
the topmost node under the pointer and the groups it is in, the node first
Link copied to clipboard
the topmost node under the pointer, null when there is none
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
sends pressed for the node at the position of mouseEvent
Link copied to clipboard
sends released, and clicked when the node was pressed too, for the node at the position of mouseEvent