Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23209

Windows: Improve handling of view animations on multiple presses

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 5.3.0
    • Fix Version/s: Release 5.4.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Tested on:
      Windows 10 Home & Pro
      Windows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE)
      Appc Studio: 4.6.0.201604081249
      Ti SDK: 5.3.0.v20160413061223
      Appc NPM: 4.2.5-1
      Appc Core: 5.3.0-12
      Node: v4.4.2

    • Story Points:
      8
    • Sprint:
      2016 Sprint 11 SDK, 2016 Sprint 13 SDK

      Description

      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:

      [WARN] :   New layout set while view [object TiUIView] animating: Will relayout after animation.
      

      A suggestion regarding this issue would be to achieve parity with iOS.

      Steps to Reproduce

      1. Create a classic mobile project on Windows
      2. replace app.js with following sample code:

      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();
      

      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.

      Expected Result

      subsequent presses of the element should not initiate additional animations at the same time, and should be ignored.

      Actual Result

      subsequent presses of the element initiates additional animations to the same view, at the same time.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                htbryant Harry Bryant
                Reviewer:
                Christopher Williams
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code