Skip to content

Commit

Permalink
fix dynamic scroller
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Jul 8, 2023
1 parent 3e02e15 commit 5a84e6e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion report-viewer/src/components/ComparisonsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div
class="tableRow"
:class="{
'bg-container-secondary-light dark:bg-container-secondary-dark': item.index % 2 == 1
'bg-container-secondary-light dark:bg-container-secondary-dark': item.id % 2 == 1
}"
>
<RouterLink
Expand Down
4 changes: 2 additions & 2 deletions report-viewer/src/model/ComparisonListElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* For full comparison model see Comparison.ts
* @see Comparison
* @property sortingPlace - Where the comparison is placed in the list sorted by the current metric
* @property index - Index of the comparison in the sorted and filtered list
* @property id - Index of the comparison in the sorted and filtered list
* @property firstSubmissionId - Id of the first submission
* @property secondSubmissionId - Id of the second submission
* @property similarity - Similarity of the two submissions
*/
export type ComparisonListElement = {
sortingPlace: number
index: number
id: number
firstSubmissionId: string
secondSubmissionId: string
averageSimilarity: number
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/src/model/factories/OverviewFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class OverviewFactory {
)
comparisons.push({
sortingPlace: counter++,
index: counter,
id: counter,
firstSubmissionId: comparison.first_submission as string,
secondSubmissionId: comparison.second_submission as string,
averageSimilarity: avg as number,
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/src/views/ClusterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ comparisons
.sort((a, b) => b.averageSimilarity - a.averageSimilarity)
.forEach((c) => {
c.sortingPlace = counter++
c.index = counter
c.id = counter
})
for (const member of cluster.members) {
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/src/views/OverviewView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const displayedComparisons = computed(() => {
const comparisons = getFilteredComparisons(getSortedComparisons(overview.topComparisons))
let index = 1
comparisons.forEach((c) => {
c.index = index++
c.id = index++
})
return comparisons
})
Expand Down

0 comments on commit 5a84e6e

Please sign in to comment.