Skip to content

GridStack javascript component and wrong element moving #595

Closed
@Artgit

Description

@Artgit

In my AngularJS application I'm using GridStack component with a single column layout.

Right now I have an issue with a programmatic component moving.

For example I have a list of 5 elements:

e1
e2
e3
e4
e5

According to my application logic I have to move e1 to 3(third) place by Y axis. In order to do this I use GridStack.move method:

move(e1, 0, 3)

So far everything works fine. In order to move the same element to the position #4 I call:

move(e1, 0, 4)

So far everything works fine too.

But when I try to move this element back to position #2 with a following code:

move(e1, 0, 2)

it is moves to position #3 instead that is wrong.

Please use a following demo in order to reproduce this behavior:

http://decisionwanted.com/#/decisions/61209/comparison-of-antivirus-software-for-windows

Use input for entering a position number, for example 1, 2, 3, 4 etc in order to move the first element(Zemana Antiloger and Antimalware)

How to correctly move element back to a lower position than current ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions