Skip to content

Commit

Permalink
Removed utility code that was only used by tours.
Browse files Browse the repository at this point in the history
The only remaining utility function was moved to the instructions component since that's the only code that uses it.
  • Loading branch information
alancleary committed Aug 24, 2023
1 parent 5c5cb6d commit 21e3352
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 84 deletions.
2 changes: 0 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/golden-layout/dist/goldenlayout.min.js",
"src/assets/js/utils.js",
]
},
"configurations": {
Expand Down Expand Up @@ -110,7 +109,6 @@
"node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/golden-layout/dist/goldenlayout.min.js",
"src/assets/js/utils.js",
]
}
},
Expand Down
9 changes: 5 additions & 4 deletions src/app/instructions/components/instructions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { Component } from '@angular/core';
import { AppConfig, Brand, Dashboard } from '@gcv/core/models';


declare var scrollToSelector: any; // src/assets/js/utils


@Component({
selector: 'gcv-instructions',
styleUrls: [ './instructions.component.scss' ],
Expand All @@ -26,7 +23,11 @@ export class InstructionsComponent {
scrollTo(event): void {
event.preventDefault();
const selector = event.target.hash;
scrollToSelector(selector);
const element = document.querySelector(selector);
if (element != null) {
const options = {behavior: "smooth", block: "start", inline: "nearest"};
element.scrollIntoView(options);
}
}

}
78 changes: 0 additions & 78 deletions src/assets/js/utils.js

This file was deleted.

0 comments on commit 21e3352

Please sign in to comment.