1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    9
    Vote Rating
    0
    me2 is on a distinguished road

      0  

    Default [FIXED] El.center not centering properly

    In com.extjs.gxt.ui.client.core.El the center(boolean constrainViewport) method appears to have a bug that is incorrectly computing the proper top/left coordinates.

    The following code is what looks wrong (around line 350 in the source):

    Code:
        int left = (width / 2) - (w / 2) + container.getScrollTop();
        int top = (height / 2) - (h / 2) + container.getScrollLeft();
    The "left" value is using the containers scroll value from the top, instead of from the left, and the "top" value is using the containers scroll value from the left instead of from the top.

    The line # was take from the 1.2.3 release of GXT

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,974
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default

    Yes looks a bit wrong. I look into it.

  3. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    9
    Vote Rating
    0
    me2 is on a distinguished road

      0  

    Default

    Thanks - looks like the El.center(Element container) method might have the same problem, lines 384, 385

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,974
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default

    Fixed in SVN.

Thread Participants: 1