Fakultas Ilmu Komputer UI

Commit 7855bd96 authored by Rachmat Ridwan's avatar Rachmat Ridwan
Browse files

Fix error on reinit for touch device

parent 1274f58f
Pipeline #43222 passed with stage
in 2 minutes and 46 seconds
......@@ -180,11 +180,19 @@ function trackMouseForTrackball(event) {
if (touchingNorthPole || goingBeyondNorthPole) {
newTheta = (Math.sign(initTheta) || 1) * 0.01;
initTheta = newTheta;
posYInit = event.screenY;
if (event.touches) {
posYInit = event.touches[0].screenY;
} else {
posYInit = event.screenY;
}
} else if (touchingSouthPole || goingBeyondSouthPole) {
newTheta = (Math.sign(initTheta) || 1) * (Math.PI - 0.01);
initTheta = newTheta;
posYInit = event.screenY;
if (event.touches) {
posYInit = event.touches[0].screenY;
} else {
posYInit = event.screenY;
}
}
theta = newTheta;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment