@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:
- ionic start myApp blank
- 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>- Add canvas div to the index.html ion-content
<div id="canvas"></div>- 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