9von10 / ngx-cytoscapejs

Angular 13+ Cytoscape.js Wrapper
MIT License
16 stars 5 forks source link

Access to attributeNameMap #9

Closed SherlockMones closed 2 years ago

SherlockMones commented 2 years ago

Hello kind sir,

Problem

I am using your library when rendering CX networks. The node and edge properties can be read from the core without any problems. I am however having issues with cytoscape.js selectors, since the CX converter changes their property names (they append _u1, _u2 etc to distinguish properties I guess).

Steps to reproduce

The changes in network property names can be validated via this tool: https://frankkramer-lab.github.io/NDExEdit.

The respective section in the converter: https://github.com/cytoscape/cx2js/blob/master/src/cx_to_js.js#L418

Favored solution

As far as I know, the correct property names, that can be used to make selections on the core, are stored in the attributeNameMap, the CX converter uses during conversion. If you could extend the library to add another Output() containing this attributeNameMap, that would be awesome.

Project

9von10 commented 2 years ago

Hello SherlockMones,

thanks again for another issue 😄. I've added the requested output. Please check out the just released version 1.1.0 on npm.

SherlockMones commented 2 years ago

That was fast, thanks! Works perfectly.