Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GridStack javascript component and wrong element moving #595

Closed
Artgit opened this issue Jan 25, 2017 · 2 comments
Closed

GridStack javascript component and wrong element moving #595

Artgit opened this issue Jan 25, 2017 · 2 comments

Comments

@Artgit
Copy link

Artgit commented Jan 25, 2017

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 ?

@Artgit Artgit changed the title GridStack javascript component and element moving GridStack javascript component and wrong element moving Jan 26, 2017
@radiolips
Copy link
Member

Hey @Artgit ! Looks like I need a username and password for this site?

Programmatically moving widgets shouldn't be any problem. I can take a quick look at this when you provide user/pass, but it's possible that this may have to be resolved in the angular-gridstack repo.

@radiolips
Copy link
Member

Closing due to inactivity. Please reopen with more information if necessary.

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

No branches or pull requests

2 participants