From 1427d49e62d642a243969bdfd75d3052673b6e93 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Thu, 7 Mar 2024 09:54:13 -0800 Subject: [PATCH] Remove unused JS file --- flow/resources/web/Flow/editGates.js | 298 --------------------------- 1 file changed, 298 deletions(-) delete mode 100644 flow/resources/web/Flow/editGates.js diff --git a/flow/resources/web/Flow/editGates.js b/flow/resources/web/Flow/editGates.js deleted file mode 100644 index 0c15e5945a..0000000000 --- a/flow/resources/web/Flow/editGates.js +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) 2012-2019 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 - */ -var g_graphOptions = { - subset : null, - xAxis : null, - yAxis : null, - points : [], - complexGate: false, - intervalGate: false, - dirty: false -}; - -function reloadGraph() -{ - var elGraph = document.getElementById("graph"); - if (!g_graphOptions.subset) - { - return; - } - if (!g_graphOptions.xAxis) - { - elGraph.src = "about:blank"; - return; - } - var src = g_urlGraphWindow + - "&xaxis=" + urlEncode(g_graphOptions.xAxis) + - "&subset=" + urlEncode(g_graphOptions.subset); - if (g_graphOptions.yAxis) - { - src += "&yaxis=" + urlEncode(g_graphOptions.yAxis); - } - src += "&width=400&height=400"; - elGraph.src = src; -} - -function parameterOptions(curParam, axis) -{ - var ret = []; - if (axis == 1) - { - ret.push(''); - } - for (var i = 0; i < parameters.length; i ++) - { - ret.push(''); - } - return ret.join(""); -} - -function setXAxis(el) -{ - g_graphOptions.xAxis = getValue(el); - updateAll(); -} -function setYAxis(el) -{ - g_graphOptions.yAxis = getValue(el); - updateAll(); -} - -function getLabel(axis) -{ - if (!axis || axis.length == 0) - return "Count"; - for (var i = 0; i < parameters.length; i ++) - { - if (parameters[i].name == axis) - return parameters[i].label; - } - return axis; -} - -function gatePointEditor() -{ - if (!g_graphOptions.points || g_graphOptions.points.length == 0) - { - var ret = [''); - ret.push('') - ret.push('') - if (g_graphOptions.complexGate) - { - ret.push(''); - } - ret.push(""); - ret.push('
']; - ret.push(g_graphOptions.subset); - ret.push('
X AxisY Axis
Warning: this population already has a complex gate that cannot be edited with this tool.
To define a new gate, choose the X and Y parameters, and then click on the graph.
'); - return ret.join(""); - } - var interval = g_graphOptions.intervalGate || !g_graphOptions.yAxis; - function row(index) - { - var ret = BaseObj(); - if (interval) - { - ret.str = ['', - '', - index == 0 ? 'Min:' : 'Max:', - '', - '|x|'].join(''); - } - else - { - ret.str = ['', - '', - '|x|', - '', - '|y|'].join(''); - } - ret.x = g_graphOptions.points[index].x; - ret.y = g_graphOptions.points[index].y; - ret.index = index; - return ret; - } - var ret = BaseObj(); - var saveable = g_graphOptions.points.length >= 2 && g_graphOptions.dirty; - if (interval) - { - ret.str = ['
', - '', - '', - '', - '', - '', - '', - '', - '|rows|', - '', - saveable ? '' : '', - '
|subset|
Interval gate on |xAxisLabel|
Plotted against:
'].join(''); - } - else - { - ret.str = ['
', - '', - '', - '', - '', - '', - '', - '|rows|', - '', - saveable ? '' : '', - '
|subset|
|xAxisLabel||yAxisLabel|
'].join(''); - } - ret.formAction = g_formAction; - ret.xAxis = g_graphOptions.xAxis; - ret.yAxis = g_graphOptions.yAxis; - ret.xAxisLabel = getLabel(g_graphOptions.xAxis); - ret.yAxisLabel = getLabel(g_graphOptions.yAxis); - ret.subset = g_graphOptions.subset; - ret.rows = StringArray(); - - for (var i = 0; i < g_graphOptions.points.length; i ++) - { - ret.rows.push(row(i)); - } - return ret; -} - -function updateGateEditor() -{ - if (!g_graphOptions.subset) - { - initGraph(); - return; - } - document.getElementById("polygon").innerHTML = gatePointEditor().toString(); - if (window.frames.graph.updateImage) - { - window.frames.graph.updateImage(); - } -} - -function updateAll() -{ - reloadGraph(); - updateGateEditor(); -} - -function setPopulation(name) -{ - var pop = populations[name]; - g_graphOptions.subset = name; - g_graphOptions.dirty = false; - if (pop.gate) - { - g_graphOptions.xAxis = pop.gate.xAxis; - g_graphOptions.yAxis = pop.gate.yAxis; - g_graphOptions.points = pop.gate.points; - g_graphOptions.intervalGate = pop.gate.intervalGate; - } - else - { - g_graphOptions.xAxis = g_graphOptions.yAxis = g_graphOptions.points = null; - } - - g_graphOptions.complexGate = pop.complexGate; - updateAll(); - if (subsetWellMap[name]) - { - setWell(subsetWellMap[name]); - setValue(document.getElementById("wells"), subsetWellMap[name]); - } -} - -function setPoint(index, pt) -{ - g_graphOptions.points[index] = pt; - g_graphOptions.dirty = true; - updateGateEditor(); -} - -function setPoints(pts) -{ - g_graphOptions.points = pts; - g_graphOptions.dirty = true; - if (pts.length == 0) - { - g_graphOptions.intervalGate = false; - } - updateGateEditor(); -} - -function getPoints() -{ - return g_graphOptions.points; -} - -function trackPoint(pt) -{ - window.status = Math.round(pt.x) + "," + Math.round(pt.y); -} - -function createNewPopulation() -{ - var name = window.prompt("What do you want to call this new population?", "subset"); - if (!name) - return; - var parent = getValue(document.getElementById("subset")); - var fullName; - if (parent) - { - fullName = parent + "/" + name; - } - else - { - fullName = name; - } - if (populations[fullName]) - { - window.alert("There is already a population " + fullName); - return; - } - g_graphOptions.subset = fullName; - g_graphOptions.xAxis = null; - g_graphOptions.yAxis = null; - g_graphOptions.points = []; - g_graphOptions.complexGate = false; - g_graphOptions.intervalGate = false; - updateAll(); -} -function initGraph(subset, xAxis, yAxis) -{ - if (subset) - { - setPopulation(subset); - } - else - { - document.getElementById("polygon").innerHTML = ''; - document.getElementById("graph").src = g_urlInstructions; - } -} - -function setWell(id) -{ - g_urlGraphWindow = g_urlGraphWindow.replace(/wellId=[0-9]*/, "wellId=" + id); - g_formAction = g_formAction.replace(/wellId=[0-9]*/, "wellId=" + id); - reloadGraph(); -} \ No newline at end of file