Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1364

spreadsheet displays right align text incorrectly after switching sheets

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9.4
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      1. load
      2. select the next sheet
      3. select back to the first sheet

      Current Result

      the text in right align is shifted

        Activity

        Hide
        hawk hawk added a comment - - edited

        Root Cause

        incorrect cell width causes the incorrect calculated left position of a text because when zss widget renders a right alignment text, it doesn't apply the sheet CSS file (not yet retrieve the sheet CSS from the server). Hence, the cell width it gets by jq(this.$n()).width is wrong.

        Solution

        If CSS is loaded (just scrolling not switching sheets), for those un-rendered cells, ZSS should process right alignment and overflow directly without waiting CSS loaded.
        If CSS is not loaded (switching sheets), process right alignment text and overflow after sheet CSS is ready by sheet.addSSInitLater().

        debug info

        • no way to make CSS applied before width calculation at the server side because zss widget renders at client side cells first when clicking a sheet tab before sending a request to a server.
        • it's harder to calculate a merged cell width by sheet.custColWidth.getSize() than by a DOM element, jq(this.$n()).width
        Show
        hawk hawk added a comment - - edited Root Cause incorrect cell width causes the incorrect calculated left position of a text because when zss widget renders a right alignment text, it doesn't apply the sheet CSS file (not yet retrieve the sheet CSS from the server). Hence, the cell width it gets by jq(this.$n()).width is wrong. Solution If CSS is loaded (just scrolling not switching sheets), for those un-rendered cells, ZSS should process right alignment and overflow directly without waiting CSS loaded. If CSS is not loaded (switching sheets), process right alignment text and overflow after sheet CSS is ready by sheet.addSSInitLater() . debug info no way to make CSS applied before width calculation at the server side because zss widget renders at client side cells first when clicking a sheet tab before sending a request to a server. it's harder to calculate a merged cell width by sheet.custColWidth.getSize() than by a DOM element, jq(this.$n()).width

          People

          • Assignee:
            hawk hawk
            Reporter:
            hawk hawk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: