/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/scrolling/virtual-scrollable-element.ts
31 строка
926 B
Kristiyan Kostadinov
fix(multiple): remove empty constructors (#33048)
08 апр 2026, 22:21
Не верифицирован
08 апр 2026, 22:21
ce4c2c0
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive} from '@angular/core'; import {CdkVirtualScrollable, VIRTUAL_SCROLLABLE} from './virtual-scrollable'; /** * Provides a virtual scrollable for the element it is attached to. */ @Directive({ selector: '[cdkVirtualScrollingElement]', providers: [{provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement}], host: { 'class': 'cdk-virtual-scrollable', }, }) export class CdkVirtualScrollableElement extends CdkVirtualScrollable { override measureBoundingClientRectWithScrollOffset( from: 'left' | 'top' | 'right' | 'bottom', ): number { return ( this.getElementRef().nativeElement.getBoundingClientRect()[from] - this.measureScrollOffset(from) ); } }