syntagmatic / parallel-coordinates

A d3-based parallel coordinates plot in canvas. This library is no longer actively developed.
http://syntagmatic.github.com/parallel-coordinates/
Other
511 stars 211 forks source link

fully remove g when `removeAxes` #266

Closed timelyportfolio closed 8 years ago

timelyportfolio commented 8 years ago

As I was testing #265 I found what I think to be a bug in removeAxes. While removeAxes does g.remove(), g remains even though the elements have been removed from the DOM. With createAxes, the first line if (g) pc.removeAxes(); takes care of this problem. However, reorderable does this if (!g) pc.createAxes();, so it still sees g even if we called removeAxes(). I think we can resolve all problems by simply setting g = undefined after g.remove in removeAxes().

Disclaimer:: my JavaScript is not real strong. I actually am using this for a htmlwidget in R, so I apologize if I am missing something obvious.

Thanks for this fantastic work!

syntagmatic commented 8 years ago

I support merging this.

dehli commented 8 years ago

Hi @syntagmatic, I tested this locally and it's working fine for me. Should we go ahead and merge this then?