mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-08 15:15:12 +00:00
fix(console): migrate from tslint to eslint, project delete from table (#2490)
* es lint * modify tsconfig, auto lint some stuff * lint * lint * lint * lint * html ts lint * lint * lint, tsconfig * fix project delete, state table * eslint config, remove cnslHint directive * mfa selector, info row fixes * lint * fix login policy, granted orgs table state, lint Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
parent
bdf63800f7
commit
b1caef81da
@@ -1,32 +1,32 @@
|
||||
import { Directive, ElementRef, EventEmitter, HostListener, Output } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[appScrollable]',
|
||||
selector: '[cnslScrollable]',
|
||||
})
|
||||
export class ScrollableDirective {
|
||||
// when using this directive, add overflow-y scroll to css
|
||||
@Output() scrollPosition: EventEmitter<any> = new EventEmitter();
|
||||
// when using this directive, add overflow-y scroll to css
|
||||
@Output() scrollPosition: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
constructor(public el: ElementRef) { }
|
||||
constructor(public el: ElementRef) { }
|
||||
|
||||
@HostListener('scroll', ['$event'])
|
||||
public onScroll(event: any): void {
|
||||
try {
|
||||
const top = event.target.scrollTop;
|
||||
const height = this.el.nativeElement.scrollHeight;
|
||||
const offset = this.el.nativeElement.offsetHeight;
|
||||
@HostListener('scroll', ['$event'])
|
||||
public onScroll(event: any): void {
|
||||
try {
|
||||
const top = event.target.scrollTop;
|
||||
const height = this.el.nativeElement.scrollHeight;
|
||||
const offset = this.el.nativeElement.offsetHeight;
|
||||
|
||||
// emit bottom event
|
||||
if (top > height - offset - 1) {
|
||||
this.scrollPosition.emit('bottom');
|
||||
}
|
||||
// emit bottom event
|
||||
if (top > height - offset - 1) {
|
||||
this.scrollPosition.emit('bottom');
|
||||
}
|
||||
|
||||
// emit top event
|
||||
if (top === 0) {
|
||||
this.scrollPosition.emit('top');
|
||||
}
|
||||
// emit top event
|
||||
if (top === 0) {
|
||||
this.scrollPosition.emit('top');
|
||||
}
|
||||
|
||||
} catch (err) { }
|
||||
}
|
||||
} catch (err) { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user