drag & drop renewed, imageCropper revisited, imageOrder persisted, css quirks
This commit is contained in:
@@ -94,30 +94,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <p-carousel [value]="propertyImages" [numVisible]="3" [numScroll]="3" [circular]="false" [responsiveOptions]="responsiveOptions">
|
||||
<ng-template let-image pTemplate="item">
|
||||
<div class="border-1 surface-border border-round m-2 text-center py-5 px-3">
|
||||
<div class="mb-3">
|
||||
<img src="{{environment.apiBaseUrl}}/property/{{listing.id}}/{{image.name}}" [alt]="image.name" class="w-11 shadow-2" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="mt-5 flex align-items-center justify-content-center gap-2">
|
||||
<p-button icon="pi pi-file-edit" [rounded]="true" />
|
||||
<p-button icon="fa-solid fa-trash-can" [rounded]="true" severity="danger" (click)="deleteConfirm(image.name)"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</p-carousel> -->
|
||||
<div class="p-2 border-1 surface-border border-round mb-4 image-container" cdkDropList (cdkDropListDropped)="onDrop($event)"
|
||||
<div class="p-2 border-1 surface-border border-round mb-4 image-container" cdkDropListGroup mixedCdkDragDrop
|
||||
(dropped)="onDrop($event)"
|
||||
cdkDropListOrientation="horizontal">
|
||||
<ul >
|
||||
<li *ngFor="let image of propertyImages" class="p-2 border-round shadow-1" >
|
||||
<!-- <div class="image-container"> -->
|
||||
<img src="{{environment.apiBaseUrl}}/property/{{listing.id}}/{{image.name}}" [alt]="image.name" class="shadow-2" cdkDrag/>
|
||||
<!-- </div> -->
|
||||
</li>
|
||||
</ul>
|
||||
@for (image of propertyImages; track image) {
|
||||
<span cdkDropList mixedCdkDropList>
|
||||
<div cdkDrag mixedCdkDragSizeHelper class="image-wrap">
|
||||
<img src="{{environment.apiBaseUrl}}/property/{{listing.id}}/{{image.name}}"
|
||||
[alt]="image.name" class="shadow-2" cdkDrag>
|
||||
<fa-icon [icon]="faTrash" (click)="deleteConfirm(image.name)"></fa-icon>
|
||||
|
||||
</div>
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (listing.listingsCategory==='business'){
|
||||
|
||||
Reference in New Issue
Block a user