fix dimension bug of canvas polygon