@@ -442,7 +442,7 @@ function changeEditable(index,reset=false){
442442 updateOnServer ( ) ;
443443 return
444444 }
445- $ ( `.scatterlayer .trace:nth-of-type( ${ currentEditable + 1 } ) .points path` ) . css ( { 'pointer-events' :'none' } )
445+ $ ( `.scatterlayer .trace: .points path` ) . css ( { 'pointer-events' :'none' } )
446446
447447 let line1 = figurecontainer . _fullData [ currentEditable ] . line
448448 let marker1 = figurecontainer . _fullData [ currentEditable ] . marker
@@ -776,7 +776,7 @@ function closeNav() {
776776
777777
778778function tools ( option , index , ev ) {
779- console . log ( option , index )
779+ ev . stopPropagation ( )
780780 if ( option == 0 ) { //select editable
781781 if ( currentEditable != index ) changeEditable ( index )
782782 } else if ( option == 1 ) { // clone this
@@ -788,8 +788,8 @@ function tools(option,index,ev){
788788 addTrace ( )
789789 } else if ( option == 2 ) { // close this
790790 if ( fileNames . length == 1 ) return // nothing to delete here
791+ if ( index == currentEditable ) return
791792 if ( index <= currentEditable ) changeEditable2 ( currentEditable - 1 ) // currentEditable is changed within the function
792-
793793 Plotly . deleteTraces ( figurecontainer , index )
794794 fullData . splice ( index , 1 )
795795 fullDataCols . splice ( index , 1 )
@@ -798,7 +798,6 @@ function tools(option,index,ev){
798798 legendNames . splice ( index , 1 )
799799 }
800800 makeRows ( )
801- ev . stopPropagation ( )
802801}
803802
804803function tools2 ( option , index , ev , elem ) {
@@ -817,6 +816,8 @@ function tools2(option,index,ev,elem){
817816 }
818817 } else {
819818 fullDataCols [ index ] [ option ] = val
819+ let colC = fullDataCols [ index ]
820+ legendNames [ index ] = path . basename ( fileNames [ index ] ) + ` ${ ( swapped ? colC . x : colC . y ) + 1 } :${ colC . z + 1 } `
820821 updatePlot ( true )
821822 }
822823}
0 commit comments