feat: add layer icons

This commit is contained in:
Fine 2024-01-13 10:55:10 +08:00
parent 57535ce3d9
commit ff8eda41d9
19 changed files with 4 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
src/assets/img/tools/MQ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View File

@ -32,7 +32,7 @@ limitations under the License. -->
height="12" height="12"
:x="n.x - 6" :x="n.x - 6"
:y="n.y - 38" :y="n.y - 38"
:href="!n.type || n.type === `N/A` ? icons.UNDEFINED : icons[n.type.toUpperCase().replace('-', '')]" :href="!n.layer || n.layer === `N/A` ? icons.MESH : icons[n.layer.toUpperCase().replace('-', '')]"
/> />
<text <text
class="node-text" class="node-text"
@ -112,10 +112,11 @@ limitations under the License. -->
const graph = ref<Nullable<any>>(null); const graph = ref<Nullable<any>>(null);
const topologyLayout = ref<any>({}); const topologyLayout = ref<any>({});
const graphWidth = ref<number>(100); const graphWidth = ref<number>(100);
const graphHeight = ref<number>(100);
const currentNode = ref<Nullable<Node>>(null); const currentNode = ref<Nullable<Node>>(null);
const diff = computed(() => [ const diff = computed(() => [
(width.value - graphWidth.value - 160) / 2, (width.value - graphWidth.value - 160) / 2,
(height.value - topologyLayout.value.layout.height - 60) / 2, (height.value - graphHeight.value - 60) / 2,
]); ]);
const radius = 10; const radius = 10;
@ -137,6 +138,7 @@ limitations under the License. -->
const levels = computeHierarchyLevels(props.nodes); const levels = computeHierarchyLevels(props.nodes);
topologyLayout.value = hierarchy(levels, props.calls, radius); topologyLayout.value = hierarchy(levels, props.calls, radius);
graphWidth.value = topologyLayout.value.layout.width; graphWidth.value = topologyLayout.value.layout.width;
graphHeight.value = topologyLayout.value.layout.height;
const drag: any = d3.drag().on("drag", (d: { x: number; y: number }) => { const drag: any = d3.drag().on("drag", (d: { x: number; y: number }) => {
topologyLayout.value.calls = changeNode(d, currentNode.value, topologyLayout.value, radius); topologyLayout.value.calls = changeNode(d, currentNode.value, topologyLayout.value, radius);
}); });