Results 1 to 4 of 4

Thread: [CLOSED] cmp.el.setHeight() breaks cmp.setHeight()

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [CLOSED] cmp.el.setHeight() breaks cmp.setHeight()

    I have a new issue introduced with 3.2 final. Before this was working as expected.

    Setup:
    I create a panel with fixed height. Later I need to resize it (change the height), while resizing should be animated. So I first call mycmp.el.setHeight() (as only el.setHeight() can be animated) and in it's callback mycmp.setHeight() (as el.setHeight() only touched the outermost div).

    Behaviour:
    The panel is constructed of four divs. On mycmp.el.setHeight() the outermost (class x-panel) gets resized properly (even animated), but the third (class x-panel-body) holds it's previous fixed size (that's why I have to make the second call, then to mycmp.setHeight()). On the following mycmp.setHeight(), nothing is changed in the third div.

    Reproduce:
    - Make a panel with fixed height in config
    - Expand it's height as described
    - Bam

    Workaround:
    - Use 3.2 Beta (no don't do it it has a nasty bug with grids in never-activated tabs)
    - Call only mycmp.setHeight(). The outermost div (x-panel) isn't touched, but the third (x-panel-body) gets its proper new height.


    Is this a real bug or is this intended couse of some weird voodoo things?

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

    Default

    It's not a bug. How do you expect it to know anything to resize any inner element just because you are setting the height of its outermost element?

    You have to be a bit cleverer than that to animate the size of a complex structure like that. You have to use the Ext.lib.anim and an onTween listener to sync the Component height with the Element height

  3. #3

    Default

    Thanks for the fast answer.

    Actually I didn't expect the component to be resized by .el.setHeight(), therefor I called the components .setHeight() after finishing the animation.

    I have no idea, why the x-panel-body div should not be touched after playing around with the encapsulating element. (btw, no js error message, neither in Firefox not Chrome).

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

    Default

    It should work if you do call setSize on the Panel. Must be something else. We need to see a testcase.

Posting Permissions

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