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

Set movingOffset progmatically #249

Open
spstrademark opened this issue Jan 12, 2023 · 0 comments
Open

Set movingOffset progmatically #249

spstrademark opened this issue Jan 12, 2023 · 0 comments

Comments

@spstrademark
Copy link

Hello,

i am developing an application with multiple draggable objects that are in within of a div element with #myBounds that look like this :

<div #myBounds id="main-content" >
    <window  *ngFor="let item of itemss | async; index as i;"   [item]="item" [bounds]="myBounds" ></window>
</div>

the children have the following div content

<div>
     [bounds]="bounds"
     [inBounds]="true"
     ngDraggable
     (started)="onEventBegin($event)"
     (stopped)="onEventEnd($event)"
     (rzStart)="onEventBegin($event)"
     (rzStop)="onEventEnd($event)"
     ngResizable [rzHandles]="'n,e,s,w,se,sw,ne,nw'"
     rzMinHeight="200"
     rzMinWidth="200"
     [preventDefaultEvent]="true"
>
...
</div>

these elements are created dynamically by the user which he can drag around.
When the application is closed and reopened i want to have the old positions of the elements before it was closed.
I am saving the data width, height and transform in onEventEnd($event).
My question is how can i set the property movingOffset in the child div that it is being shown here https://xieziyu.github.io/angular2-draggable/#/draggable/usage/events programatically?

Thank you for your time!

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

No branches or pull requests

1 participant