Closed RobLeachman closed 2 years ago
box = createSidebarItem(title, "<div/>", icon);
box.style.height = '100px';
That's pretty sweet @JefStat! Now how to calculate the right size? I mean I'll hardcode for now and thank you very much! but...
@RobLeachman Yeah the overview height doesn't fit the extra content when you start working/etc since it only takes into account the content added directly in createItem. I might use something like the below to give it a height of 50px more than the starting content or something like that, so that it has room to add extra lines from work / etc.
If you remove the px height, the height becomes whatever is needed for the content. But if you leave the px height off, height transitions don't work anymore, and you'll get a new px height added anyway as soon as you start resizing. So this seems to be the best way to fit height to content:
let fitHeightToContent=box=>{
box.style.height=""; //Height becomes normal height of content
box.style.height=box.offsetHeight+"px" //Explicitly sets new height equal to current height
}
This is awesome :) thanks for the quick work! A++ would whine again
(will go ahead and open an issue since the provided overview.js has this problem... mostly just a question)
I don't see a way to set the height of a new sidebar item. When my new item is added the height of the content is zero. Am I missing something? Thanks!