Tool `click` method does not work with button=2
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Run the supplied Python reproduction and trace the tool's click method invoked through figs[0].toolbar['inspect']._tool. Check how button=1 is handled versus button=2, then verify that the middle-click interaction produces the expected tool behavior without changing the existing left-click behavior.
Written by the indexing model from the issue text.
Description
As the title mentions, this method currently does not seem to do anything when button=2 is used to simulate middle-clicks. Code-snippet to test:
import scipp as sc
import plopp as pp
data_array = sc.DataArray(data=sc.ones(dims=['y', 'x', 't'], shape=[6,6,10]))
def test(rect):
print(f"deleting rectangle with ID {rect.id}")
figs = pp.inspector(data_array, mode='rectangle', orientation='vertical')
figs[0].toolbar['inspect']._tool.on_change(test)
figs[0].toolbar['inspect']._tool.start()
figs[0].toolbar['inspect']._tool.click(x=1, y=1, button=1)
figs[0].toolbar['inspect']._tool.click(x=5, y=5, button=1)
figs[0].toolbar['inspect']._tool.click(x=3, y=-3, button=2)
figs[0].toolbar['inspect']._tool.stop()
figs
- Dominant language
- Python
- Stars
- 12
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scipp/plopp
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100