Todo: fix the bug in MouseRelease event to correctly resize the shape