iVis-at-Bilkent / cytoscape.js-clipboard

A Cytoscape.js extension to provide copy-paste utilities
MIT License
8 stars 4 forks source link

Allow user to provide custom functions to work on elements when copy/pasting #3

Closed royludo closed 7 years ago

royludo commented 7 years ago

This is a proposal to solve the problem of copying nodes with infoboxes. See iVis-at-Bilkent/newt#63

While doing this I also noticed that before all the changes related to infoboxes in Newt, the ids of infoboxes were duplicated on copy/paste and then saved as is in sbgnml. That was leading to duplicated IDs in the xml, which is invalid.

Both problems can be solved easily with these changes. We can use afterPaste() to maintain consistency of the data inside the pasted nodes.

metincansiper commented 7 years ago

I merged it.