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

Windows: Animation returns to original opacity property when finished

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 5.4.0, Release 5.3.0
    • Fix Version/s: Release 6.0.0
    • Component/s: Windows
    • Environment:

      Windows 10 Pro
      Appc CLI Core: 5.4.0-33
      Appc CLI NPM: 4.2.7
      Ti SDK: 5.3.0.GA, 5.4.0.v20160713141635
      Appc Studio: 4.7.0.201607130543

    • Story Points:
      5
    • Sprint:
      2016 Sprint 15 SDK

      Description

      Description

      When using the code below, when the animation is complete the opacity property will be what it was set to before the animation started.

      var win = Ti.UI.createWindow({backgroundColor: 'red'}),
          img = Ti.UI.createImageView({width: '80%', height: '80%', image:'Logo.png', opacity:0.5});
       
      var anim = Ti.UI.createAnimation({
      	opacity:1,
      	duration:1000
      });
       
      win.addEventListener('click', function(){
      	img.animate(anim);
      });
       
      win.add(img);
      win.open();
      

      This a regression that first appears in 5.3.0.GA,

      Workaround

      As a workaround add an eventListener for the complete event and then set the property as required like below

      anim.addEventListener('complete', function(){
      	img.opacity = 1;
      });
       
      

      Steps to reproduce
      1. Using the code above, build for Windows Platform appc run -p windows -T wp-emulator -C 10-0-1
      2. Click the screen
      Actual result

      At the end of the animation the opacity of the image will return to the original value

      Expected

      The value at the end of the animation should be what is defined in the animation

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              eharris Ewan Harris
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-9927
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration