Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49167

Android specific Konva HTML5 rect drag lag

$
0
0

@leydar wrote:

When dragging a rect created with Konva the shape lags badly after the touch position. This only occurs on Android; the web and iOS versions are really good. To replicate in its simplest form:

  1. ionic start myApp blank
  2. Add a reference to konva in index.html before app.js.
    <script src="https://cdn.rawgit.com/konvajs/konva/1.0.3/konva.min.js"> </script>
  3. Add canvas div to the index.html ion-content
    <div id="canvas"></div>
  4. Instantiate the canvas, layer and rect in the ionicPlatform.ready function:
        var _stage = new Konva.Stage({
          container: 'canvas',
          width: 1000, height: 1000
        });
        var _layer = new Konva.Layer();
        var _rect = new Konva.Rect({
            x: 100, y: 100, width: 100, height: 100,
            fill: '#090',
            draggable: true
        });
        _layer.add(_rect);
        _stage.add(_layer);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>