FIX: disabled topic timeline panning on desktop

This commit is contained in:
Joffrey JAFFEUX 2018-07-02 14:52:02 +02:00 committed by GitHub
parent c754ece8f5
commit b4cb31d999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 10 deletions

View File

@ -4,19 +4,27 @@ export default Ember.Mixin.create({
_panState: null,
didInsertElement() {
this.$()
.on("pointerdown", e => this._panStart(e))
.on("pointermove", e => this._panMove(e))
.on("pointerup", e => this._panMove(e))
.on("pointercancel", e => this._panMove(e));
this._super();
if (this.site.mobileView) {
this.$()
.on("pointerdown", e => this._panStart(e))
.on("pointermove", e => this._panMove(e))
.on("pointerup", e => this._panMove(e))
.on("pointercancel", e => this._panMove(e));
}
},
willDestroyElement() {
this.$()
.off("pointerdown")
.off("pointerup")
.off("pointermove")
.off("pointercancel");
this._super();
if (this.site.mobileView) {
this.$()
.off("pointerdown")
.off("pointerup")
.off("pointermove")
.off("pointercancel");
}
},
_calculateNewPanState(oldState, e) {