treant-js icon indicating copy to clipboard operation
treant-js copied to clipboard

Build a node from 'nodeInnerHTML' property not honoring HTMLclass node property

Open BillBuilt opened this issue 7 years ago • 0 comments

I love your utility! I stumbled on this today, not sure if it is by design or not, but if you are building your tree from 'nodeInnerHTML' property, and you set node: {HTMLclass: 'someClass'}, it will not set the class on the node. I had to change line 1888 in Treant.js from:

node.className += " node";

to

node.className += " node " + this.nodeHTMLclass;

for it to use the HTMLclass value.

BillBuilt avatar Aug 13 '17 01:08 BillBuilt