when receive resize event, invoke both scroll() and updateBar()