Results 1 to 4 of 4

Thread: [FIXED] El.center not centering properly

  1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    9
    Vote Rating
    0
      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 Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      0  

    Default

    Yes looks a bit wrong. I look into it.

  3. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    9
    Vote Rating
    0
      0  

    Default

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

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      0  

    Default

    Fixed in SVN.

Posting Permissions

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