@wizishop/img-manager 0.2.59 → 0.2.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2046,11 +2046,16 @@ var ImgSelectionComponent = /** @class */ (function () {
2046
2046
  };
2047
2047
  ImgSelectionComponent.prototype.setTrashPosition = function (index) {
2048
2048
  this.trashPositionIndex = index;
2049
- if (this.trashPositionIndex = 0) {
2050
- this.trashPositionLeft = '-70px';
2049
+ if (this.imgSelectedList.length < 6) {
2050
+ if (this.trashPositionIndex === 0) {
2051
+ this.trashPositionLeft = '140px';
2052
+ }
2053
+ else {
2054
+ this.trashPositionLeft = 340 + ((index - 1) * 170) + 'px';
2055
+ }
2051
2056
  }
2052
- else {
2053
- this.trashPositionLeft = index * 135 + 'px';
2057
+ else if (this.imgSelectedList.length >= 6) {
2058
+ this.trashPositionLeft = '50%';
2054
2059
  }
2055
2060
  };
2056
2061
  ImgSelectionComponent.prototype.removeImgFromSelection = function (event) {
@@ -2070,7 +2075,7 @@ var ImgSelectionComponent = /** @class */ (function () {
2070
2075
  ImgSelectionComponent = __decorate([
2071
2076
  Component({
2072
2077
  selector: 'img-selection',
2073
- template: "<div\n class=\"trash\"\n [ngClass]=\"{'trash--visible': dragStart}\"\n [style.left]=\"trashPositionLeft\"\n cdkDropList\n #unSelectList=\"cdkDropList\"\n (cdkDropListDropped)=\"removeImgFromSelection($event)\">\n\n <i class=\"far fa-trash\"></i>\n <p>{{'ImgManager.ImgSelection.unselect' | translate}}</p>\n</div>\n\n<div\n class=\"img-selection\"\n [ngClass]=\"{'img-selection--visible' : imgSelectedList && imgSelectedList.length}\">\n\n <div\n cdkDropList\n #selectionList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n class=\"list_img_selection\"\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListConnectedTo]=\"[unSelectList]\"\n >\n\n <div\n class=\"img_box\"\n *ngFor=\"let picture of imgSelectedList; let index = index\"\n cdkDrag\n (cdkDragStarted)=\"dragStart = true;\"\n (cdkDragEnded)=\"dragStart = false;\"\n >\n\n <img\n *ngIf=\"index < 1\"\n class=\"drag__img\"\n [src]=\"picture.file_name | imgSrc : '400'\"\n [title]=\"picture.display_name\"\n (mousedown)=\"setTrashPosition(index)\"\n />\n\n <img\n *ngIf=\"index > 0\"\n class=\"drag__img\"\n [src]=\"picture.file_name | imgSrc : '200'\"\n [title]=\"picture.display_name\"\n (mousedown)=\"setTrashPosition(index)\"\n />\n\n <span class=\"drag__tooltips\">{{'ImgManager.ImgSelection.tooltips' | translate}}</span>\n\n </div>\n </div>\n</div>\n\n<!-- Loader -->\n<ng-container *ngIf=\"isLoading && !(imgSelectedList && imgSelectedList.length)\">\n <wz-loader></wz-loader>\n</ng-container>\n"
2078
+ template: "<div\n class=\"trash\"\n [ngClass]=\"{'trash--visible': dragStart, 'trash--bottom': imgSelectedList.length > 5}\"\n [style.left]=\"trashPositionLeft\"\n cdkDropList\n #unSelectList=\"cdkDropList\"\n (cdkDropListDropped)=\"removeImgFromSelection($event)\">\n <p>{{'ImgManager.ImgSelection.unselect' | translate}}</p>\n</div>\n\n<div\n class=\"img-selection\"\n [ngClass]=\"{'img-selection--visible' : imgSelectedList && imgSelectedList.length}\">\n\n <div\n cdkDropList\n #selectionList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n class=\"list_img_selection\"\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListConnectedTo]=\"[unSelectList]\"\n >\n\n <div\n class=\"img_box\"\n *ngFor=\"let picture of imgSelectedList; let index = index\"\n cdkDrag\n (cdkDragStarted)=\"dragStart = true;\"\n (cdkDragEnded)=\"dragStart = false;\"\n >\n\n <img\n *ngIf=\"index < 1\"\n class=\"drag__img\"\n [src]=\"picture.file_name | imgSrc : '400'\"\n [title]=\"picture.display_name\"\n (mousedown)=\"setTrashPosition(index)\"\n />\n\n <img\n *ngIf=\"index > 0\"\n class=\"drag__img\"\n [src]=\"picture.file_name | imgSrc : '200'\"\n [title]=\"picture.display_name\"\n (mousedown)=\"setTrashPosition(index)\"\n />\n\n <span class=\"drag__tooltips\">{{'ImgManager.ImgSelection.tooltips' | translate}}</span>\n\n </div>\n </div>\n</div>\n\n<!-- Loader -->\n<ng-container *ngIf=\"isLoading && !(imgSelectedList && imgSelectedList.length)\">\n <wz-loader></wz-loader>\n</ng-container>\n"
2074
2079
  }),
2075
2080
  __metadata("design:paramtypes", [ImgSelectionService])
2076
2081
  ], ImgSelectionComponent);