diff --git a/frontend/public/earth/js/main.js b/frontend/public/earth/js/main.js index 109c9039..774fbb2a 100644 --- a/frontend/public/earth/js/main.js +++ b/frontend/public/earth/js/main.js @@ -13,7 +13,7 @@ import { hideTooltip } from './ui.js'; import { createEarth, createClouds, createTerrain, createStars, createGridLines, toggleTerrain, getEarth } from './earth.js'; -import { loadGeoJSONFromPath, loadLandingPoints, handleCableClick, clearCableSelection, getCableLines, getCablesById, lockedCable as cableLocked, getCableState, setCableState, clearAllCableStates, applyLandingPointVisualState, resetLandingPointVisualState, getAllLandingPoints } from './cables.js'; +import { loadGeoJSONFromPath, loadLandingPoints, handleCableClick, clearCableSelection, getCableLines, getCablesById, lockedCable as cableLocked, getCableState, setCableState, clearAllCableStates, applyLandingPointVisualState, resetLandingPointVisualState, getAllLandingPoints, getShowCables } from './cables.js'; import { createSatellites, loadSatellites, updateSatellitePositions, toggleSatellites, toggleTrails, getShowSatellites, selectSatellite, getSatelliteData, getSatellitePoints, setSatelliteRingState, updateLockedRingPosition, updateHoverRingPosition, getSatellitePositions } from './satellites.js'; import { setupControls, getAutoRotate, getShowTerrain, zoomLevel, setAutoRotate, toggleAutoRotate, resetView } from './controls.js'; import { initInfoCard, showInfoCard, hideInfoCard, getCurrentType, setInfoCardNoBorder } from './info-card.js'; @@ -306,7 +306,7 @@ function onMouseMove(event, camera) { hoveredSatelliteIndex = null; } - if (hasHoveredCable) { + if (hasHoveredCable && getShowCables()) { const cable = intersects[0].object; if (!isSameCable(cable, lockedObject)) { hoveredCable = cable; @@ -402,7 +402,7 @@ function onClick(event, camera, renderer) { const intersects = raycaster.intersectObjects(frontCables); const satIntersects = getShowSatellites() ? raycaster.intersectObject(getSatellitePoints()) : []; - if (intersects.length > 0) { + if (intersects.length > 0 && getShowCables()) { clearLockedObject(); const clickedCable = intersects[0].object;