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
As the user interacts with "layers", we can receive emitted events such as:
inserting (layer)
inserted (layer)
removing (layer)
removed (layer)
We need similar events for "items" in points and shapes layers (maybe labels layers).
This will allow plugins to be more interactive. Currently, plugins that interact with a layers "items" behave more like "batch" scripts and do not take into account edits made to the layer such as "items" added and deleted. Napari needs to emit a full set of editing signals such that plugins can easily implement a CRUD interface to create, read, update, and delete.
Thing like:
'item about to be added'
'item about to be deleted'.
Useful outcomes of this king of (proposed) event system are that analysis pipelines can:
Update in response to edits
Reject edits if the state of the plugin should not allow a given edit. For example, an event like "item about to be added" can be rejected.
We can implement "undo" for edits such ass (add, delete, move). SUPER USEFULL for NAPARi !!!
Proposal
For each layer, we need (add, delete, select) events:
add
adding: about to add **
added: have been added
delete
deleting: about to delete **
deleted: have been deleted
select
selecting: about to select **
selected: have been selected
** plugin can reject add, delete, select if its internal state should not allow it.
Notes
This is where vispy responds to highlight event
# connects to signal
self.layer.events.highlight.connect(self._on_highlight_change)
# respond to signal
napari._vispy.layers.points.VispyPointsLayer._on_highlight_change
The text was updated successfully, but these errors were encountered:
As the user interacts with "layers", we can receive emitted events such as:
We need similar events for "items" in points and shapes layers (maybe labels layers).
This will allow plugins to be more interactive. Currently, plugins that interact with a layers "items" behave more like "batch" scripts and do not take into account edits made to the layer such as "items" added and deleted. Napari needs to emit a full set of editing signals such that plugins can easily implement a CRUD interface to create, read, update, and delete.
Thing like:
Useful outcomes of this king of (proposed) event system are that analysis pipelines can:
Proposal
For each layer, we need (add, delete, select) events:
add
delete
select
** plugin can reject add, delete, select if its internal state should not allow it.
Notes
This is where vispy responds to
highlight
eventThe text was updated successfully, but these errors were encountered: