Open scottheappey opened 5 years ago
I managed to save the position. But I'm sure there is a better way to write this:
<div *ngIf="xitem.x" ngDraggable (endOffset)="onMoveEnd(xitem, $event)" [position]='{x: xitem.x, y:xitem.y}' ngResizable [rzHandles]="'n,e,s,w,se,sw,ne,nw'" (rzStop)="onResizeStop(xitem, $event)" id="pill" class="pill"> ....
and
<div *ngIf="!xitem.x" ngDraggable (endOffset)="onMoveEnd(xitem, $event)" ngResizable [rzHandles]="'n,e,s,w,se,sw,ne,nw'" (rzStop)="onResizeStop(xitem, $event)" id="pill" class="pill"> ....
Now I need to save the size and position after resizing ...
Geting x=Nan & y=Nan
How do I write this so that if undefined don't use:
[position]='{x: xitem.x, y:xitem.y}'