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
With reference to the above (and this demo example: http://wwwendt.de/tech/fancytree/demo/#sample-ext-glyph-svg.html), I had an issue whereby the childcounter badges were being removed when the parent node was collapsed. When the parent node was re-expanded, any child nodes with badges were recreated without the badges. I believe this is because the call to replace the icon HTML with the svg element removed any badge, and the call to add the badge wasn't made until the node was reactivated.
To fix this, I have had to add the following to the glyph extension file at line 294:
if (node.folder === true) {
var newSpan = document.createElement('span');
newSpan.className = 'fancytree-childcounter';
newSpan.innerText = node.data.FilesUnderneathFolder;
span.appendChild(newSpan);
}
This ensures the badge counter is properly rendered each time.
Hope this helps!
The text was updated successfully, but these errors were encountered:
sophanox
changed the title
SVG font awesome 5 glyphs remove bade counter when parent node is collapsed.
SVG font awesome 5 glyphs remove badge counter when parent node is collapsed.
Dec 11, 2018
#839
With reference to the above (and this demo example: http://wwwendt.de/tech/fancytree/demo/#sample-ext-glyph-svg.html), I had an issue whereby the childcounter badges were being removed when the parent node was collapsed. When the parent node was re-expanded, any child nodes with badges were recreated without the badges. I believe this is because the call to replace the icon HTML with the svg element removed any badge, and the call to add the badge wasn't made until the node was reactivated.
To fix this, I have had to add the following to the glyph extension file at line 294:
This ensures the badge counter is properly rendered each time.
Hope this helps!
The text was updated successfully, but these errors were encountered: