问题
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