Add some logics of drawing transition