src/virtual-scrolling-tree/VirtualScrollingTree.js
function updateViewDimensions(totalItems) {
    let visibleItems = Math.floor(_(this).parent.offsetHeight / _(this).itemHeight);

    _(this).view.scrollbar.style.height = visibleItems * _(this).itemHeight + 'px';
    _(this).view.scrollbarContent.style.height = totalItems * _(this).itemHeight + 'px';
    
    let scrollbarWidth = totalItems < visibleItems? 0 : getNativeScrollbarWidth.call(this);
    
    if (!_(this).smoothScrolling) {
        _(this).view.content.style.width = Math.floor(_(this).el.getBoundingClientRect().width) - scrollbarWidth - 1 + 'px';
        _(this).view.scrollbar.style.width = scrollbarWidth + 1 + 'px';
        // Not needed for smooth
        _(this).view.content.style.height = visibleItems * _(this).itemHeight + 'px';
    } else {
        _(this).view.scrollbar.style.width = '100%';
        _(this).view.content.style.width = 'calc(100% - 1px)';
    }
}
function updateViewDimensions(totalItems) {
    let visibleItems = Math.floor(_(this).parent.offsetHeight / _(this).itemHeight);

    _(this).view.scrollbar.style.height = visibleItems * _(this).itemHeight + 'px';
    _(this).view.scrollbarContent.style.height = totalItems * _(this).itemHeight + 'px';
    
    let scrollbarWidth = totalItems < visibleItems? 0 : getNativeScrollbarWidth.call(this);
    
    if (!_(this).smoothScrolling) {
        _(this).view.content.style.width = Math.floor(_(this).el.getBoundingClientRect().width) - scrollbarWidth - 1 + 'px';
        _(this).view.scrollbar.style.width = scrollbarWidth + 1 + 'px';
        // Not needed for smooth
        _(this).view.content.style.height = visibleItems * _(this).itemHeight + 'px';
    } else {
        _(this).view.scrollbar.style.width = '100%';
        _(this).view.content.style.width = 'calc(100% - 1px)';
    }
}
function updateViewDimensions ( totalItems ) { let visibleItems = Math . floor ( _ ( this ) . parent . offsetHeight / _ ( this ) . itemHeight ) ; _ ( this ) . view . scrollbar . style . height = visibleItems * _ ( this ) . itemHeight + 'px' ; _ ( this ) . view . scrollbarContent . style . height = totalItems * _ ( this ) . itemHeight + 'px' ; let scrollbarWidth = totalItems < visibleItems ? 0 : getNativeScrollbarWidth . call ( this ) ; if ( ! _ ( this ) . smoothScrolling ) { _ ( this ) . view . content . style . width = Math . floor ( _ ( this ) . el . getBoundingClientRect ( ) . width ) - scrollbarWidth - 1 + 'px' ; _ ( this ) . view . scrollbar . style . width = scrollbarWidth + 1 + 'px' ; // Not needed for smooth _ ( this ) . view . content . style . height = visibleItems * _ ( this ) . itemHeight + 'px' ; } else { _ ( this ) . view . scrollbar . style . width = '100%' ; _ ( this ) . view . content . style . width = 'calc(100% - 1px)' ; } }
Updates the width of the tree to match its containing element.

@method updateViewDimensions
@private
Updates the width of the tree to match its containing element .