Note that there are some explanatory texts on larger screens.

plurals
  1. POKineticJS leaving behind ghost
    primarykey
    data
    text
    <p>So i recently added Kinetic.JS <strong>v4.6.0</strong> to my app, and tested out a simple rectangle drag and drop. </p> <p>Works fine on the web browser, but as soon as i use it on a mobile, it bugs out and leaves a ghost of the rectangle after dragging.</p> <p>I'm basically using the same script as the <a href="http://www.html5canvastutorials.com/kineticjs/html5-canvas-mobile-events/" rel="nofollow">demo</a>, without the touchStart/touchEnd events, i'm also using JQuery 1.9.1 and JQueryMobile-1.3.2. </p> <p>How can i get rid of this effect, i've tried clearing the layer on touchStart and drawing the stage again on touch End but the ghost stays there.</p> <p><strong>Edit</strong> My device is a Galaxy S2 running 4.2.2 and the ghosting happens, but the app works fine on the Ipad.</p> <p><strong>/index.JS</strong></p> <pre><code>$( window ).on( "pageinit", function ( event ) { stage = new Kinetic.Stage( { container: "container", width: 500, height: 500 } ); MapLayer = new Kinetic.Layer() var Rect = new Kinetic.Rect( { x: 0, y: 0, width: 100, height: 50, fill: 'green', stroke: 'black', strokeWidth: 4, draggable: true } ); MapLayer.add( Rect ); stage.add( MapLayer ); </code></pre> <p><strong>Index.HTML</strong></p> <pre><code>&lt;script src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.mobile-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script src="js/kinetic-v4.6.0.min.js"&gt;&lt;/script&gt; &lt;script src="js/index.js"&gt;&lt;/script&gt; &lt;title&gt;Mobile OneStop&lt;/title&gt; &lt;div data-role="page"&gt; &lt;div data-role="content"&gt; &lt;div id="container"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>( I might do a badly drawn paint image to show this off if people do not understand) </p> <p><strong>Edit</strong> <a href="http://imgur.com/a/HlNxj#0" rel="nofollow">http://imgur.com/a/HlNxj#0</a> - Ive changed a lot of the code since posting this, but the issue still remains.</p>
    singulars
    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.
 

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