mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Fix: delay panning until we can determine direction
This commit is contained in:
parent
e6d4a09b55
commit
f3b17b92b7
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,9 @@ export default Ember.Mixin.create({
|
||||||
}
|
}
|
||||||
const previousState = this.get("_panState");
|
const previousState = this.get("_panState");
|
||||||
const newState = this._calculateNewPanState(previousState, e);
|
const newState = this._calculateNewPanState(previousState, e);
|
||||||
|
if (previousState.start && newState.distance < 5) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.set("_panState", newState);
|
this.set("_panState", newState);
|
||||||
if (previousState.start && "panStart" in this) {
|
if (previousState.start && "panStart" in this) {
|
||||||
this.panStart(newState);
|
this.panStart(newState);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue