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
8a6923e4
Commit
8a6923e4
authored
Jun 20, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move chronologie steps
parent
8f6e79aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
mission.ts
src/app/class/mission/mission.ts
+11
-0
role.ts
src/app/class/role/role.ts
+11
-0
step.component.html
src/app/pieces/step/step.component.html
+2
-0
step.component.ts
src/app/pieces/step/step.component.ts
+6
-0
No files found.
src/app/class/mission/mission.ts
View file @
8a6923e4
...
...
@@ -23,6 +23,17 @@ export class Mission {
}
}
public
moveStep
(
i
:
number
,
direction
:
string
):
void
{
let
tmp
:
Step
|
null
=
this
.
chronologie
[
i
];
if
(
direction
==
'left'
)
{
this
.
chronologie
[
i
]
=
this
.
chronologie
[
i
-
1
];
this
.
chronologie
[
i
-
1
]
=
tmp
;
}
else
if
(
direction
==
'right'
)
{
this
.
chronologie
[
i
]
=
this
.
chronologie
[
i
+
1
];
this
.
chronologie
[
i
+
1
]
=
tmp
;
}
}
public
calcMaxLineLength
():
number
{
let
length
:
number
=
0
;
let
cpt
:
number
=
0
;
...
...
src/app/class/role/role.ts
View file @
8a6923e4
...
...
@@ -62,4 +62,15 @@ export class Role {
this
.
tasks
[
i
][
j
+
1
]
=
tmp
;
}
}
public
moveStep
(
i
:
number
,
direction
:
string
):
void
{
let
tmp
:
Step
|
null
=
this
.
chronologie
[
i
];
if
(
direction
==
'left'
)
{
this
.
chronologie
[
i
]
=
this
.
chronologie
[
i
-
1
];
this
.
chronologie
[
i
-
1
]
=
tmp
;
}
else
if
(
direction
==
'right'
)
{
this
.
chronologie
[
i
]
=
this
.
chronologie
[
i
+
1
];
this
.
chronologie
[
i
+
1
]
=
tmp
;
}
}
}
src/app/pieces/step/step.component.html
View file @
8a6923e4
...
...
@@ -3,9 +3,11 @@
<div
class=
"piece-attach piece-attach-left"
></div>
<div
class=
"piece-menu"
[
class
]="
displayMenu
"
>
<mat-icon
fontIcon=
"arrow_back_ios"
(
click
)="
moveStep
('
left
')"
*
ngIf=
"index > 0"
></mat-icon>
<mat-icon
fontIcon=
"backspace"
(
click
)="
onClickErase
()"
></mat-icon>
<mat-icon
fontIcon=
"delete"
(
click
)="
onClickDelete
()"
></mat-icon>
<mat-icon
fontIcon=
"more_vert"
(
click
)="
onClickDots
()"
></mat-icon>
<mat-icon
fontIcon=
"arrow_forward_ios"
(
click
)="
moveStep
('
right
')"
></mat-icon>
</div>
<div
class=
"piece-form"
>
...
...
src/app/pieces/step/step.component.ts
View file @
8a6923e4
...
...
@@ -43,6 +43,12 @@ export class StepComponent implements OnInit {
this
.
mission
.
equalizeLengths
();
}
moveStep
(
direction
:
string
)
{
this
.
parent
.
moveStep
(
this
.
index
,
direction
);
this
.
displayMenu
=
'hide'
;
this
.
mission
.
equalizeLengths
();
}
durationChange
():
void
{
/*
if(this.step.durationUnit === 'UT') {
...
...
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