Skip to content

Commit

Permalink
fix: remove observer
Browse files Browse the repository at this point in the history
  • Loading branch information
g-francesca committed Aug 20, 2024
1 parent 390e09b commit bf40ee9
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,6 @@ export class OramaChatAssistentMessage {
chatContext.chatService?.regenerateLatest()
}

private carouselObserver() {
const carousel = this.carouselSourceRef
const observer = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
this.carouselStart = carousel.scrollLeft === 0
this.carouselEnd = carousel.scrollLeft === carousel.scrollWidth - carousel.clientWidth
// console.log('carouselStart', this.carouselStart)
// console.log('carouselEnd', this.carouselEnd)
}
}
},
{ threshold: 0.5 },
)

observer.observe(carousel)
}

private handleCarouselMove(next = true) {
const carousel = this.carouselSourceRef
const slide = carousel.querySelector('.source')
Expand Down

0 comments on commit bf40ee9

Please sign in to comment.