cytoscape / cyjShiny

An R/shiny widget for cytoscape.js
Other
92 stars 28 forks source link

`setNodeAttributes` should just call `node.data()` #9

Closed maxkfranz closed 5 years ago

maxkfranz commented 5 years ago
paul-shannon commented 5 years ago

Thanks, Max. I will make these changes.

paul-shannon commented 5 years ago

Done. package version 0.99.21 @maxkfranz - it took me a while to figure out I needed to make attributeName an array.

node.data({[attributeName]:  newValue});
maxkfranz commented 5 years ago

Yes, that's just es6 syntax sugar for this:

let payload = {};

payload[attributeName] = newValue;

node.data(payload);