Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[App]: Fixed vertical scrollbar for route module #23

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module.exports = function (config) {
config.set({
basePath: 'app',
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {PrimeNGConfig} from "primeng/api";
.app-container {
height: 90vh;
max-height: 90vh;

overflow-y: auto;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

areoooooooooo proprio lù

}
`]
})
Expand Down
14 changes: 6 additions & 8 deletions src/app/modules/plates/page/plate-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export class PlatePageComponent implements OnInit, OnDestroy {

public config!: Plate;

private _routeSub: Subscription = new Subscription();
private _plateSub: Subscription = new Subscription();
private _subs: Subscription = new Subscription();
private _id?: string;

constructor(private _route: ActivatedRoute,
Expand All @@ -40,21 +39,20 @@ export class PlatePageComponent implements OnInit, OnDestroy {
if (rootComponent)
rootComponent.remove();

this._routeSub = this._route.params.subscribe(
this._subs.add(this._route.params.subscribe(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vardalo che usa gli add come gli ha insegnato colet

params => {
this._id = params["id"];
}
);
));

this._plateSub = this._apiConnector.getPlate(this._id!)
this._subs.add(this._apiConnector.getPlate(this._id!)
.subscribe((plate: Plate) => {
this.config = plate;
});
}));
}

public ngOnDestroy(): void {
this._routeSub.unsubscribe();
this._plateSub.unsubscribe();
this._subs.unsubscribe();
}

}
2 changes: 1 addition & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ html, body {
}

::-webkit-scrollbar {
width: 5px;
width: 7px;
}

::-webkit-scrollbar-track {
Expand Down