@@ -350,14 +350,6 @@ export async function fetchUmapData() {
350350 epsContainer . style . display = "block" ;
351351 }
352352
353- // Add triangle trace and images after plot is created
354- if ( landmarksVisible && typeof landmarkTrace !== "undefined" ) {
355- setTimeout ( ( ) => {
356- Plotly . addTraces ( gd , [ landmarkTrace ] ) ;
357- Plotly . relayout ( gd , { images } ) ;
358- } , 500 ) ;
359- }
360-
361353 // After adding traces (e.g., landmarks), move the marker trace to the end
362354 const plotDiv = document . getElementById ( "umapPlot" ) ;
363355 const markerTraceIndex = plotDiv . data . findIndex ( ( trace ) => trace . name === "Current Image" ) ;
@@ -432,7 +424,7 @@ export async function fetchUmapData() {
432424function findLandmarkCluster ( point ) {
433425 const plotDiv = document . getElementById ( "umapPlot" ) ;
434426 const landmarkTraceIndex = plotDiv . data . findIndex ( ( trace ) => trace . name === "LandmarkClickTargets" ) ;
435- if ( landmarkTraceIndex == - 1 ) {
427+ if ( landmarkTraceIndex === - 1 ) {
436428 return null ;
437429 }
438430
@@ -1267,7 +1259,9 @@ function proximityClusterOrder(clusterIndices, points, startIndex) {
12671259// Shared function for cluster clicks
12681260async function handleClusterClick ( clickedIndex ) {
12691261 const clickedPoint = points . find ( ( p ) => p . index === clickedIndex ) ;
1270- if ( ! clickedPoint ) return ;
1262+ if ( ! clickedPoint ) {
1263+ return ;
1264+ }
12711265
12721266 // Show spinner immediately to provide visual feedback
12731267 showUmapSpinner ( ) ;
@@ -1312,7 +1306,9 @@ async function handleClusterClick(clickedIndex) {
13121306// Handle single image selection (navigate to clicked image)
13131307async function handleImageClick ( clickedIndex ) {
13141308 const clickedPoint = points . find ( ( p ) => p . index === clickedIndex ) ;
1315- if ( ! clickedPoint ) return ;
1309+ if ( ! clickedPoint ) {
1310+ return ;
1311+ }
13161312
13171313 // Show spinner immediately to provide visual feedback
13181314 showUmapSpinner ( ) ;
0 commit comments