On resize recalculate only if the width has changed.