Fixed scrollability not being obvious, added fade effect

This commit is contained in:
Henry Jameson 2019-09-15 01:16:54 +03:00
parent 3505e53756
commit f0cb6fe03f
3 changed files with 26 additions and 1 deletions

View file

@ -17,6 +17,7 @@ const EmojiPicker = {
keyword: '',
activeGroup: 'custom',
showingStickers: false,
groupsScrolledClass: 'scrolled-top',
spamMode: false
}
},
@ -40,6 +41,13 @@ const EmojiPicker = {
scrolledGroup (e) {
const target = (e && e.target) || this.$refs['emoji-groups']
const top = target.scrollTop + 5
if (target.scrollTop <= 5) {
this.groupsScrolledClass = 'scrolled-top'
} else if (target.scrollTop >= target.scrollTopMax - 5) {
this.groupsScrolledClass = 'scrolled-bottom'
} else {
this.groupsScrolledClass = 'scrolled-middle'
}
this.$nextTick(() => {
this.emojisView.forEach(group => {
const ref = this.$refs['group-' + group.id]