Before comes before After
This commit is contained in:
@@ -48,18 +48,18 @@ export default class extends Controller {
|
||||
if (isDroppable) event.preventDefault()
|
||||
}
|
||||
|
||||
#positionDividerAfter(index) {
|
||||
const position = Math.min(index, this.#items.length - 1, this.maxCountValue)
|
||||
this.#items[position].after(this.dividerTarget)
|
||||
this.countTarget.textContent = position
|
||||
}
|
||||
|
||||
#positionDividerBefore(index) {
|
||||
const position = Math.max(index, 1)
|
||||
this.#items[position].before(this.dividerTarget)
|
||||
this.countTarget.textContent = position
|
||||
}
|
||||
|
||||
#positionDividerAfter(index) {
|
||||
const position = Math.min(index, this.#items.length - 1, this.maxCountValue)
|
||||
this.#items[position].after(this.dividerTarget)
|
||||
this.countTarget.textContent = position
|
||||
}
|
||||
|
||||
get #items() {
|
||||
return Array.from(this.element.children)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user