Questions tagged «scrollwheel»


4
将画布缩放到鼠标光标
我正在编写一个HTML5 <canvas>项目,该项目涉及使用滚轮放大和缩小图像。我想像Google Maps一样向光标方向缩放,但是我完全不知道如何计算运动。 我所拥有的:图像x和y(左上角);图像的宽度和高度;光标x和y相对于画布中心的位置。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.