You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
PAGViewV2({ controller: this.controller.viewController })
.width("100%")
.height("100%")
Row()
.onTouch((e: TouchEvent) => {
this.ctx.postFrameCallback(new MyFrameCallback(() => {
this.controller.touch(e);
}))
})
目前是使用UIContext的postFrameCallback进行了一个触摸优化,但是还是过于卡顿了
touch = (e: TouchEvent) => {
let x = e.touches[0].x;
let viewController = this.viewController;
switch (e.type) {
case TouchType.Down: {
this.startX = x;
}
break;
case TouchType.Move: {
if (this.startX == x) {
return;
}
this.startX = x;
let value = Math.max(0, Math.min(x, this.width)) / this.width;
this.current = value * 100;
viewController.setProgress(value);
viewController.play();
viewController.pause();
}
break;
}
}
Beta Was this translation helpful? Give feedback.
All reactions