Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Width and Height are changed below min-width/min-height #184

@cvillemure

Description

@cvillemure

If I set a widget to be min-width : 2 and min-height : 2 and the resize is available in the UI, I can visually resize a box below the minimum allowed values. We can see with the preview box, that it is effectively allowed to be smaller than the min sizes.

As expected, the boxed is maintained to it's min sizes, however, since the "preview" box was allowed to go smaller, when the resize operation is completed, the data attributes of the box, are 1,1 instead of 2,2.

Furthermore, if we try to move the box after, it thinks it's only 1x1 and so it's the space it is allowed to move, thus allowing boxes overlap.

Am I suppose to catch this myself with the onchange event and reset the data attributes manually, or is this a bug?

After a few investigation I was able to drill down the problem.

It does not occurs if the board is setup from an existing DOM :
https://jsfiddle.net/ssfk1kfa/17/

But it occurs if the board is setup from an array using the add_widget method :
https://jsfiddle.net/ssfk1kfa/18/

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