Skip to content

Commit

Permalink
Fix someone browser get decimal offset and never trigger tobottom event
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed Apr 19, 2020
1 parent 495d3c4 commit 11387b6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-virtual-scroll-list v2.0.5
* vue-virtual-scroll-list v2.0.6
* open source under the MIT license
* https://github.com/tangbc/vue-virtual-scroll-list#readme
*/
Expand Down Expand Up @@ -677,7 +677,7 @@
// return current scroll offset
getOffset: function getOffset() {
var root = this.$refs.root;
return root ? root[this.directionKey] : 0;
return root ? Math.ceil(root[this.directionKey]) : 0;
},
// return client viewport size (width or height)
getClientSize: function getClientSize() {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>vue-virtual-scroll-list</title><link rel=icon href=favicon.png><link rel=stylesheet href=milligram.css><link rel=stylesheet href=highlight/theme.css><script src=highlight/pack.js></script><script>hljs.initHighlightingOnLoad()</script><link href=css/dynamic-size.681ebb77.css rel=prefetch><link href=css/fixed-size.840ec49f.css rel=prefetch><link href=css/horizontal.c4223f3f.css rel=prefetch><link href=css/infinite-loading.97a34685.css rel=prefetch><link href=css/keep-state.23037f2b.css rel=prefetch><link href=js/dynamic-size.6e4c0bb1.js rel=prefetch><link href=js/dynamic-size~fixed-size~horizontal~infinite-loading~keep-state.3b940789.js rel=prefetch><link href=js/fixed-size.9af085f6.js rel=prefetch><link href=js/horizontal.78fb7150.js rel=prefetch><link href=js/infinite-loading.46cb102a.js rel=prefetch><link href=js/keep-state.0b3dbbf4.js rel=prefetch><link href=css/app.2f54a158.css rel=preload as=style><link href=js/app.7672d517.js rel=preload as=script><link href=js/chunk-vendors.a8fb041f.js rel=preload as=script><link href=css/app.2f54a158.css rel=stylesheet></head><body><div id=app></div><script src=js/chunk-vendors.a8fb041f.js></script><script src=js/app.7672d517.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>vue-virtual-scroll-list</title><link rel=icon href=favicon.png><link rel=stylesheet href=milligram.css><link rel=stylesheet href=highlight/theme.css><script src=highlight/pack.js></script><script>hljs.initHighlightingOnLoad()</script><link href=css/dynamic-size.681ebb77.css rel=prefetch><link href=css/fixed-size.840ec49f.css rel=prefetch><link href=css/horizontal.c4223f3f.css rel=prefetch><link href=css/infinite-loading.97a34685.css rel=prefetch><link href=css/keep-state.23037f2b.css rel=prefetch><link href=js/dynamic-size.6e4c0bb1.js rel=prefetch><link href=js/dynamic-size~fixed-size~horizontal~infinite-loading~keep-state.3b940789.js rel=prefetch><link href=js/fixed-size.9af085f6.js rel=prefetch><link href=js/horizontal.78fb7150.js rel=prefetch><link href=js/infinite-loading.46cb102a.js rel=prefetch><link href=js/keep-state.0b3dbbf4.js rel=prefetch><link href=css/app.2f54a158.css rel=preload as=style><link href=js/app.1ceebd0f.js rel=preload as=script><link href=js/chunk-vendors.a8fb041f.js rel=preload as=script><link href=css/app.2f54a158.css rel=stylesheet></head><body><div id=app></div><script src=js/chunk-vendors.a8fb041f.js></script><script src=js/app.1ceebd0f.js></script></body></html>
4 changes: 2 additions & 2 deletions docs/js/app.7672d517.js → docs/js/app.1ceebd0f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.1ceebd0f.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/js/app.7672d517.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-virtual-scroll-list",
"version": "2.0.5",
"version": "2.0.6",
"description": "A vue component support big amount data list with high scroll performance.",
"main": "dist/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const VirtualList = Vue.component(NAME, {
// return current scroll offset
getOffset () {
const { root } = this.$refs
return root ? root[this.directionKey] : 0
return root ? Math.ceil(root[this.directionKey]) : 0
},

// return client viewport size (width or height)
Expand Down

0 comments on commit 11387b6

Please sign in to comment.