#451 ✓invalid
Mathieu Simard

Highlight "do not queue" freezes on color

Reported by Mathieu Simard | 2011-01-21 20:55:18 UTC

If I set queue:false I get a frozen color, no animation.

new Fx.Highlight(this.extentInput, {duration:'long', transition:'Log', queue:false}).start('lightblue');

Comments and changes to this ticket

  • MadRabbit

    MadRabbit 2011-01-23 18:54:54 UTC

    • State changed from “new” to “invalid”

    That's because of native css-transitions in the Fx module. It doesn't allow you to run several changes in parallel on the same element. If you need to run several effects at the same time, try to put all of them into a single #morph call, or use the engine='javascript' option with all the effects, kinda like that

    $('element')
      .setStyle('background: yellow')
      .morph({
        width: '200px',
        background: 'white'
      });
    
    // or like that
    
    $('element')
      .morph({width: '200px'}, {engine: 'javascript'})
      .highlight('blue', {engine: 'javascript'});
    

    And also don't use colornames out of the CSS1 definition, old versions of Opera wont't reconginze them. You can find the exact list of supported colors at String.COLORS (you can add your own in there if you like)

  • Mathieu Simard

    Mathieu Simard 2011-01-24 17:45:49 UTC

    So is there a way to tell an element not to queue highlights.
    As in, if my element is being highlighted all other highlight demands are ignored and not queued?

  • MadRabbit

    MadRabbit 2011-01-24 17:54:17 UTC

    You can use the queue: false option the usual way, you just need to use engine: 'javascript' with it as well. sorry I've misprinted the last example, it should be like that

    $('element')
      .morph({width: '200px'}, {engine: 'javascript'})
      .highlight('blue', {engine: 'javascript', queue: false});
    

    Or you can set the engine option globally like that

    Fx.Options.engine = 'javascript';
    
    $('element')
      .morph({width: '200px'})
      .highlight('blue', {queue: false});
    
  • Mathieu Simard

    Mathieu Simard 2011-01-24 19:23:31 UTC

    Seems to do it. Thanks!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Pages