Skip to content
New issue

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

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

Already on GitHub? # to your account

Support for deselecting a node, or not selecting a node when an input becomes active #54

Closed
thepaperpilot opened this issue Aug 30, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@thepaperpilot
Copy link

thepaperpilot commented Aug 30, 2020

Currently, having an active attribute selects the node, which prevents users from dragging things in an attribute, because it drags the node instead. For example, focusing an input field in an attribute will prevent the user from dragging to select text within the field, and if its multiline the scrollbar cannot be dragged with the mouse.

To solve this, a flag could be added to attributes to prevent them from selecting the node when becoming active, or a method could be added to deselect a node, and that could be called when IsAnyAttributeActive returns true.

edit: If you end up adding the method to deselect the node (or all nodes), it could also be used to, e.g., deselect all nodes after deleting them. That is, if I delete all selected nodes, it would be nice if imnodes didn't still return those IDs in the next GetSelectedNodes call

@Nelarius
Copy link
Owner

Hi @thepaperpilot ! Sorry about the long response time.

Your suggestion is a good one, it's a bit of an oversight to not allow active item manipulation to be honest 😄 Do you think there are situations where you would want the current behaviour? Something like AttributeFlags_AllowActiveItemInteraction (or something similar) could be added to the AttributeFlags enum. But node selection could also be inhibited whenever there is an active item, without the ability to specify it on a node-by-node basis.

@Nelarius Nelarius added the enhancement New feature or request label Sep 24, 2020
@thepaperpilot
Copy link
Author

That's a good point, a flag may be unnecessary and it probably makes more sense to just not select the node when there is an active item.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants