Drag & Drop in canvas

♀尐吖头ヾ 提交于 2019-12-13 18:25:59

问题


I created a tree with canvas like this:

and source code is fiddle here.

<div id="ways" style="width:1000px;margin:0 auto;height:100%;">
<canvas id="canvas" width="1000" height="1000"></canvas>
</div>

I clicked first circle(ltr) and now that circle content is "X" and too when click on 5th circle become content to "X". And now I want when I click on first circle,then highlight the adjacent circle(s) i.e. 2th and 4th circles.Namely this x character just go to one of two and when clicked adjacent circle this character go to that position. How I can do this? Thanks for your answer!

来源:https://stackoverflow.com/questions/28842157/drag-drop-in-canvas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!