Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2718

Forbidden to set hflex/vflex and width/height at the same time

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Throw exception when user specify width/height with hflex/vflex together,
      while hflex/vflex = "min" is allowed.

        Issue Links

          Activity

          Hide
          jumperchen jumperchen added a comment -

          Ready since 4/23/2015

          Show
          jumperchen jumperchen added a comment - Ready since 4/23/2015
          Hide
          hiepgau hiepgau added a comment -

          hi @ChunfuChang, please help me review bellow improve
          in function setWidth has a check conditional:
          if (getHflex() != null && !getHflex().equals("min"))

          let me give you my case.
          i want set Hflex for a component, so i will call comp.setHflex(value)
          but i not sure beffore i already set width or hflex somewhere.
          so i will call comp.setWidth(null) to clear width if it exist.
          but if before i already set hfex. setWidth (null) will fail by above check condition.
          so i modify my code as below

          if (comp.getWidth() != null)
          comp.setWidth(null)
          comp.setHflex(value)

          it's ok, but not pretty good.
          maybe can you modify condition become
          if (width !=null && getHflex() != null && !getHflex().equals("min"))

          Show
          hiepgau hiepgau added a comment - hi @ChunfuChang, please help me review bellow improve in function setWidth has a check conditional: if (getHflex() != null && !getHflex().equals("min")) let me give you my case. i want set Hflex for a component, so i will call comp.setHflex(value) but i not sure beffore i already set width or hflex somewhere. so i will call comp.setWidth(null) to clear width if it exist. but if before i already set hfex. setWidth (null) will fail by above check condition. so i modify my code as below if (comp.getWidth() != null) comp.setWidth(null) comp.setHflex(value) it's ok, but not pretty good. maybe can you modify condition become if (width !=null && getHflex() != null && !getHflex().equals("min"))

            People

            • Assignee:
              ChunfuChang ChunfuChang
              Reporter:
              ChunfuChang ChunfuChang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h