mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Remove some console.log statements
This commit is contained in:
parent
9fb4bc517b
commit
c5ef4d3861
4 changed files with 0 additions and 24 deletions
|
|
@ -33,7 +33,6 @@ export default class extends Controller {
|
|||
*/
|
||||
setupEventListeners() {
|
||||
document.addEventListener('area:drawn', (e) => {
|
||||
console.log('[Area Creation V2] area:drawn event received:', e.detail)
|
||||
this.open(e.detail.center, e.detail.radius)
|
||||
})
|
||||
}
|
||||
|
|
@ -42,8 +41,6 @@ export default class extends Controller {
|
|||
* Open the modal with area data
|
||||
*/
|
||||
open(center, radius) {
|
||||
console.log('[Area Creation V2] open() called with center:', center, 'radius:', radius)
|
||||
|
||||
// Store area data
|
||||
this.area = { center, radius }
|
||||
|
||||
|
|
@ -156,9 +153,6 @@ export default class extends Controller {
|
|||
* Show success message
|
||||
*/
|
||||
showSuccess(message) {
|
||||
// You can replace this with a toast notification if available
|
||||
console.log(message)
|
||||
|
||||
// Try to use the Toast component if available
|
||||
if (window.Toast) {
|
||||
window.Toast.show(message, 'success')
|
||||
|
|
|
|||
|
|
@ -22,13 +22,11 @@ export default class extends Controller {
|
|||
* @param {maplibregl.Map} map - The MapLibre map instance
|
||||
*/
|
||||
startDrawing(map) {
|
||||
console.log('[Area Drawer] startDrawing called with map:', map)
|
||||
if (!map) {
|
||||
console.error('[Area Drawer] Map instance not provided')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('[Area Drawer] Starting drawing mode')
|
||||
this.isDrawing = true
|
||||
this.map = map
|
||||
map.getCanvas().style.cursor = 'crosshair'
|
||||
|
|
@ -97,13 +95,9 @@ export default class extends Controller {
|
|||
|
||||
if (!this.center) {
|
||||
// First click - set center
|
||||
console.log('[Area Drawer] First click - setting center:', e.lngLat)
|
||||
this.center = [e.lngLat.lng, e.lngLat.lat]
|
||||
} else {
|
||||
// Second click - finish drawing
|
||||
console.log('[Area Drawer] Second click - finishing drawing')
|
||||
|
||||
console.log('[Area Drawer] Dispatching area:drawn event')
|
||||
document.dispatchEvent(new CustomEvent('area:drawn', {
|
||||
detail: {
|
||||
center: this.center,
|
||||
|
|
|
|||
|
|
@ -72,9 +72,7 @@ export default class extends BaseController {
|
|||
}
|
||||
|
||||
async loadHexagons() {
|
||||
console.log('🎯 loadHexagons started - checking overlay state');
|
||||
const initialLoadingElement = document.getElementById('map-loading');
|
||||
console.log('📊 Initial overlay display:', initialLoadingElement?.style.display || 'default');
|
||||
|
||||
try {
|
||||
// Use server-provided data bounds
|
||||
|
|
@ -94,9 +92,6 @@ export default class extends BaseController {
|
|||
// Fallback timeout in case moveend doesn't fire
|
||||
setTimeout(resolve, 1000);
|
||||
});
|
||||
console.log('✅ Map fitBounds complete - checking overlay state');
|
||||
const afterFitBoundsElement = document.getElementById('map-loading');
|
||||
console.log('📊 After fitBounds overlay display:', afterFitBoundsElement?.style.display || 'default');
|
||||
}
|
||||
|
||||
// Load hexagons only if they are pre-calculated and data exists
|
||||
|
|
@ -138,7 +133,6 @@ export default class extends BaseController {
|
|||
loadingElement.style.display = 'flex';
|
||||
loadingElement.style.visibility = 'visible';
|
||||
loadingElement.style.zIndex = '9999';
|
||||
console.log('👁️ Loading overlay ENSURED visible - should be visible now');
|
||||
}
|
||||
|
||||
// Disable map interaction during loading
|
||||
|
|
@ -187,7 +181,6 @@ export default class extends BaseController {
|
|||
}
|
||||
|
||||
const geojsonData = await response.json();
|
||||
console.log(`✅ Loaded ${geojsonData.features?.length || 0} hexagons`);
|
||||
|
||||
// Add hexagons directly to map as a static layer
|
||||
if (geojsonData.features && geojsonData.features.length > 0) {
|
||||
|
|
@ -210,7 +203,6 @@ export default class extends BaseController {
|
|||
const loadingElement = document.getElementById('map-loading');
|
||||
if (loadingElement) {
|
||||
loadingElement.style.display = 'none';
|
||||
console.log('🚫 Loading overlay hidden - hexagons are fully loaded');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,15 +123,11 @@ export class ApiClient {
|
|||
})
|
||||
|
||||
const url = `${this.baseURL}/photos?${params}`
|
||||
console.log('[ApiClient] Fetching photos from:', url)
|
||||
console.log('[ApiClient] With headers:', this.getHeaders())
|
||||
|
||||
const response = await fetch(url, {
|
||||
headers: this.getHeaders()
|
||||
})
|
||||
|
||||
console.log('[ApiClient] Photos response status:', response.status)
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch photos: ${response.statusText}`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue