diff --git a/src/gui/gui.ts b/src/gui/gui.ts index ad6e471..7db2f37 100644 --- a/src/gui/gui.ts +++ b/src/gui/gui.ts @@ -140,7 +140,12 @@ export function setupGui( layoutFolder.add(layoutProps, "showLegend"); layoutFolder.add(layoutProps, "phylogenyColorScheme"); layoutFolder.add(layoutProps, "phylogenyHueOffset", 0, 360); - layoutFolder.add(layoutProps, "sampleTakenGuide", ["none", "line", "text"]); + layoutFolder.add(layoutProps, "sampleTakenGuide", [ + "none", + "line", + "text", + "text-all", + ]); layoutFolder.add(layoutProps, "showRankTitles"); layoutFolder.add(layoutProps, "normalsAtPhylogenyRoot"); layoutFolder.onChange(onPatientChange); diff --git a/src/jellyfish.ts b/src/jellyfish.ts index 7e0ab8c..04e909c 100644 --- a/src/jellyfish.ts +++ b/src/jellyfish.ts @@ -874,6 +874,9 @@ function drawSamples( layoutProps.tentacleWidth, node == sampleTakenGuidePlacement ? "all" + : node.type == NODE_TYPES.REAL_SAMPLE && + layoutProps.sampleTakenGuide == "text-all" + ? "all" : node.type == NODE_TYPES.REAL_SAMPLE && layoutProps.sampleTakenGuide != "none" ? "line" diff --git a/src/layout.ts b/src/layout.ts index 065bedd..d7a2676 100644 --- a/src/layout.ts +++ b/src/layout.ts @@ -142,10 +142,11 @@ export interface LayoutProperties extends BellPlotProperties { * `"none"` for no guides, * `"line"` for a faint dashed line in all samples, * `"text"` same as line, but with a text label in one of the samples. + * `"text-all"` same as text, but with a text label in all samples. * * @default "text" */ - sampleTakenGuide: "none" | "line" | "text"; + sampleTakenGuide: "none" | "line" | "text" | "text-all"; /** * Whether to show rank titles above the samples (if provided).