fix: accept deep-linked memory detail selection
This commit is contained in:
@@ -595,15 +595,14 @@ if (requestedRunId) {
|
||||
&& document.querySelectorAll(".memory-chart [data-memory-axis-x-tick='true']").length >= 3
|
||||
&& document.querySelectorAll(".memory-chart [data-memory-axis-y-tick='true']").length >= 3;
|
||||
const pageLinesOk = pageCount > 0 && curveCount === pageCount;
|
||||
if (memoryChart?.getAttribute("data-memory-run-id") === runId
|
||||
&& (!(selected instanceof HTMLElement) || selected.classList.contains("selected"))
|
||||
&& axesOk
|
||||
&& pageLinesOk) {
|
||||
const memoryMatchesRun = memoryChart?.getAttribute("data-memory-run-id") === runId;
|
||||
const rowSelected = selected instanceof HTMLElement && selected.classList.contains("selected");
|
||||
if (memoryMatchesRun && axesOk && pageLinesOk) {
|
||||
if (memoryChart instanceof HTMLElement) {
|
||||
memoryChart.scrollIntoView({ block: "center", inline: "nearest", behavior: "auto" });
|
||||
await wait(250);
|
||||
}
|
||||
return { requestedRunId: runId, ok: true, reason: "selected-memory-ready" };
|
||||
return { requestedRunId: runId, ok: true, reason: rowSelected ? "selected-memory-ready" : "deeplink-memory-ready" };
|
||||
}
|
||||
await wait(150);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user