You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When selecting a shape (Poligon, Line, etc.) it is uesful if there is an event which can capture the fact this happend.
Pitch
I am trying to implement a segmentation visualization where the generated segments are displayed as Polygon shapes in a Layer.
I would like to create a visualization, which displays specific information of a single Polygon, selected by the user.
Alternatives
Mouse click event, especially the doubleclick event can be captured, and by finding if the ursor position is inside a Shape, te event can be possibly deduced, but it is not ideal.
Additional context
The request was mentioned here originally.
I'll try to implement this feature, @brisvag could you please help where to start?
The text was updated successfully, but these errors were encountered:
Hi @OnionKiller, thanks for giving it a go! There are a few ways to go about it.
The "best" way (=harder lift and requires more discussion) would be refactor the Shapes layer to use our Selection object just like Points already do (see
and all the lines there that refer to self._selected_data). This way you'd contribute to unifying our layers and get "for free" the Shapes.selection.events to connect to.
The quicker way is to instead add an event to here:
and fire it whenever selected_data is changed. In fact, this makes me notice that you can technically use the highlight event as a stand-in for a selection event, now that I think about it... it won't work when the layer invisible maybe, but that probably won't matter.
馃殌 Feature
selected event for shapes in Shape layer
Motivation
When selecting a shape (Poligon, Line, etc.) it is uesful if there is an event which can capture the fact this happend.
Pitch
I am trying to implement a segmentation visualization where the generated segments are displayed as Polygon shapes in a Layer.
I would like to create a visualization, which displays specific information of a single Polygon, selected by the user.
Alternatives
Mouse click event, especially the doubleclick event can be captured, and by finding if the ursor position is inside a Shape, te event can be possibly deduced, but it is not ideal.
Additional context
The request was mentioned here originally.
I'll try to implement this feature, @brisvag could you please help where to start?
The text was updated successfully, but these errors were encountered: