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

Skip to content

add_widget() change position of existing widgets #93

Closed
@iorom

Description

@iorom

I have noticed a strange behaviour, in my opinion.

I work with a grid with this options { float: true, height: 9, width: 6}. Initial, I have 14 completely locked widgets (locked, no-move, no-resize) on the full first row and full first column. The rest of the grid is empty.

I am adding manually widgets by clicking on a button:

grid.add_widget('<div class="grid-stack-item" data-gs-x="1" data-gs-y="1" data-gs-width="1" data-gs-height="1" data-gs-max-width="1" data-gs-max-height="6">......</div>', 1, 1, 1, 1, true);

If I add a widget (y=1,x=1) and then move it (drag&drop) to y=4,x=3, when I add another one the first one added will be moved to y=1,x=3.

I have deducted that when adding a widget, the last one moved by user before adding will not maintain its position and will pe moved on the same column to initial y or the next available.

Is this behaviour normal or intented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions