You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that when a node is resized with this extension node.css('width') and node.css('height') are changing but node.data('width') and node.data('height') are not changing. I think that users may expect that upon node resize both css and data are changing.
As an example in the following node resize extension 'https://github.com/jhonatandarosa/cytoscape.js-noderesize' data changes upon node resize and then css changes as parallel to data with the following code segments:
// This code segement defines the style that resized nodes will have
cy.style().selector('.noderesize-resized').css({
'width': 'data(width)',
'height': 'data(height)',
});
// This is called when node is resized
node.addClass('noderesize-resized');
How about having such a structure?
The text was updated successfully, but these errors were encountered:
metincansiper
changed the title
Not changing node.data('width') and node.data('height') upon node resize
node.data('width') and node.data('height') are not changing upon node resize
Aug 17, 2016
Are we able to access width through node.data("width) on native cytoscape.js? If not I don't agree because whenever data changes, it will update style and trigger node-resize events. This may cause performance loss which is currently not perfect.
I think following code to be added to chise.js would be better to fix incompatibility: cy.on("resizeend", function(e, type, nodes){ nodes.each(function(i, ele){ ele.data("width", ele.width()); ele.data("height", ele.height()); }); })
I think that when a node is resized with this extension node.css('width') and node.css('height') are changing but node.data('width') and node.data('height') are not changing. I think that users may expect that upon node resize both css and data are changing.
As an example in the following node resize extension 'https://github.com/jhonatandarosa/cytoscape.js-noderesize' data changes upon node resize and then css changes as parallel to data with the following code segments:
How about having such a structure?
The text was updated successfully, but these errors were encountered: