Closed sashokbg closed 2 years ago
I've reviewed the PR, and it looks great.
Before it's merged in, do you think it would make sense to use a class name like cdnd-new-parent
to be consistent with the naming of newParentNode()
in options
?
https://github.com/cytoscape/cytoscape.js-compound-drag-and-drop#api
This issue has been automatically marked as stale, because it has not had activity within the past 30 days. It will be closed if no further activity occurs within the next 30 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.
Hello @maxkfranz I have updated the code to change the class to cdnd-new-parent and also rebased the branch with master.
Hello, I have documented the new class and also moved the callback description up. Sorry for the delay
v1.1.0 released
I have opened this PR in place of #17.
As you have suggested the library now detects automatically if a parent node is a "real node" and it prevents its deletion. To make this work I have added a class called "cdnd-fake-parent" for parents that can be removed.
I have also added E2E tests that prove it works.
You can run them with npm run test:e2e and check the generated report in test/reports