Browse Source

Remove debug console.log statements

master
HikeMap User 4 weeks ago
parent
commit
dfff5eb155
  1. 10
      index.html

10
index.html

@ -6868,11 +6868,8 @@
// Move once in the specified direction // Move once in the specified direction
const doMove = (dir) => { const doMove = (dir) => {
console.log('doMove called:', dir, 'gpsTestMode:', gpsTestMode);
// Auto-enable GPS test mode if not already enabled // Auto-enable GPS test mode if not already enabled
if (!gpsTestMode) { if (!gpsTestMode) {
console.log('Auto-enabling GPS test mode');
// Initialize test position to current map center or user location // Initialize test position to current map center or user location
if (userLocation) { if (userLocation) {
testPosition = { lat: userLocation.lat, lng: userLocation.lng }; testPosition = { lat: userLocation.lat, lng: userLocation.lng };
@ -6948,7 +6945,6 @@
// Start moving (on press/touch start) // Start moving (on press/touch start)
const startMove = (e, dir) => { const startMove = (e, dir) => {
console.log('startMove called:', dir);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -6963,12 +6959,10 @@
doMove(wasdCurrentDir); doMove(wasdCurrentDir);
} }
}, 100); // Move every 100ms while held }, 100); // Move every 100ms while held
console.log('Interval started, wasdMoveInterval:', wasdMoveInterval);
}; };
// Stop moving (on release) // Stop moving (on release)
const stopMove = () => { const stopMove = () => {
console.log('stopMove called, clearing interval:', wasdMoveInterval);
wasdCurrentDir = null; wasdCurrentDir = null;
if (wasdMoveInterval) { if (wasdMoveInterval) {
clearInterval(wasdMoveInterval); clearInterval(wasdMoveInterval);
@ -6982,7 +6976,6 @@
let isPressed = false; let isPressed = false;
btn.addEventListener('pointerdown', (e) => { btn.addEventListener('pointerdown', (e) => {
console.log('pointerdown on', dir, 'button');
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
isPressed = true; isPressed = true;
@ -6991,7 +6984,6 @@
}); });
btn.addEventListener('pointerup', (e) => { btn.addEventListener('pointerup', (e) => {
console.log('pointerup on', dir, 'button, isPressed:', isPressed);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
if (isPressed) { if (isPressed) {
@ -7002,7 +6994,6 @@
}); });
btn.addEventListener('pointercancel', (e) => { btn.addEventListener('pointercancel', (e) => {
console.log('pointercancel on', dir, 'button');
if (isPressed) { if (isPressed) {
isPressed = false; isPressed = false;
btn.releasePointerCapture(e.pointerId); btn.releasePointerCapture(e.pointerId);
@ -7012,7 +7003,6 @@
// Handle lost pointer capture (e.g., when element is hidden) // Handle lost pointer capture (e.g., when element is hidden)
btn.addEventListener('lostpointercapture', (e) => { btn.addEventListener('lostpointercapture', (e) => {
console.log('lostpointercapture on', dir, 'button');
if (isPressed) { if (isPressed) {
isPressed = false; isPressed = false;
stopMove(); stopMove();

Loading…
Cancel
Save