add resize event, close #1564