Commit f5c56a6e authored by Romain DELEAU's avatar Romain DELEAU

add repeat-task

parent 505f4656
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
[style.z-index]="1"> [style.z-index]="1">
<div class="container-scenario-main-missions-mission-roles-role-tasks-inlineTasks" <div class="container-scenario-main-missions-mission-roles-role-tasks-inlineTasks"
[style.z-index]="2"> [style.z-index]="2">
<app-task [style.z-index]="3"></app-task>
<app-task [style.z-index]="2"></app-task> <app-task [style.z-index]="2"></app-task>
<app-task [style.z-index]="1"></app-task> <app-repeat-task [style.z-index]="1"></app-repeat-task>
</div> </div>
<div class="container-scenario-main-missions-mission-roles-role-tasks-inlineTasks" <div class="container-scenario-main-missions-mission-roles-role-tasks-inlineTasks"
[style.z-index]="2"> [style.z-index]="2">
......
...@@ -23,6 +23,7 @@ import { CharacterComponent } from './components/character/character.component'; ...@@ -23,6 +23,7 @@ import { CharacterComponent } from './components/character/character.component';
import { RulesComponent } from './sider-pieces/rules/rules.component'; import { RulesComponent } from './sider-pieces/rules/rules.component';
import { StepComponent } from './pieces/step/step.component'; import { StepComponent } from './pieces/step/step.component';
import { FinalTaskComponent } from './pieces/final-task/final-task.component'; import { FinalTaskComponent } from './pieces/final-task/final-task.component';
import { RepeatTaskComponent } from './pieces/repeat-task/repeat-task.component';
import { DragScrollDirective } from './directives/drag-scroll.directive'; import { DragScrollDirective } from './directives/drag-scroll.directive';
import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive'; import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive';
...@@ -47,7 +48,8 @@ import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive ...@@ -47,7 +48,8 @@ import { MouseWheelZoomDirective } from './directives/mouse-wheel-zoom.directive
CharacterComponent, CharacterComponent,
RulesComponent, RulesComponent,
StepComponent, StepComponent,
FinalTaskComponent FinalTaskComponent,
RepeatTaskComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
......
...@@ -189,18 +189,6 @@ ...@@ -189,18 +189,6 @@
&-attach { &-attach {
z-index: 1; z-index: 1;
&-right {
border-top: solid black 1px;
border-right: solid black 1px;
width: 40px;
height: 40px;
background-color: var(--piece-background-color);
transform: translateY(-50%) rotate(45deg);
position: absolute;
right: -20px;
top: 200px;
}
&-left { &-left {
border-top: solid black 1px; border-top: solid black 1px;
border-right: solid black 1px; border-right: solid black 1px;
......
<div class="piece" (mouseover)="displayMenu='show'" (mouseleave)="displayMenu='hide'">
<div class="piece-attach piece-attach-left"></div>
<div class="piece-menu" [class]="displayMenu">
<mat-icon fontIcon="mode_comment" (click)="onClickComments()"></mat-icon>
<mat-icon fontIcon="add" (click)="onClickAdd()"></mat-icon>
<mat-icon fontIcon="backspace" (click)="onClickErase()"></mat-icon>
<mat-icon fontIcon="more_vert" (click)="onClickDots()"></mat-icon>
</div>
<div class="piece-form">
<label>Recommencer<br>le tour jusqu'à ce que :</label>
<textarea></textarea>
</div>
</div>
.piece {
--piece-background-color: #abbcc6;
width: 400px;
height: 400px;
position: relative;
background-color: var(--piece-background-color);
transition: all 0.5s ease;
border-top: 1px solid black;
border-bottom: 1px solid black;
border-right: 1px solid black;
border-top-right-radius: 50%;
border-bottom-right-radius: 50%;
&-menu {
position: absolute;
width: 150px;
height: 50px;
background-color: #f7f7f7;
z-index: -1;
top: -50px;
left: 30%;
transform: translateX(-50%);
transition: transform 0.5s ease;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border: solid black 1px;
display: flex;
padding: 15px 20px 15px 20px;
justify-content: space-around;
mat-icon {
cursor: pointer;
transform: scale(1.1);
}
mat-icon:hover {
opacity: 0.75;
}
}
&-menu.show {
transform: translateX(-50%) translateY(0);
}
&-menu.hide {
transform: translateX(-50%) translateY(100%);
}
&-attach {
z-index: 1;
&-left {
border-top: solid black 1px;
border-right: solid black 1px;
width: 40px;
height: 40px;
background-color: var(--background-color);
transform: translateY(-50%) rotate(45deg);
position: absolute;
left: -20px;
top: 200px;
}
}
&-form {
height: 100%;
padding: 0px 10px 0px 35px;
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
z-index: 2;
label {
margin-top: 15%;
font-family: 'Glacial Indifference Bold';
margin-bottom: 10px;
text-align: center;
width: 70%;
font-size: 17px;
}
textarea {
width: 80%;
border: none;
border-radius: 10px;
resize: none;
height: 50%;
font-size: 15px;
}
}
}
.piece::after {
content: "";
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-left: 1px solid black;
}
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RepeatTaskComponent } from './repeat-task.component';
describe('RepeatTaskComponent', () => {
let component: RepeatTaskComponent;
let fixture: ComponentFixture<RepeatTaskComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ RepeatTaskComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(RepeatTaskComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-repeat-task',
templateUrl: './repeat-task.component.html',
styleUrls: ['./repeat-task.component.scss']
})
export class RepeatTaskComponent implements OnInit {
displayMenu: string = 'hide';
constructor() { }
ngOnInit(): void {
}
onClickComments(): void {
}
onClickAdd(): void {
}
onClickErase(): void {
}
onClickDots(): void {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment