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
All groups are deleted after moving a group #1744
Comments
To reproduce, you just have to select one top group, move it under another, place it anywhere, then delete it. All elements at is bottom will be deleted. I think this arrives because we manipulate DOM in a ng-repeat. But I can't guarantee that. |
Yep, I can reproduce this error without the layertree. So that's come from ngeo-sortable or from AngularJS. See a simple example here: https://ger-benjamin.github.io/ngeo/repeatError/examples/contribs/gmf/repeaterror.html Code here (js): https://github.com/ger-benjamin/ngeo/blob/repeatError/contribs/gmf/examples/repeaterror.js |
Or from both... That because of how works angularJS and how we move the DOM That's the normal state: And that's after we have moved the DOM: The comment |
I love angular ... |
Ok... I try a lot of things but I can't to solve the problem with ngeo-sortable... The only solution that I found is to use angular-ui-sortable instead. I try to manage this issue with the same idea that in angular-ui-sortable (save the state of the dom element then restore it if nothing has really moved) but i fail... I can't do any actionn on the elements after "restoring the DOM" perhaps because ngeo-sortable use goog and goog use goog uid..? What should I do ? (code / example not up to date) |
Note: this issue is not completely fixed. There are still issues with reordering that should be fixed with the layertree refactoring. |
Fixed with Layertree refactoring |
This is unfortunately not completely fixed. |
@pgiraud Can you provide a test case? |
Merci :-) |
To reproduce:
The text was updated successfully, but these errors were encountered: