fix draw part of diagram
fix redraw diagram onpause-onresume
ver++