Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12965] Mobile Web: Animating FontWidget UI elements doesn't work

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2017-05-01T22:36:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelslinvalid, mobileweb
ReporterRoman Kamenetsky
AssigneeChris Barber
Created2013-01-30T12:56:58.000+0000
Updated2018-04-04T23:20:32.000+0000

Description

The animation engine assumes the DOM node that needs to be updated is always elem.domNode, but for UI elements derived from FontWidget, the animation engine needs to animate the DOM nodes in elem._styleableDomNodes. Bug description: Ti.UI.Animation.color doesn't work Reproduction steps: Create label with green text Create Animation object Set Animation color to red and delay to 3 seconds Call animate on label Expected behavior: Label text should become red after 3 seconds Actual behavior: Label text doesn't change color. Note: test project is in the attachment Code example:
    var self = Ti.UI.createView();
   
    // Create a Label.
    var label = Ti.UI.createLabel({
        text : 'label',
        color : 'green',
        textAlign : 'center'
    });
   
    // Add to the parent view.
    self.add(label);
   
    var animation = Ti.UI.createAnimation();
    animation.color = 'red';
    animation.delay = 3000;

   
    self.addEventListener('postlayout',  function(e) {
        console.log('postlayout');
        label.animate(animation);
    });

Attachments

FileDateSize
AnimationSample.zip2013-01-30T12:56:58.000+00004925486

Comments

  1. Jamie Buckley 2013-03-05

    Tested with Code in 2.1.4 - 3.1.0:
       win = Ti.UI.createWindow({
       	backgroundColor: 'black'
       });
       var view = Ti.UI.createView({
       	backgroundColor: 'black'
       });
       
       var label = Titanium.UI.createLabel({
       	color: 'white',
       	text: 'click me',
          textAlign : 'center'
       });
       
       view.add(label);
       
       function animationHandler(){
       	view.animate({
           color: 'red',
       	duration:2000
             });
       
       }
       view.addEventListener('click',animationHandler);
       
       win.add(view);
       win.open();
       
  2. Lee Morris 2017-05-01

    Resolving ticket as "Won't Fix" as MobileWeb is no longer supported.
  3. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source