Merge branch '311-can-t-switch-rooms-on-chrome-android' into 'dev'

Fix dragging of bottom sheet

See merge request keanuapp/keanuapp-weblite!81
This commit is contained in:
N Pex 2022-04-26 11:58:40 +00:00
commit 72f7cf392e

View file

@ -48,6 +48,7 @@ export default {
mc: null,
y: 0,
startY: 0,
startYCoord: 0,
isMove: false,
state: this.defaultState,
rect: {},
@ -65,14 +66,20 @@ export default {
const self = this;
this.mc.on("panup pandown", (evt) => {
self.y = evt.center.y - 16;
self.y = self.startYCoord - (self.startY - evt.center.y);
});
this.mc.on("panstart", (evt) => {
self.startY = evt.center.y;
self.startYCoord = this.calcY();
self.isMove = true;
});
this.mc.on("pancancel", (ignoredEvt) => {
self.y = self.startYCoord;
self.isMove = false;
});
this.mc.on("panend", (evt) => {
self.isMove = false;