fix canvas aspect ratio
This commit is contained in:
parent
4d560195cc
commit
2ed29438ee
|
|
@ -388,7 +388,6 @@
|
|||
scaleY = canvas_draw.height / rect.height;
|
||||
pos.x = (e.clientX - rect.x) * scaleX;
|
||||
pos.y = (e.clientY - rect.y) * scaleY;
|
||||
console.log(pos);
|
||||
}
|
||||
|
||||
// the draw function to draw onto canvas
|
||||
|
|
@ -1025,8 +1024,8 @@
|
|||
canvas.style.aspectRatio = video_aspect;
|
||||
|
||||
canvas_draw.style.aspectRatio = video_aspect;
|
||||
canvas_draw.width = canvas_draw.width*5;
|
||||
canvas_draw.height = canvas_draw.height*5;
|
||||
canvas_draw.width = canvas_draw.height*video_aspect;
|
||||
streaming = true;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue