Add basic scroll for blocks details
This commit is contained in:
parent
3a1accaae1
commit
fc0d64fce7
1 changed files with 489 additions and 329 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { ChangeDetectorRef, Component } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ModalService, ModalType } from '../../services/modal.service';
|
||||
import { CancelService } from '../../services/cancel.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal',
|
||||
|
|
@ -9,16 +10,7 @@ import { ModalService, ModalType } from '../../services/modal.service';
|
|||
export class ModalComponent {
|
||||
ModalType = ModalType;
|
||||
|
||||
constructor(public modalService: ModalService, private changeDetectionRef: ChangeDetectorRef) {
|
||||
window.addEventListener('keydown', (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
this.modalService.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
/*window.addEventListener('resize', (_: UIEvent) => {
|
||||
console.log('resize');
|
||||
this.changeDetectionRef.markForCheck();
|
||||
});*/
|
||||
constructor(public modalService: ModalService, private cancelService: CancelService) {
|
||||
this.cancelService.subscribe(this, () => this.modalService.cancel());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue