ICEfaces
  1. ICEfaces
  2. ICE-3003

PanelDivider 2nd pane does not cover entire space

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      n/a

      Description

      2nd pane in panelDivider only covers about 97% of available orientation space. The 1% taken off of each side becomes apparent when used with larger widths.
      1. screenshot-1.jpg
        67 kB
      2. screenshot-2.jpg
        180 kB
      3. screenshot-3.jpg
        171 kB
      4. screenshot-4.jpg
        179 kB
      5. screenshot-5.jpg
        174 kB
      6. screenshot-6.jpg
        172 kB

        Issue Links

          Activity

          Philip Breau created issue -
          Philip Breau made changes -
          Field Original Value New Value
          Support Case References https://www.icesoft.ca:4443/supportilla/post_bug.cgi
          Philip Breau made changes -
          Attachment screenshot-1.jpg [ 10926 ]
          Philip Breau made changes -
          Description 2nd pane in panelDivider only covers about 90% of available orientation space. The 1% taken off of each side becomes apparent when used with larger widths. 2nd pane in panelDivider only covers about 97% of available orientation space. The 1% taken off of each side becomes apparent when used with larger widths.
          Ken Fyten made changes -
          Fix Version/s 1.7.1 [ 10122 ]
          Assignee Priority P2
          Assignee Yip Ng [ yip.ng ]
          Priority Major [ 3 ] Minor [ 4 ]
          Ken Fyten made changes -
          Link This issue is duplicated by ICE-3002 [ ICE-3002 ]
          yip.ng made changes -
          Attachment screenshot-2.jpg [ 10943 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16517 Fri Apr 25 12:12:01 MDT 2008 yip.ng ICE-3003
          Changed calculation of 2nd pane's dimensions to exactly fit the rest of the container.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDividerRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/resizablePanelGrid.js
          yip.ng made changes -
          Attachment screenshot-3.jpg [ 10944 ]
          yip.ng made changes -
          Attachment screenshot-4.jpg [ 10945 ]
          yip.ng made changes -
          Attachment screenshot-5.jpg [ 10946 ]
          yip.ng made changes -
          Attachment screenshot-6.jpg [ 10947 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16520 Fri Apr 25 13:44:58 MDT 2008 yip.ng ICE-3003
          Changed calculation of 2nd pane's dimensions to exactly fit the rest of the container.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/lib/extras/resizablePanelGrid.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDividerRenderer.java
          yip.ng made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          This fix causes a regression for ICE-2821 which needs to be resolved.

          Show
          Ken Fyten added a comment - This fix causes a regression for ICE-2821 which needs to be resolved.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          yip.ng added a comment -

          ICE-2822 was really not a duplicate of ICE-2821, so it has re-surfaced as this case (ICE-3003). In fact, this problem was caused by the fix for ICE-2821. There was always a 2 or 3 % gap created on the right or bottom pane. I have tried re-calculating the percentages to be more accurate, but since we can't use exact no. of pixels, there may still be a one or two pixels difference. This difference causes the gap to still appear (one of two pixels too few) or worse, it causes the right pane to wrap around (one or two pixels too many).

          The problem is compounded by window resizing. The window resizing event is not being handled now. So on window resizing, the browser still relies on the original percentage values to resize the panels, and it seems the pixel difference will just increase, making the gap bigger or the wrapping occurring more often.

          Show
          yip.ng added a comment - ICE-2822 was really not a duplicate of ICE-2821 , so it has re-surfaced as this case ( ICE-3003 ). In fact, this problem was caused by the fix for ICE-2821 . There was always a 2 or 3 % gap created on the right or bottom pane. I have tried re-calculating the percentages to be more accurate, but since we can't use exact no. of pixels, there may still be a one or two pixels difference. This difference causes the gap to still appear (one of two pixels too few) or worse, it causes the right pane to wrap around (one or two pixels too many). The problem is compounded by window resizing. The window resizing event is not being handled now. So on window resizing, the browser still relies on the original percentage values to resize the panels, and it seems the pixel difference will just increase, making the gap bigger or the wrapping occurring more often.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16624 Fri May 09 10:57:45 MDT 2008 yip.ng ICE-3003
          Changed to always use % values for the first pane dimensions, and always dynamically re-calculate pixel values for second pane dimensions.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp-portlet.css
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDivider.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDividerRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/resizablePanelGrid.js
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp.css
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/royale/royale.css
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/rime/rime.css
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/resources/css/rime/rime-portlet.css
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16625 Fri May 09 10:59:17 MDT 2008 yip.ng ICE-3003
          Changed to always use % values for the first pane dimensions, and always dynamically re-calculate pixel values for second pane dimensions.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/resources/css/rime/rime.css
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/resources/css/rime/rime-portlet.css
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp-portlet.css
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDivider.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/resources/css/xp/xp.css
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/lib/extras/resizablePanelGrid.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/resources/css/royale/royale.css
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/paneldivider/PanelDividerRenderer.java
          Hide
          yip.ng added a comment -

          Implemented fix that should solve issues in all the 3 cases ICE-2821, ICE-2822 and ICE-3003.

          The dimension of the 1st pane is specified as a %, while the dimension of the 2nd pane is specified as a dynamically calculated no. of pixels. The calculation occurs in these events:

          • component load
          • divider drag and drop
          • window resize

          Since there is no way to determine the exact no. of pixels in the padding, scrollbar, border, margin and margin collapsing, we have to make certain assumptions:

          • no padding in parent container div (not the one corresponding to the <panelDivider> tag, but the one created internally below that)
          • no margin in 1st pane and divider
          • no padding, border or margin in 2nd pane
            However, all the spacing and bordering can be simulated using divs containing the component or nested inside the panes.

          Note that offsetWidth includes the scrollbar width if a scrollbar is present, therefore (offsetWidth - clientWidth) doesn't always give you the border width.

          Firefox sometimes wraps the right pane around even though the pane should fit exactly in the container, therefore we have to leave a one pixel gap on the right. (Couldn't find a way to fix these after many tries. IE works fine in the many tests done so far.)

          There may be more than one divider panel on the same page, therefore on loading we need to remember not just one, but all of them for the window resize event handler.

          Show
          yip.ng added a comment - Implemented fix that should solve issues in all the 3 cases ICE-2821 , ICE-2822 and ICE-3003 . The dimension of the 1st pane is specified as a %, while the dimension of the 2nd pane is specified as a dynamically calculated no. of pixels. The calculation occurs in these events: component load divider drag and drop window resize Since there is no way to determine the exact no. of pixels in the padding, scrollbar, border, margin and margin collapsing, we have to make certain assumptions: no padding in parent container div (not the one corresponding to the <panelDivider> tag, but the one created internally below that) no margin in 1st pane and divider no padding, border or margin in 2nd pane However, all the spacing and bordering can be simulated using divs containing the component or nested inside the panes. Note that offsetWidth includes the scrollbar width if a scrollbar is present, therefore (offsetWidth - clientWidth) doesn't always give you the border width. Firefox sometimes wraps the right pane around even though the pane should fit exactly in the container, therefore we have to leave a one pixel gap on the right. (Couldn't find a way to fix these after many tries. IE works fine in the many tests done so far.) There may be more than one divider panel on the same page, therefore on loading we need to remember not just one, but all of them for the window resize event handler.
          yip.ng made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P2
          Assignee Yip Ng [ yip.ng ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: