- Fixed scroll trigger and error message
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
<div
|
<div
|
||||||
class="row spells-list"
|
class="row spells-list"
|
||||||
v-masonry
|
v-masonry
|
||||||
transition-duration=".5s"
|
transition-duration="1s"
|
||||||
item-selector=".spell-card">
|
item-selector=".spell-card">
|
||||||
<spell-card
|
<spell-card
|
||||||
class="spell-card"
|
class="spell-card"
|
||||||
@@ -131,7 +131,7 @@ export default {
|
|||||||
},
|
},
|
||||||
scroll() {
|
scroll() {
|
||||||
window.onscroll = () => {
|
window.onscroll = () => {
|
||||||
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
if (((window.innerHeight + window.scrollY) - document.body.offsetHeight) >= -1) {
|
||||||
Spells.getPage(this.currentIndex)
|
Spells.getPage(this.currentIndex)
|
||||||
.then(v => {
|
.then(v => {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -160,6 +160,7 @@ export default {
|
|||||||
cancelAdd() {
|
cancelAdd() {
|
||||||
this.adding_spell = false
|
this.adding_spell = false
|
||||||
},
|
},
|
||||||
|
// Receives events to update the data
|
||||||
addSpell(e) {
|
addSpell(e) {
|
||||||
Spells.getOne(e.id)
|
Spells.getOne(e.id)
|
||||||
.then(v => {
|
.then(v => {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class SchoolRepository {
|
|||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
reject(new HttpError(500, "Couldn't get school"))
|
reject(new HttpError(500, "Couldn't get spells from school"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user