JS: Convert window x,y, to canvas x.y