How to use the @ptsecurity/mosaic/core.getOptionScrollPosition function in @ptsecurity/mosaic

To help you get started, we’ve selected a few @ptsecurity/mosaic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github positive-js / mosaic / src / lib / tree-select / tree-select.component.ts View on Github external
private scrollActiveOptionIntoView() {
        const activeOptionIndex = this.tree.keyManager.activeItemIndex || 0;

        this.panel.nativeElement.scrollTop = getOptionScrollPosition(
            activeOptionIndex,
            this.getItemHeight(),
            this.panel.nativeElement.scrollTop,
            SELECT_PANEL_MAX_HEIGHT
        );
    }
github positive-js / mosaic / packages / mosaic / select / select.component.ts View on Github external
private scrollActiveOptionIntoView(): void {
        const activeOptionIndex = this.keyManager.activeItemIndex || 0;
        const labelCount = countGroupLabelsBeforeOption(activeOptionIndex, this.options, this.optionGroups);

        this.optionsContainer.nativeElement.scrollTop = getOptionScrollPosition(
            activeOptionIndex + labelCount,
            this.getItemHeight(),
            this.optionsContainer.nativeElement.scrollTop,
            SELECT_PANEL_MAX_HEIGHT
        );
    }
github positive-js / mosaic / packages / mosaic / autocomplete / autocomplete-trigger.directive.ts View on Github external
private scrollToOption(): void {
        const index = this.autocomplete.keyManager.activeItemIndex || 0;
        const labelCount = countGroupLabelsBeforeOption(index,
            this.autocomplete.options, this.autocomplete.optionGroups);

        const newScrollPosition = getOptionScrollPosition(
            index + labelCount,
            AUTOCOMPLETE_OPTION_HEIGHT,
            this.autocomplete.getScrollTop(),
            AUTOCOMPLETE_PANEL_HEIGHT
        );

        this.autocomplete.setScrollTop(newScrollPosition);
    }
github positive-js / mosaic / packages / mosaic / tree-select / tree-select.component.ts View on Github external
private scrollActiveOptionIntoView() {
        const activeOptionIndex = this.tree.keyManager.activeItemIndex || 0;

        this.panel.nativeElement.scrollTop = getOptionScrollPosition(
            activeOptionIndex,
            this.tree.getItemHeight(),
            this.panel.nativeElement.scrollTop,
            SELECT_PANEL_MAX_HEIGHT
        );
    }
github positive-js / mosaic / src / lib / select / select.component.ts View on Github external
private scrollActiveOptionIntoView(): void {
        const activeOptionIndex = this.keyManager.activeItemIndex || 0;
        const labelCount = countGroupLabelsBeforeOption(activeOptionIndex, this.options, this.optionGroups);

        this.panel.nativeElement.scrollTop = getOptionScrollPosition(
            activeOptionIndex + labelCount,
            this.getItemHeight(),
            this.panel.nativeElement.scrollTop,
            SELECT_PANEL_MAX_HEIGHT
        );
    }