已采纳回答 / zhf_top
不需要这么麻烦,用context.setLineDash([number1, number2]),就可以了,参数的数组是虚线的参数,分别单表实线的长度和空格的长度。
2016-03-23
最赞回答 / 小鸡三号
已经找到解决方法:var isMouseMove = false; canvas.onmouseup = function(e){ e.preventDefault(); isMouseDown = false; var curLoc = windowToCanvas(e.clientX ,e.clientY); console.log(curLoc.x +"," + curLoc.y +"," +lastLoc.x+"," +lastLoc...
2016-01-26