Skip to content

Commit adbbbfb

Browse files
committed
feat(logic_diagram): enhance visual representation of input/output ports
- Updated color schemes for input and output ports based on dark mode settings, improving visual clarity. - Changed port shapes from ellipses to boxes for better differentiation and added border colors for enhanced styling. - These modifications improve the overall usability and aesthetics of the Logic Diagram Module in the Autoware System Designer.
1 parent 09e6c4a commit adbbbfb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • autoware_system_designer/autoware_system_designer/visualization/js

autoware_system_designer/autoware_system_designer/visualization/js/logic_diagram.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ class LogicDiagramModule extends DiagramBase {
117117
"--text-primary",
118118
isDark ? "#e9ecef" : "#333333",
119119
),
120-
input: isDark ? "#004085" : "#e0f7ff",
121-
output: isDark ? "#856404" : "#fff4e0",
120+
input: isDark ? "#1e5228" : "#d4edda",
121+
inputBorder: isDark ? "#1e5228" : "#28a745",
122+
output: isDark ? "#7d4500" : "#ffe8cc",
123+
outputBorder: isDark ? "#7d4500" : "#fd7e14",
122124
cloud: this.getComputedStyleValue(
123125
"--border-hover",
124126
isDark ? "#adb5bd" : "gray",
@@ -190,7 +192,7 @@ class LogicDiagramModule extends DiagramBase {
190192
? port.event.frequency
191193
: "unknown";
192194
dotLines.push(
193-
`\t\t${port.unique_id} [label="input/${port.name}\\n#${eventType}\\n@${eventFreq}", shape=ellipse, fillcolor="${colors.input}", fontcolor="${colors.text}"];`,
195+
`\t\t${port.unique_id} [label="input/${port.name}\\n#${eventType}\\n@${eventFreq}", shape=box, style="filled", fillcolor="${colors.input}", color="${colors.inputBorder}", penwidth=2, fontcolor="${colors.text}"];`,
194196
);
195197
}
196198
});
@@ -201,7 +203,7 @@ class LogicDiagramModule extends DiagramBase {
201203
instance.out_ports.forEach((port) => {
202204
if (port && port.unique_id && port.name) {
203205
dotLines.push(
204-
`\t\t${port.unique_id} [label="output/${port.name}", shape=ellipse, fillcolor="${colors.output}", fontcolor="${colors.text}"];`,
206+
`\t\t${port.unique_id} [label="output/${port.name}", shape=box, style="filled", fillcolor="${colors.output}", color="${colors.outputBorder}", penwidth=2, fontcolor="${colors.text}"];`,
205207
);
206208
}
207209
});

0 commit comments

Comments
 (0)