Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RLG Maker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Romain DELEAU
RLG Maker
Commits
792ffc99
Commit
792ffc99
authored
Jul 21, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch line tasks
parent
2694f558
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
138 additions
and
3 deletions
+138
-3
role.ts
src/app/class/role/role.ts
+14
-2
annexe-task.component.html
src/app/pieces/tasks/annexe-task/annexe-task.component.html
+6
-0
annexe-task.component.ts
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
+14
-0
final-task.component.html
src/app/pieces/tasks/final-task/final-task.component.html
+6
-0
final-task.component.ts
src/app/pieces/tasks/final-task/final-task.component.ts
+16
-0
optionnal-task.component.html
...pieces/tasks/optionnal-task/optionnal-task.component.html
+6
-0
optionnal-task.component.ts
...p/pieces/tasks/optionnal-task/optionnal-task.component.ts
+14
-1
random-event.component.html
...app/pieces/tasks/random-event/random-event.component.html
+6
-0
random-event.component.ts
src/app/pieces/tasks/random-event/random-event.component.ts
+14
-0
repeat-task.component.html
src/app/pieces/tasks/repeat-task/repeat-task.component.html
+6
-0
repeat-task.component.ts
src/app/pieces/tasks/repeat-task/repeat-task.component.ts
+16
-0
task.component.html
src/app/pieces/tasks/task/task.component.html
+6
-0
task.component.ts
src/app/pieces/tasks/task/task.component.ts
+14
-0
No files found.
src/app/class/role/role.ts
View file @
792ffc99
...
...
@@ -58,10 +58,22 @@ export class Role {
if
(
direction
==
'left'
)
{
this
.
tasks
[
i
][
j
]
=
this
.
tasks
[
i
][
j
-
1
];
this
.
tasks
[
i
][
j
-
1
]
=
tmp
;
}
else
if
(
direction
==
'right'
&&
(
this
.
tasks
[
i
][
j
+
1
]?.
type
!=
'final'
&&
this
.
tasks
[
i
][
j
+
1
]?.
type
!=
'repeat'
)
)
{
}
else
if
(
direction
==
'right'
)
{
this
.
tasks
[
i
][
j
]
=
this
.
tasks
[
i
][
j
+
1
];
this
.
tasks
[
i
][
j
+
1
]
=
tmp
;
}
}
else
if
(
direction
==
'top'
)
{
this
.
tasks
[
i
][
j
]
=
this
.
tasks
[
i
-
1
][
j
];
this
.
tasks
[
i
-
1
][
j
]
=
tmp
;
if
(
!
this
.
tasks
[
i
].
some
(
element
=>
element
instanceof
Task
))
{
this
.
tasks
.
splice
(
i
,
1
);
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
tasks
[
i
+
2
]
==
null
)
{
this
.
tasks
[
i
+
2
]
=
[];
}
this
.
tasks
[
i
][
j
]
=
this
.
tasks
[
i
+
1
][
j
];
this
.
tasks
[
i
+
1
][
j
]
=
tmp
;
}
}
public
moveStep
(
i
:
number
,
direction
:
string
):
void
{
...
...
src/app/pieces/tasks/annexe-task/annexe-task.component.html
View file @
792ffc99
...
...
@@ -11,6 +11,9 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<div>
<mat-icon
fontIcon=
"change_circle"
[
matMenuTriggerFor
]="
menuChange
"
matTooltip=
"Changer le type de cette tuile."
...
...
@@ -27,6 +30,9 @@
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
View file @
792ffc99
...
...
@@ -148,6 +148,20 @@ export class AnnexeTaskComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'repeat'
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
return
res
;
}
...
...
src/app/pieces/tasks/final-task/final-task.component.html
View file @
792ffc99
...
...
@@ -10,6 +10,9 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<div>
<mat-icon
fontIcon=
"change_circle"
[
matMenuTriggerFor
]="
menuChange
"
matTooltip=
"Changer le type de cette tuile."
...
...
@@ -26,6 +29,9 @@
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/final-task/final-task.component.ts
View file @
792ffc99
...
...
@@ -150,6 +150,22 @@ export class FinalTaskComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
-
1
]
instanceof
Task
||
this
.
j
==
0
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
let
index
:
number
=
this
.
role
.
tasks
[
this
.
i
-
1
].
findIndex
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
);
if
(
index
!=
this
.
j
)
{
res
=
false
;
}
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
let
index
:
number
=
this
.
role
.
tasks
[
this
.
i
+
1
].
findIndex
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
);
if
(
index
!=
this
.
j
)
{
res
=
false
;
}
}
}
return
res
;
}
...
...
src/app/pieces/tasks/optionnal-task/optionnal-task.component.html
View file @
792ffc99
...
...
@@ -11,6 +11,9 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<div>
<mat-icon
fontIcon=
"change_circle"
[
matMenuTriggerFor
]="
menuChange
"
matTooltip=
"Changer le type de cette tuile."
...
...
@@ -27,6 +30,9 @@
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/optionnal-task/optionnal-task.component.ts
View file @
792ffc99
...
...
@@ -157,7 +157,6 @@ export class OptionnalTaskComponent implements OnInit {
this
.
displaySymbolChoice
=
'hide'
;
this
.
mission
.
equalizeLengths
();
}
canMoveTo
(
direction
:
string
):
boolean
{
let
res
:
boolean
=
true
;
if
(
direction
==
'left'
)
{
...
...
@@ -168,6 +167,20 @@ export class OptionnalTaskComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'repeat'
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
return
res
;
}
...
...
src/app/pieces/tasks/random-event/random-event.component.html
View file @
792ffc99
...
...
@@ -9,12 +9,18 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
matTooltip=
"Effacer le contenu de cette tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/random-event/random-event.component.ts
View file @
792ffc99
...
...
@@ -145,6 +145,20 @@ export class RandomEventComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'repeat'
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
return
res
;
}
...
...
src/app/pieces/tasks/repeat-task/repeat-task.component.html
View file @
792ffc99
...
...
@@ -5,12 +5,18 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
matTooltip=
"Effacer le contenu de cette tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/repeat-task/repeat-task.component.ts
View file @
792ffc99
...
...
@@ -76,6 +76,22 @@ export class RepeatTaskComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
-
1
]
instanceof
Task
||
this
.
j
==
0
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
let
index
:
number
=
this
.
role
.
tasks
[
this
.
i
-
1
].
findIndex
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
);
if
(
index
!=
this
.
j
)
{
res
=
false
;
}
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
let
index
:
number
=
this
.
role
.
tasks
[
this
.
i
+
1
].
findIndex
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
);
if
(
index
!=
this
.
j
)
{
res
=
false
;
}
}
}
return
res
;
}
...
...
src/app/pieces/tasks/task/task.component.html
View file @
792ffc99
...
...
@@ -9,6 +9,9 @@
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveTask
('
left
')"
*
ngIf=
"canMoveTo('left')"
matTooltip=
"Décaler la tuile vers la gauche."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_less"
(
click
)="
moveTask
('
top
')"
*
ngIf=
"canMoveTo('top')"
matTooltip=
"Décaler la tuile vers le haut."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<div>
<mat-icon
fontIcon=
"change_circle"
[
matMenuTriggerFor
]="
menuChange
"
matTooltip=
"Changer le type de cette tuile."
...
...
@@ -25,6 +28,9 @@
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
matTooltip=
"Supprimer la tuile."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"expand_more"
(
click
)="
moveTask
('
bottom
')"
*
ngIf=
"canMoveTo('bottom')"
matTooltip=
"Décaler la tuile vers le bas."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveTask
('
right
')"
*
ngIf=
"canMoveTo('right')"
matTooltip=
"Décaler la tuile vers la droite."
matTooltipPosition=
"above"
[
matTooltipDisabled
]="!
tooltipService
.
activatedTooltips
"
></mat-icon>
...
...
src/app/pieces/tasks/task/task.component.ts
View file @
792ffc99
...
...
@@ -168,6 +168,20 @@ export class TaskComponent implements OnInit {
if
(
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
][
this
.
j
+
1
]?.
type
==
'repeat'
)
{
res
=
false
;
}
}
else
if
(
direction
==
'top'
)
{
if
(
this
.
i
==
0
)
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
-
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
-
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
else
if
(
direction
==
'bottom'
)
{
if
(
this
.
role
.
tasks
[
this
.
i
+
1
].
slice
(
0
,
this
.
j
).
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
))
{
res
=
false
;
}
else
if
(
this
.
role
.
tasks
[
this
.
i
].
some
(
element
=>
element
?.
type
==
'final'
||
element
?.
type
==
'repeat'
)
&&
(
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'final'
||
this
.
role
.
tasks
[
this
.
i
+
1
][
this
.
j
]?.
type
==
'repeat'
))
{
res
=
false
;
}
}
return
res
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment