add proper resize slide function to slide preview