Skip to content

wrong counting of minHeight for resizable widget #999

Closed

Description

@miroslav-peterka

At line

var strictCellHeight = Math.ceil(o.outerHeight() / o.attr('data-gs-height'));

is some mistake, IMHO because you forgot to take in equation vertical margin.

example:
cellHeight = 80px and vertical margin = 20px
item height is 3, minHeight is 2

minHeight in pixels should be 80 x 2 + 20 = 180px. but at pointed line is counted number 188px

803 + 220 = 280
280 / 3 = 93.3 ~= 94
94 * 2 = 188px

Activity

  1. radiolips commented on Nov 5, 2019

    @radiolips
    Member

    @miroslav-peterka you may certainly be correct. Could you provide an example that I could take a look at?
    (edited for clarity)

  2. adumesny commented on Nov 6, 2019

    @adumesny
    Member

    @miroslav-peterka you are absolutely right - here is the before when you can't drag smaller and after my fix (coming up) to take margin into account.

    before
    two_grids_before

    after
    two_grids_after

  3. added a commit that references this issue on Nov 13, 2019
  4. adumesny commented on Nov 13, 2019

    @adumesny
    Member

    fixed in upcoming 0.5.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions