-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
unable to render the top and left position of the div with cdkdrag #14674
Comments
The CDK uses |
Wow that works... thanks a lot!
|
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
Glad that it worked out. I've submitted #14696 that adds a proper API for it since I can see this coming up in the future. |
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
yes..having an API is great. By the way after using the animations it works ...but sometimes the elements again jump. and surprisingly after reload of the page it starts working how do i debug the rendering of the jumping behaviour |
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
@crisbeto, This seems to be sitting in limbo--when can we expect to see this released. However, after setting my own translate to reposition the element after getting the top and left info from the server, the element skips around when I do initial drags and will only work correctly after refreshing the browser (the same behavior that @anandsunku is experiencing). |
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
Running into the same issues as what others are experiencing, the api is much needed. |
…draggable Adds an API that allows the consumer to get the current position of a standalone draggable and to set it. This is useful for cases where the dragged position should be preserved when the user navigates away and then restored when they return. Fixes angular#14420. Fixes angular#14674.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the expected behavior?
i am trying to store and restore the position of the div over sessions using local storage.
What is the current behavior?
after rendering the elements with stored left.px and top.px the elements are jumping.
` ngOnInit() {
let temp: any[] = [];
let tempstr = '';
}`
[ngStyle]="{'top.px':thing.top, 'left.px':thing.left}">
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: