diff --git a/taxonium_web_client/src/components/SearchTopLayerItem.jsx b/taxonium_web_client/src/components/SearchTopLayerItem.jsx index 6ca49970..a00c518d 100644 --- a/taxonium_web_client/src/components/SearchTopLayerItem.jsx +++ b/taxonium_web_client/src/components/SearchTopLayerItem.jsx @@ -8,7 +8,7 @@ import Modal from "react-modal"; function SearchTopLayerItem({ singleSearchSpec, myKey, search, config }) { const myLoadingStatus = search.searchLoadingStatus[myKey]; - console.log("myLoadingStatus", myLoadingStatus); + const [permaLinkModalOpen, setPermaLinkModalOpen] = useState(false); const this_result = search.searchResults[myKey]; diff --git a/taxonium_web_client/src/hooks/useLayers.js b/taxonium_web_client/src/hooks/useLayers.js index 1983b518..b6dbe490 100644 --- a/taxonium_web_client/src/hooks/useLayers.js +++ b/taxonium_web_client/src/hooks/useLayers.js @@ -40,6 +40,7 @@ const useLayers = ({ data, viewState, colorHook, + hoverInfo, setHoverInfo, settings, treenomeReferenceInfo, @@ -486,6 +487,8 @@ const useLayers = ({ (layer.id.startsWith("fillin") && viewport.id === "main" && isCurrentlyOutsideBounds) || + (layer.id.startsWith("browser-hovered") && + viewport.id === "browser-main") || (layer.id.startsWith("browser-loaded") && viewport.id === "browser-main") || (layer.id.startsWith("browser-fillin") && diff --git a/taxonium_web_client/src/hooks/useTreenomeLayers.js b/taxonium_web_client/src/hooks/useTreenomeLayers.js index 663ac775..625007d4 100644 --- a/taxonium_web_client/src/hooks/useTreenomeLayers.js +++ b/taxonium_web_client/src/hooks/useTreenomeLayers.js @@ -7,6 +7,7 @@ const useTreenomeLayers = ( data, viewState, colorHook, + hoverInfo, setHoverInfo, settings, treenomeReferenceInfo, @@ -188,6 +189,7 @@ const useTreenomeLayers = ( }, getPolygonOffset: myGetPolygonOffset, }; + const main_variation_layer_aa = new LineLayer({ ...main_variation_aa_common_props, data: layerDataAa, @@ -199,6 +201,20 @@ const useTreenomeLayers = ( id: "browser-fillin-aa", }); + const hovered_layer_aa = new LineLayer({ + ...main_variation_aa_common_props, + data: + hoverInfo && + hoverInfo.object && + hoverInfo.object.m && + hoverInfo.object.m.gene && + hoverInfo.object.m.gene !== "nt" + ? [hoverInfo.object] + : [], + id: "browser-hovered-aa", + getWidth: aaWidth * 1.5, + }); + const main_variation_nt_common_props = { onHover: (info) => setHoverInfo(info), pickable: true, @@ -283,6 +299,20 @@ const useTreenomeLayers = ( id: "browser-fillin-nt", }); + const hovered_layer_nt = new LineLayer({ + ...main_variation_nt_common_props, + data: + hoverInfo && + hoverInfo.object && + hoverInfo.object.m && + hoverInfo.object.m.gene && + hoverInfo.object.m.gene === "nt" + ? [hoverInfo.object] + : [], + id: "browser-hovered-nt", + getWidth: ntWidth * 2, + }); + const dynamic_background_data = useMemo(() => { if (!settings.treenomeEnabled || cov2Genes === null) { return []; @@ -441,10 +471,12 @@ const useTreenomeLayers = ( if (settings.mutationTypesEnabled.aa) { layers.push(fillin_variation_layer_aa); layers.push(main_variation_layer_aa); + layers.push(hovered_layer_aa); } if (settings.mutationTypesEnabled.nt) { layers.push(fillin_variation_layer_nt); layers.push(main_variation_layer_nt); + layers.push(hovered_layer_nt); } layers.push(selected_node_layer);