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

reposition: 'drag' : Option to drag certain elements along with others #16

Closed
3 tasks done
maxkfranz opened this issue May 25, 2017 · 0 comments
Closed
3 tasks done

Comments

@maxkfranz
Copy link
Member

maxkfranz commented May 25, 2017

Sometimes you want to treat certain nodes as being dragged along with a particular node when it's grabbed. For example, you might want to drag along an entire component when a node within it is dragged.

Usecase : Dragging interaction participants in Factoid along with an interaction

  • reposition: 'drag' enables the mode on nodesMatching -- these are the nodes that get dragged with the master nodes
  • dragWith: otherNodes specifies the master nodes that are listened to for drag events
    • otherNodes can be a collection, selector, orfunction( node ){ return trueOrFalse; }
// for `reposition: 'drag'`, specify nodes that when dragged cause the matched nodes to move along
// - a function that returns true for nodes to be listened to for drag events
// - a selector that matches the nodes to be listened to for drag events
// - a collection of nodes to be ignored (very good for performance)
dragWith: function( node ){ return false; }
@maxkfranz maxkfranz changed the title reposition: 'dragalong' reposition: 'drag' : Option to drag certain elements along with others May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant