Results 1 to 2 of 2

Thread: Opacity level and animated show...

  1. #1
    Touch Premium Member
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    17

    Default Opacity level and animated show...

    I have tried searching for a similar issue and couldn't find one so I thought I would post.

    The problem I am having is I am trying to create a mask over an area on the page that fades in and out when the user clicks on a checkbox.


    After the page is loaded I do:

    getEl('mask').setOpacity(.5);

    and once the user clicks a checkbox I would do:

    if (e.getTarget().checked) {
    getEl('mask').hide(true);
    } else {
    getEl('mask').show(true);
    }

    The 'hide' works as it should and fades out, but the 'show' fades in past the opacity level set and continues until opacity == 1 (solid looking DIV).

    If there is an opacity set on an object, should the fade in stop when it hits the opacity level for the element?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    It currently does not do that. You'll have to animate the opacity yourself.

    You could file an enhancement request to ask that that Element.show takes a numeric opacity value as an optional second parameter, and passes it as the first parameter to Element.setVisible.

    And that Element.setVisible allows a numeric as parameter 1 which is the opacity level to animate to. 0 means hide. Boolean values would continue to work as normal.

    I think it's a nice enhancement...

Similar Threads

  1. getEl show bug on hidden block level elements
    By CableDawg in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 22 Feb 2007, 5:43 AM
  2. Opacity and Visibility Problems
    By JohnT in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 31 Jan 2007, 9:34 AM
  3. Animated Transitions in BorderLayout
    By jfaust97 in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2007, 11:33 AM
  4. Replies: 9
    Last Post: 24 Nov 2006, 8:24 PM
  5. Animated Dialog, help getting started please
    By JohnT in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 23 Oct 2006, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •