Clean up dead code, typos, and minor style issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 14:00:31 +08:00
parent 932275e4d4
commit 19a39bbbff
5 changed files with 10 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
<ul class="space-y-2" id="cyp-conformance-result-check"> <ul class="space-y-2" id="cyp-conformance-result-check">
<li <li
class="flex justify-start items-center pr-4" class="flex justify-start items-center pr-4"
v-for="(act, index) in datadata" v-for="(act, index) in displayData"
:key="index" :key="index"
:title="act" :title="act"
> >
@@ -34,21 +34,21 @@ import emitter from "@/utils/emitter";
const props = defineProps(["data", "select"]); const props = defineProps(["data", "select"]);
const datadata = ref(props.select); const displayData = ref(props.select);
watch( watch(
() => props.data, () => props.data,
(newValue) => { (newValue) => {
datadata.value = newValue; displayData.value = newValue;
}, },
); );
watch( watch(
() => props.select, () => props.select,
(newValue) => { (newValue) => {
datadata.value = newValue; displayData.value = newValue;
}, },
); );
emitter.on("reset", (val) => (datadata.value = val)); emitter.on("reset", (val) => (displayData.value = val));
</script> </script>

View File

@@ -181,9 +181,7 @@ export default function cytoscapeMap(
"text-margin-y": function (node) { "text-margin-y": function (node) {
return node.data("type") === "activity" ? 2 : 0; return node.data("type") === "activity" ? 2 : 0;
}, },
padding: function (node) { padding: 0,
return node.data("type") === "activity" ? 0 : 0;
},
"text-justification": "left", "text-justification": "left",
"text-halign": "center", "text-halign": "center",
"text-valign": "center", "text-valign": "center",

View File

@@ -25,7 +25,6 @@ cytoscape.use(dagre);
* backgroundColor, bordercolor, height, id, label, shape, and width. * backgroundColor, bordercolor, height, id, label, shape, and width.
* @param {Array<Object>} edges - Array of edge data objects. * @param {Array<Object>} edges - Array of edge data objects.
* @param {HTMLElement} graphId - The DOM container element for Cytoscape. * @param {HTMLElement} graphId - The DOM container element for Cytoscape.
* @returns {cytoscape.Core} The configured Cytoscape instance.
*/ */
export default function cytoscapeMapTrace(nodes, edges, graphId) { export default function cytoscapeMapTrace(nodes, edges, graphId) {
// create Cytoscape // create Cytoscape

View File

@@ -110,7 +110,7 @@ export function getTimeLabel(second, fixedNumber = 0) {
} else if (mm > 0) { } else if (mm > 0) {
return ((second % hour) / minutes).toFixed(fixedNumber) + " mins"; return ((second % hour) / minutes).toFixed(fixedNumber) + " mins";
} }
if (second == 0) { if (second === 0) {
return second + " sec"; return second + " sec";
} }
return second + " sec"; return second + " sec";
@@ -141,7 +141,7 @@ export function simpleTimeLabel(second, fixedNumber = 0) {
} else if (mm > 0) { } else if (mm > 0) {
return ((second % hour) / minutes).toFixed(fixedNumber) + "m"; return ((second % hour) / minutes).toFixed(fixedNumber) + "m";
} }
if (second == 0) { if (second === 0) {
return second + "s"; return second + "s";
} }
return second + "s"; return second + "s";

View File

@@ -824,7 +824,7 @@ function download(type, id, source, name) {
*/ */
function primaryDragDelete() { function primaryDragDelete() {
compareData.value.unshift(primaryDragData.value[0]); compareData.value.unshift(primaryDragData.value[0]);
primaryDragData.value.length = 0; primaryDragData.value = [];
} }
/** /**
@@ -832,7 +832,7 @@ function primaryDragDelete() {
*/ */
function secondaryDragDelete() { function secondaryDragDelete() {
compareData.value.unshift(secondaryDragData.value[0]); compareData.value.unshift(secondaryDragData.value[0]);
secondaryDragData.value.length = 0; secondaryDragData.value = [];
} }
/** /**