How to use the perfect-scrollbar.destroy function in perfect-scrollbar

To help you get started, we’ve selected a few perfect-scrollbar 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 bitshares / bitshares-ui / app / components / Exchange / OrderBook.jsx View on Github external
} else {
                Ps.initialize(asksContainer);
                this.psUpdate();
            }
            this.refs.askTransition.resetAnimation();
            if (this.refs.hor_asks) this.refs.hor_asks.scrollTop = 0;
        }

        if (
            this.props.horizontal &&
            this.props.hideScrollbars &&
            nextState.showAllBids != this.state.showAllBids
        ) {
            let bidsContainer = this.refs.hor_bids;
            if (!nextState.showAllBids) {
                Ps.destroy(bidsContainer);
            } else {
                Ps.initialize(bidsContainer);
                this.psUpdate();
            }
            this.refs.bidTransition.resetAnimation();
            if (this.refs.hor_bids) this.refs.hor_bids.scrollTop = 0;
        }

        // if (!nextProps.marketReady) return false;
        return true;
    }
github bitshares / bitshares-ui / app / components / Exchange / OrderBook.jsx View on Github external
if (this.refs.vert_bids) this.refs.vert_bids.scrollTop = 0;

            if (!this.props.horizontal) {
                this.setState({autoScroll: this.state.autoScroll});
            }
        }

        let bidsContainer = this.refs.hor_bids;
        let asksContainer = this.refs.hor_asks;

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            nextProps.hideScrollbars
        ) {
            Ps.destroy(bidsContainer);
            Ps.destroy(asksContainer);
        }

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            !nextProps.hideScrollbars
        ) {
            Ps.initialize(bidsContainer);
            Ps.initialize(asksContainer);
            this.refs.askTransition.resetAnimation();
            this.refs.bidTransition.resetAnimation();
            if (asksContainer) asksContainer.scrollTop = 0;
            if (bidsContainer) bidsContainer.scrollTop = 0;
            this.psUpdate();
        }
github Redocly / redoc / lib / shared / components / PerfectScrollbar / perfect-scrollbar.ts View on Github external
ngOnDestroy() {
    if (!this.enabled) return;
    PS.destroy(this.$element);
  }
}
github CartoDB / cartodb / lib / assets / javascripts / cartodb / common / scroll / scroll-view.js View on Github external
destroyScroll: function () {
    Ps.destroy(this._wrapperContainer().get(0));
  },
github bitshares / bitshares-ui / app / components / Exchange / MarketHistory.jsx View on Github external
componentWillReceiveProps(nextProps) {
        let historyContainer = this.refs.history;

        if (
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            nextProps.hideScrollbars
        ) {
            Ps.destroy(historyContainer);
        }

        if (
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            !nextProps.hideScrollbars
        ) {
            Ps.initialize(historyContainer);
            this.refs.historyTransition.resetAnimation();
            if (historyContainer) historyContainer.scrollTop = 0;
            Ps.update(historyContainer);
        }
    }
github bitshares / bitshares-ui / app / components / Exchange / OrderBook.jsx View on Github external
if (!this.props.horizontal) {
                this.setState({autoScroll: this.state.autoScroll});
            }
        }

        let bidsContainer = this.refs.hor_bids;
        let asksContainer = this.refs.hor_asks;

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            nextProps.hideScrollbars
        ) {
            Ps.destroy(bidsContainer);
            Ps.destroy(asksContainer);
        }

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            !nextProps.hideScrollbars
        ) {
            Ps.initialize(bidsContainer);
            Ps.initialize(asksContainer);
            this.refs.askTransition.resetAnimation();
            this.refs.bidTransition.resetAnimation();
            if (asksContainer) asksContainer.scrollTop = 0;
            if (bidsContainer) bidsContainer.scrollTop = 0;
            this.psUpdate();
        }
github bitshares / bitshares-ui / app / components / Exchange / OrderBook.jsx View on Github external
if (!this.props.horizontal) {
                this.setState({autoScroll: this.state.autoScroll});
            }
        }

        let bidsContainer = this.refs.hor_bids;
        let asksContainer = this.refs.hor_asks;

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            nextProps.hideScrollbars
        ) {
            Ps.destroy(bidsContainer);
            Ps.destroy(asksContainer);
        }

        if (
            this.props.horizontal &&
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            !nextProps.hideScrollbars
        ) {
            Ps.initialize(bidsContainer);
            Ps.initialize(asksContainer);
            this.refs.askTransition.resetAnimation();
            this.refs.bidTransition.resetAnimation();
            if (asksContainer) asksContainer.scrollTop = 0;
            if (bidsContainer) bidsContainer.scrollTop = 0;
            this.psUpdate();
        }
github bitshares / bitshares-ui / app / components / Exchange / MyOpenOrders.jsx View on Github external
componentWillReceiveProps(nextProps) {
        let contentContainer = this.refs.container;

        if (
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            nextProps.hideScrollbars
        ) {
            Ps.destroy(contentContainer);
        }

        if (
            nextProps.hideScrollbars !== this.props.hideScrollbars &&
            !nextProps.hideScrollbars
        ) {
            Ps.initialize(contentContainer);
            this.refs.contentTransition.resetAnimation();
            if (contentContainer) contentContainer.scrollTop = 0;
            Ps.update(contentContainer);
        }
    }
github virtool / virtool / client / src / js / base / Scroll.js View on Github external
componentWillUnmount () {
        Ps.destroy(this.containerNode);
    }
github egoist / rem / client / components / AppMain.vue View on Github external
beforeDestroy() {
      Ps.destroy(this.$refs.container)
    }
  }