@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.
@@ -2249,11 +2249,16 @@
2249
2249
  };
2250
2250
  ImgSelectionComponent.prototype.setTrashPosition = function (index) {
2251
2251
  this.trashPositionIndex = index;
2252
- if (this.trashPositionIndex = 0) {
2253
- this.trashPositionLeft = '-70px';
2252
+ if (this.imgSelectedList.length < 6) {
2253
+ if (this.trashPositionIndex === 0) {
2254
+ this.trashPositionLeft = '140px';
2255
+ }
2256
+ else {
2257
+ this.trashPositionLeft = 340 + ((index - 1) * 170) + 'px';
2258
+ }
2254
2259
  }
2255
- else {
2256
- this.trashPositionLeft = index * 135 + 'px';
2260
+ else if (this.imgSelectedList.length >= 6) {
2261
+ this.trashPositionLeft = '50%';
2257
2262
  }
2258
2263
  };
2259
2264
  ImgSelectionComponent.prototype.removeImgFromSelection = function (event) {
@@ -2273,7 +2278,7 @@
2273
2278
  ImgSelectionComponent = __decorate([
2274
2279
  core.Component({
2275
2280
  selector: 'img-selection',
2276
- 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"
2281
+ 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"
2277
2282
  }),
2278
2283
  __metadata("design:paramtypes", [ImgSelectionService])
2279
2284
  ], ImgSelectionComponent);