Project: titanium
Issue TIMOB-23209: Windows: Improve handling of view animations on multiple presses
h2. Description Using a sample app that animates a view's position on press, subsequent presses during an animation are not handled properly. each press seems to initiate the animation sequence on the same view from the current position, at the same time of the original animation. This is handled differently with iOS, in which a warning message is returned to the console for any additional presses of the view during an animation: {code:java} [WARN] : New layout set while view [object TiUIView] animating: Will relayout after animation. {code} A suggestion regarding this issue would be to achieve parity with iOS. h2. Steps to Reproduce 1. Create a classic mobile project on *Windows* 2. replace app.js with following sample code: {code:java} var win = Ti.UI.createWindow({backgroundColor:'green'}); var box = Ti.UI.createView({ backgroundColor: 'red', left: 100, height: '100', width: '100' }); var pin1 = Ti.UI.createView({ backgroundColor: 'blue', left: 150, height: '140', width: '6' }); var pin2 = Ti.UI.createView({ backgroundColor: 'blue', left: 200, height: '140', width: '6' }); var pin3 = Ti.UI.createView({ backgroundColor: 'blue', left: 250, height: '140', width: '6' }); win.add(pin1); win.add(pin2); win.add(pin3); win.add(box); var pos = 100; box.addEventListener('click', function () { pos += 50; var a = Ti.UI.createAnimation({ left: pos, duration: 2000, }); box.animate(a); }); win.open(); {code} 3. Build to Windows Phone device / emulator 10.0 4. Launch app 5. Press the red view, and press repeatedly as the animation is occurring. h2. Expected Result subsequent presses of the element should not initiate additional animations at the same time, and should be ignored. h2. Actual Result subsequent presses of the element initiates additional animations to the same view, at the same time.
Story points: 8