RahpaelJS 调整图像大小
我想按照以下示例调整 RaphaelJS 中的图像大小:...。您可以看到,您可以随心所欲地移动鼠标,并且调整大小非常流畅。
在我的示例中: ... ,即使我使用相同的技术,调整大小也不是那么顺利,有时会停止。我做错了什么?
I want to resize an image in RaphaelJS following this example: ... . You can see there that you can move the mouse as fast as you want, and the resize is pretty smooth.
In my example: ... , even if I use the same technique, the resize is not that smooth and sometimes it stops. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎您不需要在 mousemove 上将光标类型设置为“移动”或“se-resize”。尝试仅将其放在 mousedown 事件上。您总是改变移动的类型
因此,如果您按鼠标按钮调整大小,那么当您快速移动鼠标时,仍然可以将光标类型更改为“移动”。
It seems that you don't need to set cursor type to 'move' or 'se-resize' on mousemove. Try to put that on mousedown event only. You always changing the type of your movement
So if you press mouse button to resize, it is still posible to change cursor type to 'move' when you move your mouse fast.