Looks like the relevant change is here. Indeed, reverting this function resolves the issue. @ahuang11
Notice that in the "After #101" video below, the erroneously created annotation also goes to the wrong axis. This remains the case even with #113. But I guess it doesn't matter because the intended behavior is to not allow new drag-created annotations when an existing annotation is selected, and edit mode is active.
Code
## This code is a bit simpler than what is shown in the video because the tabulator app is not yet merged.
```python
import holoviews as hv; hv.extension('bokeh')
import panel as pn; pn.extension()
import numpy as np
from holonote.annotate import Annotator
from holonote.app import PanelWidgets
annotator = Annotator({"x": float, "y": float}, fields=["description"])
annotator_widgets = PanelWidgets(annotator)
bounds = (-1, -1, 1, 1)
data = np.array([[0, 1], [1, 0]])
img = hv.Image(data, kdims=['x', 'y'], bounds=bounds)
img_right = hv.Image(data, kdims=['z', 'y'], bounds=bounds) # y as second kdim! so HSpan
left_plot = annotator * img
right_plot = annotator * img_right
layout = left_plot + right_plot
annotator.set_regions(x=(-0.15, 0.15), y=(-0.25, 0.25))
annotator.add_annotation(description="Test")
pn.Column(annotator_widgets, layout)
```
Looks like the relevant change is here. Indeed, reverting this function resolves the issue. @ahuang11
Notice that in the "After #101" video below, the erroneously created annotation also goes to the wrong axis. This remains the case even with #113. But I guess it doesn't matter because the intended behavior is to not allow new drag-created annotations when an existing annotation is selected, and edit mode is active.
Code
## This code is a bit simpler than what is shown in the video because the tabulator app is not yet merged. ```python import holoviews as hv; hv.extension('bokeh') import panel as pn; pn.extension() import numpy as np from holonote.annotate import Annotator from holonote.app import PanelWidgets annotator = Annotator({"x": float, "y": float}, fields=["description"]) annotator_widgets = PanelWidgets(annotator) bounds = (-1, -1, 1, 1) data = np.array([[0, 1], [1, 0]]) img = hv.Image(data, kdims=['x', 'y'], bounds=bounds) img_right = hv.Image(data, kdims=['z', 'y'], bounds=bounds) # y as second kdim! so HSpan left_plot = annotator * img right_plot = annotator * img_right layout = left_plot + right_plot annotator.set_regions(x=(-0.15, 0.15), y=(-0.25, 0.25)) annotator.add_annotation(description="Test") pn.Column(annotator_widgets, layout) ```Prior to #101 ✅
https://github.com/holoviz/holonote/assets/6613202/92ac1abf-e98e-4538-9584-2f0ba7f1efea
After #101 ❌
https://github.com/holoviz/holonote/assets/6613202/4a69bf7e-b6a9-4cea-acd2-90b65a1ec148