Source switch on resize

support switchOnResize attribute