Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connections can be highlighted multiple times #6501

Closed
maribethb opened this issue Oct 6, 2022 · 1 comment
Closed

Connections can be highlighted multiple times #6501

maribethb opened this issue Oct 6, 2022 · 1 comment
Labels
component: connection issue: bug Describes why the code or behaviour is wrong

Comments

@maribethb
Copy link
Contributor

Describe the bug

A connection can be highlighted multiple times, and there's no way to unhighlight it multiple times, as only the last reference is saved. This problem is exacerbated by the fact that there is no API to tell if a connection is already highlighted, as highlightPath is a private property.

Suggestion:

  • in highlight, if highlightPath already exists, then silently return early because it's already highlighted.
  • provide a isHighlighted method that returns true if highlightPath exists.

only one of the two is required, but both could be useful.

To Reproduce

connection.highlight();
connection.highlight();
connection.unhighlight();
connection.unhighlight();

connection is still highlighted.

Expected behavior

Connection is not highlighted multiple times.

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Stack Traces

Additional context

https://groups.google.com/g/blockly/c/lYbTqXR2yq4

@maribethb maribethb added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong component: connection and removed issue: triage Issues awaiting triage by a Blockly team member labels Oct 6, 2022
@maribethb
Copy link
Contributor Author

Closed by #6502 Thanks Koen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: connection issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

1 participant