Skip to content

Commit 8de6b0a

Browse files
author
unknown
committed
1.5.1
1 parent d12c99f commit 8de6b0a

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
The MIT License (MIT) Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
24

35
Permission is hereby granted, free of charge, to any person obtaining a copy of
46
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ The scroll speed applied to mousewheel event.
210210
If this option is true, when the scroll reaches the end of the side, mousewheel
211211
event will be propagated to parent element.
212212

213-
**Default**: `false`
213+
**Default**: `true`
214214

215215
### `swipeEasing {Boolean}`
216216

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perfect-scrollbar",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Minimalistic but perfect custom scrollbar plugin",
55
"author": "Hyunje Jun <me@noraesae.net>",
66
"keywords": [

src/handlers/touch.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ export default function(i) {
189189
return;
190190
}
191191

192+
if (!i.element) {
193+
clearInterval(easingLoop);
194+
return;
195+
}
196+
192197
applyTouchMove(speed.x * 30, speed.y * 30);
193198

194199
speed.x *= 0.8;

src/update-geometry.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default function(i) {
88
const roundedScrollTop = Math.floor(element.scrollTop);
99
const rect = element.getBoundingClientRect();
1010

11-
i.containerWidth = Math.ceil(rect.width);
12-
i.containerHeight = Math.ceil(rect.height);
11+
i.containerWidth = Math.round(rect.width);
12+
i.containerHeight = Math.round(rect.height);
13+
1314
i.contentWidth = element.scrollWidth;
1415
i.contentHeight = element.scrollHeight;
1516

0 commit comments

Comments
 (0)