Skip to content

Constraints #8

@ayozebarrera

Description

@ayozebarrera

I'm having a problem with the constraints:

I'm using React DnD (drag'n'drop) + React resizable to make a virtual desktop. When I open a Window, it has the two components and works fine except in the second render. (why a second render?)

When I drag the Window, the component dissapears, because I'm using a custom drag preview. So when we finish the drag, the preview dissapears, giving the place to the Window component.

I have the state of the window (width and height) to update the preview.

So, If I have a minConstraints={[300, 300]} and width={400} height={400} with the first render, works fine, but when I resize the window (lets say to width 800) and then drag, when its re-render if I resize the window, works fine except I can only resize to 800-300..

I think the key is the state bounds object.

Its like in the first render, it calculated how much you can resize to each direction... and I need a minWidth minHeight or something like that..

Maybe I'm totally wrong.. so I want your opinion ^^

Sorry If I didn't talk clearly 😄

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