Open RHagendoorn opened 6 years ago
I solved it by changing the code slightly. In paper-tree-node.html add this function
_isIconHidden(icon) {
return icon == 'none';
}
then in the template bind the hidden
attribute like so
...
<div class="node-row">
<span class$="{{_computeClass(data.*)}}" on-click="toggleChildren"></span>
<iron-icon class="node-icon" icon$="{{_computeIcon(data.icon)}}"
hidden$="{{_isIconHidden(data.icon)}}" <-- ***** here *****
on-click="select"></iron-icon>
<span class="node-name" on-click="select">{{data.name}}</span>
</div>
...
If I understand correctly, it is currently not possible to not set an icon on the node. A workaround is to add icon 'none', however there is still a white space where the icon would normally be.