step.component.ts 828 Bytes
Newer Older
Romain DELEAU's avatar
Romain DELEAU committed
1 2 3 4 5 6 7 8 9
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-step',
  templateUrl: './step.component.html',
  styleUrls: ['./step.component.scss']
})
export class StepComponent implements OnInit {

10 11 12 13 14
  displayMenu: string = 'hide';
  pieceWidth = '400px';
  duration = 1;
  durationUnit = 'UT';

Romain DELEAU's avatar
Romain DELEAU committed
15 16 17 18 19
  constructor() { }

  ngOnInit(): void {
  }

20
  onClickDots(): void {
Romain DELEAU's avatar
Romain DELEAU committed
21 22 23
    
  }

24
  onClickErase(): void {
Romain DELEAU's avatar
Romain DELEAU committed
25 26 27
    
  }

28
  onClickDelete(): void {
Romain DELEAU's avatar
Romain DELEAU committed
29 30 31
    
  }

32 33 34 35 36 37 38 39 40 41 42 43 44 45
  durationChange(): void {
    if(this.durationUnit === 'UT') {
      if(this.duration >= 1 && this.duration <= 10) {
        this.pieceWidth = (this.duration*400)+'px';
      } else if(this.duration > 10) {
        this.pieceWidth = '4000px';
      } else {
        this.pieceWidth = '400px';
      }
    } else {
      this.pieceWidth = '400px';
    }
  }

Romain DELEAU's avatar
Romain DELEAU committed
46
}