Calculating node dimensions