NappUI
NappUI copied to clipboard
simultanious events break when view has fixed position.
NappUI: 1.2.2 Titanium SDK: 3.2.3GA
Below code works great it scales the view and rotates it simultaniously, but if i set a top:100, or a left:100 to pView, to give the view a startup position. u can pinch or u can rotate, not together anymore.
var pView = Ti.UI.createView({ height:300, width:300, recognizeSimultaneously:'pinching,rotate', rotateGesture:true, pinchingGesture:true, backgroundColor:'green', }); pView.addEventListener('pinching',function(e){ this.scale=e.scale; this.transform=Ti.UI.create2DMatrix().scale(e.scale).rotate(this.rotation); }); pView.addEventListener('rotate',function(e){ this.rotation=e.rotation*(180/Math.PI); this.transform=Ti.UI.create2DMatrix().rotate(this.rotation).scale(this.scale); });