Skip to content
Snippets Groups Projects

full design completed and small fixes to certain pages to fit the design

Merged Manish Kumar requested to merge horizontal-header-design into master
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
17 @ViewChild("community", {read: ElementRef}) community: ElementRef;
18 @ViewChild("logIn", {read: ElementRef}) logIn: ElementRef;
19
20 resizeObservable$: Observable<Event>
21 resizeSubscription$: Subscription
22
23 translate: TranslateService;
24 position: string = '0';
25 width: number = 0;
26 GSWidth: number;
27 mapsWidth: number;
28 communityWidth: number;
29 logInWidth: number;
30 selectedOption: number;
31
32 constructor(public lang: LangService, private router: Router, private cdRef:ChangeDetectorRef) {
  • 45 }
    46
    47 ngAfterViewChecked(): void {
    48 this.updateValues();
    49 }
    50
    51 /**
    52 * Method used to update the different widths of the text options
    53 */
    54 updateValues(): void{
    55 var updateCheck = this.GSWidth;
    56
    57 this.GSWidth = this.GS.nativeElement.offsetWidth;
    58 this.mapsWidth = this.maps.nativeElement.offsetWidth;
    59 this.communityWidth = this.community.nativeElement.offsetWidth;
    60 this.logInWidth = this.logIn.nativeElement.offsetWidth;
    • Tous ses appels pourraient être abstraits dans une méthode

      getElementWidht(el: ElementRef): number{
          return el.nativeElement.offsetWidth;
      }

      Les variables respectives seraient donc inutiles et il y aurait moins de nécéssité de documenter. Tous ceci nous éloigne de notre but de documenter un maximum et de code simple et réutilisable

    • Please register or sign in to reply
  • 27 mapsWidth: number;
    28 communityWidth: number;
    29 logInWidth: number;
    30 selectedOption: number;
    31
    32 constructor(public lang: LangService, private router: Router, private cdRef:ChangeDetectorRef) {
    33 this.translate = lang.getTranslateService();
    34 }
    35
    36 ngOnInit(): void {
    37 /**
    38 * Detection of window resize event and call to update the highlight line with a small delay
    39 * to get accurate values
    40 */
    41 this.resizeObservable$ = fromEvent(window, 'resize')
    42 this.resizeSubscription$ = this.resizeObservable$.pipe(debounceTime(300)).subscribe( evt => {
  • added 2 commits

    • f800b7a2 - refactor: Deprecated some functionalities of language service to be reviewed
    • 3241a3a9 - docs: further documented header code

    Compare with previous version

  • mentioned in commit 846b9e17

  • Please register or sign in to reply
    Loading