javascript 如何通过 onTouch 方法触摸来移动 html5 画布元素(矩形)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10582058/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 10:20:35  来源:igfitidea点击:

How to move a html5 canvas element(rectangle) by touching it by onTouch method

javascripthtml

提问by Laxmi Kant

I have created a rectangle inside a canvas and i want to move it right side by touching this rectangle.it may just like draging rectangle along a straight line. Thanks in advance

我在画布内创建了一个矩形,我想通过触摸这个矩形将它向右移动。它可能就像沿直线拖动矩形一样。提前致谢