當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript perfect-scrollbar.update函數代碼示例

本文整理匯總了TypeScript中perfect-scrollbar.update函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript update函數的具體用法?TypeScript update怎麽用?TypeScript update使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了update函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: update

    /**
     * Update the scrollbar
     */
    update(): void
    {
        if ( !this.isInitialized )
        {
            return;
        }

        // Update the perfect-scrollbar
        this.ps.update();
    }
開發者ID:karthik12ui,項目名稱:fuse-angular-full,代碼行數:13,代碼來源:fuse-perfect-scrollbar.directive.ts

示例2: documentClick

    // -----------------------------------------------------------------------------------------------------
    // @ Public methods
    // -----------------------------------------------------------------------------------------------------

    /**
     * Document click
     *
     * @param {Event} event
     */
    @HostListener('document:click', ['$event'])
    documentClick(event: Event): void
    {
        if ( !this.isInitialized || !this.ps )
        {
            return;
        }

        // Update the scrollbar on document click..
        // This isn't the most elegant solution but there is no other way
        // of knowing when the contents of the scrollable container changes.
        // Therefore, we update scrollbars on every document click.
        this.ps.update();
    }
開發者ID:karthik12ui,項目名稱:fuse-angular-full,代碼行數:23,代碼來源:fuse-perfect-scrollbar.directive.ts

示例3: require

import * as Ps from 'perfect-scrollbar'
const container = document.body

// To initialise the plugin, `Ps.initialize` is used.
Ps.initialize(container)

// It can be initialised with optional parameters.
Ps.initialize(container, {
  wheelSpeed: 2,
  wheelPropagation: true,
  minScrollbarLength: 20
})

// If the size of your container or content changes, call `update`.
Ps.update(container)

// If you want to destroy the scrollbar, use `destroy`.
Ps.destroy(container)

// If you want to scroll to somewhere, just use a `scrollTop` property and update.
container.scrollTop = 0
Ps.update(container)

/**
 * https://github.com/noraesae/perfect-scrollbar#jquery
 */

import mountJQuery = require('perfect-scrollbar/jquery')
mountJQuery($)
開發者ID:Crevil,項目名稱:DefinitelyTyped,代碼行數:29,代碼來源:perfect-scrollbar-tests.ts

示例4: update

 update() {
   PS.update(this.$element);
 }
開發者ID:jwilander,項目名稱:ReDoc,代碼行數:3,代碼來源:perfect-scrollbar.ts

示例5: updateScrollbar

 private updateScrollbar(): void {
     const container = this.elementRef.nativeElement.querySelector('md-nav-list');
     Ps.update(container);
 }
開發者ID:michaelbromley,項目名稱:skqw,代碼行數:4,代碼來源:v-selector.component.ts


注:本文中的perfect-scrollbar.update函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。