Reputation: 87
Suppose you enabled box selection in cytoscapejs or you do something like:
cy.nodes().select();
when the user clicks a button. So, the user is able to select multiple nodes at once.
When registering the handler for the select event on nodes:
cy.nodes().on('select', function(evt){
...
}
Is there any way to know if the selection of a node is due to:
Thanks!
Upvotes: 0
Views: 235
Reputation: 12250
You can track the events coming in to determine the type of selection (i.e. tap
versus tapstart
-tapdrag
-tapend
/ tap
versus box
). You can keep a counter, declared outside the event callback, to track element indices if you want --- though the indicies won't really mean anything.
Upvotes: 0