We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents edc3ee7 + 30bbedf commit e894da2Copy full SHA for e894da2
1 file changed
assets/javascripts/views/layout/resizer.js
@@ -44,14 +44,20 @@ app.views.Resizer = class Resizer extends app.View {
44
return;
45
}
46
this.lastDragValue = value;
47
- if (this.lastDrag && this.lastDrag > Date.now() - 50) {
+ if (this.rafPending) {
48
49
50
- this.lastDrag = Date.now();
51
- this.resize(value, false);
+ this.rafPending = requestAnimationFrame(() => {
+ this.rafPending = null;
52
+ this.resize(this.lastDragValue, false);
53
+ });
54
55
56
onDragEnd(event) {
57
58
+ cancelAnimationFrame(this.rafPending);
59
60
+ }
61
$.off(window, "dragover", this.onDrag);
62
let value = event.pageX || event.screenX - window.screenX;
63
if (
0 commit comments