add dx&dy to MouseEvent, fix bugs
add resize