Feature/release cleanup (#597)
* Deselect all after bulk operations complete. * Implemented a way to trigger selection code on mobile. * When selection mode is active, make the clickable area the whole image. * Series detail shouldn't use gutters for card layout as it can cause skewing on mobile * Long press on card items to trigger the selection on mobile * Code cleanup * One more * Misread the code issue
This commit is contained in:
parent
5ceb74e210
commit
5e2606b0de
7 changed files with 54 additions and 25 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { ToastrService } from 'ngx-toastr';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { finalize, take, takeUntil, takeWhile } from 'rxjs/operators';
|
||||
|
|
@ -118,6 +118,24 @@ export class CardItemComponent implements OnInit, OnDestroy {
|
|||
this.onDestroy.complete();
|
||||
}
|
||||
|
||||
|
||||
prevTouchTime: number = 0;
|
||||
@HostListener('touchstart', ['$event'])
|
||||
onTouchStart(event: TouchEvent) {
|
||||
this.prevTouchTime = event.timeStamp;
|
||||
}
|
||||
|
||||
@HostListener('touchend', ['$event'])
|
||||
onTouchEnd(event: TouchEvent) {
|
||||
if (event.timeStamp - this.prevTouchTime >= 200) {
|
||||
this.handleSelection();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
this.prevTouchTime = 0;
|
||||
}
|
||||
|
||||
|
||||
handleClick(event?: any) {
|
||||
this.clicked.emit(this.title);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue