Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow customizing the crosshair in
ui.interactive_image
(#3848)
These new props enable or disable drawing the corresponding line when cross is enabled. The motivation in my case was the need to show only the vertical crosshair line in an audio editing context (in this instance the audio is represented as an interactive_image element of a spectrogram). Simple demo of the functionality: ```py from nicegui import ui image = ui.interactive_image(source='https://picsum.photos/id/29/640/360', cross=True) def toggle_prop(prop: str) -> None: image._props[prop] = not image._props[prop] image.update() ui.button("toggle vertical", on_click=lambda: toggle_prop("cross_vertical")) ui.button("toggle horizontal", on_click=lambda: toggle_prop("cross_horizontal")) ui.run() ``` --------- Co-authored-by: Falko Schindler <falko@zauberzeug.com>
- Loading branch information