Skip to content
Snippets Groups Projects
Commit ee926292 authored by paf's avatar paf
Browse files

makes the toggle between all-of-type and only-this-row selection ( =...

makes the toggle between all-of-type and only-this-row selection ( = spreading) only happen when clicked on the very same session
parent 158d0ea5
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,10 @@ export class TestViewComponent { ...@@ -56,6 +56,10 @@ export class TestViewComponent {
(this.selected?.originSession.booklet.species === this.testSession.booklet.species); (this.selected?.originSession.booklet.species === this.testSession.booklet.species);
} }
isSelectedHere(testletOrNull: Testlet|null = null): boolean {
return this.isSelected(testletOrNull) && (this.selected.originSession.data.testId === this.testSession.data.testId);
}
isMarked(testletOrNull: Testlet|null = null): boolean { isMarked(testletOrNull: Testlet|null = null): boolean {
return testletOrNull && return testletOrNull &&
(this.marked?.element?.blockId === testletOrNull.blockId) && (this.marked?.element?.blockId === testletOrNull.blockId) &&
...@@ -102,7 +106,7 @@ export class TestViewComponent { ...@@ -102,7 +106,7 @@ export class TestViewComponent {
return { return {
element: testletOrNull, element: testletOrNull,
originSession: this.testSession, originSession: this.testSession,
spreading: this.isSelected(testletOrNull) ? !(this.selected?.spreading) : !testletOrNull, spreading: this.isSelectedHere(testletOrNull) ? !(this.selected?.spreading) : !testletOrNull,
inversion inversion
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment