Fixed bug that layer will show when resize window

Fixed bug that layer will show when resize window