align frontend formatting
This commit is contained in:
parent
f73d7c101a
commit
5017186c1a
9 changed files with 124 additions and 63 deletions
|
|
@ -54,11 +54,8 @@ function siblingElementAtOffset(offset: number): ChildElement | null {
|
|||
}
|
||||
|
||||
const siblingCount = props.siblingElements.length
|
||||
const targetIndex = (
|
||||
currentSiblingIndex.value
|
||||
+ offset
|
||||
+ siblingCount
|
||||
) % siblingCount
|
||||
const targetIndex =
|
||||
(currentSiblingIndex.value + offset + siblingCount) % siblingCount
|
||||
|
||||
return props.siblingElements[targetIndex] ?? null
|
||||
}
|
||||
|
|
@ -67,9 +64,7 @@ function siblingElementAtOffset(offset: number): ChildElement | null {
|
|||
<template>
|
||||
<nav
|
||||
v-if="
|
||||
hasSiblingNavigation
|
||||
&& previousSibling !== null
|
||||
&& nextSibling !== null
|
||||
hasSiblingNavigation && previousSibling !== null && nextSibling !== null
|
||||
"
|
||||
class="element-sibling-navigation"
|
||||
:data-cy="navigationDataCy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue