Note that there are some explanatory texts on larger screens.

plurals
  1. POtouch issue with Raphael path
    primarykey
    data
    text
    <p>I have issue with freeline (Raphael)path when using touch. When i draw something with free hand, sometimes a straight line protrudes just before the fee line stops and connects to the center point of the raphael paper. Anyone have faced this issue? I attached a screen shot of what i am facing, i have marked in red the unwanted lines that connect to the center of the raphael paper. </p> <p>Update: Created <a href="http://jsfiddle.net/stackit/h4Wrr/" rel="nofollow noreferrer">jsfiddle</a></p> <p>Update2: Noticed that this issue happen in the android browser when drawing takes little long. Even if i just touch on the canvas for few sec, the touch point connect to the center by creating a line and the screen blinks when that happens. So, i am thinking it is something related to touch event when it touched for few seconds. </p> <p><img src="https://i.stack.imgur.com/zmWmr.jpg" alt="enter image description here"></p> <pre><code>var board = $("#board"); board.bind("mousedown", _mousedownHandler); board.bind("touchstart", _mousedownHandler); function _drawFreeLineBegin(x, y) { board.lineEl.path = _drawOptions.paper.path("M" + (x - _drawOptions.offset.left) + "," + (y - _drawOptions.offset.top)); _setNewElementProperties(board.lineEl.path, Configuration.getProperties("freeLine")); board.bind("mousemove.mmu", _mousemoveHandler); board.one("mouseup.mmu", _mouseupHandler); board.bind("touchmove.mmu", _mousemoveHandler); board.one("touchend.mmu", _mouseupHandler); } function _mousedownHandler(event) { if(event.type == "touchstart"){ event = event.originalEvent.touches\[0\]; } _drawFreeLineBegin(event.pageX, event.pageY); return false; } function _mousemoveHandler(event) { if(event.type == "touchmove"){ event = event.originalEvent.touches\[0\]; } board.lineEl.path .attr( "path", board.lineEl.path.attr("path") + "L" + (event.pageX - ) + "," + (event.pageY )); return true; } function _mouseupHandler(event) { board.unbind(".mmu"); board.lineEl.path = null; event.stopPropagation(); event.preventDefault(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload