Closed d2fong closed 2 years ago
I think the bug is related to:
labelLocationMapper.valueCvtr
https://github.com/cytoscape/cytoscape-explore/blob/master/src/model/import-export/cx.js#L196
and the way that bypasses are applied:
https://github.com/cytoscape/cytoscape-explore/blob/master/src/model/import-export/cx.js#L408
But I am still unsure how they are related. It is not clear to me what is causing these values to become nested.
This statement is actually mutating the node label position look up table.
This means that after the first style that is generated from the style factory, it will mutate the lookup table and then subsequent calls to the lookup table will produce the wrong style values.
To fix this, I can use _.cloneDeep to make a copy of the lookup value result everytime the call to stylefactory. Or I can create the new return object.
Describe the bug
When CX Networks that have bypasses for node label positions are imported into CE, the resulting bypass is:
When a user in CE creates a node bypass for label location, the resulting bypass object looks like this:
This leads me to believe that the way that the CX importer applies node label position bypasses is wrong.
To Reproduce Steps to reproduce the behavior:
cy.exportCX2()
This leads to an error when round tripping a CX network with NODE_LABEL_POSITION properties.