@@ -73,13 +73,13 @@ function generateBiasTooltipText(def) {
7373
7474 // Check if uniform
7575 if ( isUniformProbabilities ( probabilities ) ) {
76- return 'All outcomes are equally likely.' ;
76+ return ' All outcomes are equally likely.' ;
7777 }
7878
7979 // Check if one outcome is certain (probability = 1.0)
8080 const certainIndex = probabilities . findIndex ( ( p ) => nearlyEqual ( p , 1.0 ) ) ;
8181 if ( certainIndex !== - 1 ) {
82- return `Certain outcome: ${ labels [ certainIndex ] } \nAll other outcomes are impossible.` ;
82+ return ` Certain outcome: ${ labels [ certainIndex ] } \n All other outcomes are impossible.` ;
8383 }
8484
8585 // Find most and least likely outcomes
@@ -94,7 +94,7 @@ function generateBiasTooltipText(def) {
9494 }
9595 }
9696
97- return `Most likely outcome: ${ labels [ maxIndex ] } \nLeast likely outcome: ${ labels [ minIndex ] } ` ;
97+ return ` Most likely outcome: ${ labels [ maxIndex ] } \n Least likely outcome: ${ labels [ minIndex ] } ` ;
9898}
9999
100100export function renderExperimentSetup ( els , state ) {
@@ -135,11 +135,11 @@ export function renderExperimentSetup(els, state) {
135135 const tooltipB = defB ? generateBiasTooltipText ( defB ) : '' ;
136136 let tooltipText = '' ;
137137 if ( tooltipA && tooltipB ) {
138- tooltipText = `Device A: ${ tooltipA } \nDevice B: ${ tooltipB } ` ;
138+ tooltipText = `Device A:\n ${ tooltipA } \nDevice B:\n ${ tooltipB } ` ;
139139 } else if ( tooltipA ) {
140- tooltipText = `Device A: ${ tooltipA } ` ;
140+ tooltipText = `Device A:\n ${ tooltipA } ` ;
141141 } else if ( tooltipB ) {
142- tooltipText = `Device B: ${ tooltipB } ` ;
142+ tooltipText = `Device B:\n ${ tooltipB } ` ;
143143 }
144144 if ( tooltipText ) {
145145 els . biasSummary . setAttribute ( 'data-tooltip' , tooltipText ) ;
0 commit comments