From 2bbc90af64866f0c08106a0de04fea6fe8efdcad Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Thu, 30 Nov 2017 10:22:18 +0300 Subject: [PATCH] Perfect scrollbar shouldn't be destroyed if it's not available + Print media css classes updated to hide the perfect scrollbars --- .../fuse-perfect-scrollbar.directive.ts | 2 +- src/app/core/scss/partials/_print.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts b/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts index 4979c2a4..0f882493 100644 --- a/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts +++ b/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts @@ -54,7 +54,7 @@ export class FusePerfectScrollbarDirective implements OnInit, AfterViewInit, OnD ngOnDestroy() { - if ( !this.isInitialized ) + if ( !this.isInitialized || !this.ps ) { return; } diff --git a/src/app/core/scss/partials/_print.scss b/src/app/core/scss/partials/_print.scss index e4c7971a..4e81f02c 100644 --- a/src/app/core/scss/partials/_print.scss +++ b/src/app/core/scss/partials/_print.scss @@ -42,8 +42,8 @@ fuse-footer, fuse-quick-panel, fuse-theme-options, - .ps > .ps__scrollbar-x-rail, - .ps > .ps__scrollbar-y-rail { + .ps > .ps__rail-x, + .ps > .ps__rail-y { display: none !important; }