Skip to content

Commit 1fc466b

Browse files
committed
feat(client): uninstall ngx-vflow
1 parent e2d9f8b commit 1fc466b

File tree

3 files changed

+69
-29
lines changed

3 files changed

+69
-29
lines changed

libs/blog/roadmap/feature-roadmap/src/lib/feature-roadmap.component.html

+58-28
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,73 @@
1-
<svg #svg width="100%" height="100%" xmlns:svg="http://www.w3.org/1999/html">
2-
<svg:defs>
3-
<marker
4-
id="arrowhead"
5-
markerWidth="6"
6-
markerHeight="8"
7-
refX="0"
8-
refY="4"
9-
orient="auto"
10-
>
11-
<polygon points="0 0, 6 4, 0 8" fill="#FDF5FD" />
12-
</marker>
13-
</svg:defs>
14-
1+
<svg width="100%" height="100%" xmlns:svg="http://www.w3.org/1999/html">
152
<svg:foreignObject height="0" width="0" overflow="visible">
163
<div
17-
class="flex h-fit w-fit translate-x-80 translate-y-16 flex-col items-center gap-16"
4+
class="relative flex h-fit w-fit translate-x-80 translate-y-16 flex-col items-center gap-16"
185
>
196
@for (layer of roadmapLayers(); track layer.parentNode.id) {
20-
<div class="flex w-full flex-col items-center gap-12">
7+
<div #layerEl class="flex w-full flex-col items-center gap-16">
8+
@if (!$last) {
9+
@let layerHeightWithGap = layerEl.clientHeight + 64 - 24 || 0;
10+
<svg
11+
[attr.height]="layerHeightWithGap"
12+
style="position: absolute"
13+
overflow="visible"
14+
width="100"
15+
xmlns="http://www.w3.org/2000/svg"
16+
>
17+
<svg:defs>
18+
<marker
19+
id="arrowhead"
20+
markerWidth="6"
21+
markerHeight="8"
22+
refX="0"
23+
refY="4"
24+
orient="auto"
25+
>
26+
<polygon points="0 0, 6 4, 0 8" fill="#FDF5FD" />
27+
</marker>
28+
</svg:defs>
29+
<line
30+
[attr.y2]="layerHeightWithGap"
31+
x1="50"
32+
y1="0"
33+
x2="50"
34+
stroke="white"
35+
stroke-width="4"
36+
marker-end="url(#arrowhead)"
37+
/>
38+
</svg>
39+
}
40+
41+
<!-- layer parent node-->
2142
@if (layer.parentNode.nodeType === 'primary') {
2243
<al-ui-roadmap-primary-node [node]="layer.parentNode" />
2344
} @else if (layer.parentNode.nodeType === 'angular-love') {
2445
<al-ui-roadmap-angular-love-node
2546
[node]="layer.parentNode"
2647
></al-ui-roadmap-angular-love-node>
2748
}
49+
50+
<!-- layer child nodes-->
2851
@if (layer.childNodes?.length) {
29-
<div class="flex gap-12">
30-
@for (node of layer.childNodes | leftSlice; track node.id) {
31-
<div class="flex gap-10">
32-
@if (node.nodeType === 'secondary') {
33-
<al-ui-roadmap-secondary-node [node]="node" />
34-
} @else if (node.nodeType === 'cluster') {
35-
<al-ui-roadmap-cluster
36-
[cluster]="$any(node)"
37-
></al-ui-roadmap-cluster>
38-
}
39-
</div>
40-
}
52+
<div
53+
#allChildNodesEl
54+
class="translate-x-[{{
55+
allChildNodesEl.clientWidth - leftChildNodesEl.clientWidth
56+
}}px] flex gap-12"
57+
>
58+
<div #leftChildNodesEl class="flex gap-12">
59+
@for (node of layer.childNodes | leftSlice; track node.id) {
60+
<div class="flex gap-10">
61+
@if (node.nodeType === 'secondary') {
62+
<al-ui-roadmap-secondary-node [node]="node" />
63+
} @else if (node.nodeType === 'cluster') {
64+
<al-ui-roadmap-cluster
65+
[cluster]="$any(node)"
66+
></al-ui-roadmap-cluster>
67+
}
68+
</div>
69+
}
70+
</div>
4171
@for (node of layer.childNodes | rightSlice; track node.id) {
4272
<div class="flex gap-10">
4373
@if (node.nodeType === 'secondary') {

libs/blog/roadmap/feature-roadmap/src/lib/feature-roadmap.component.ts

+11
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,22 @@ export class FeatureRoadmapComponent {
6161
parentNodeId: '2',
6262
title: 'Change Detection',
6363
},
64+
{
65+
id: '9',
66+
parentNodeId: '2',
67+
previousNodeId: '4',
68+
title: 'Dynamic Components',
69+
},
6470
{
6571
id: '4',
6672
parentNodeId: '2',
6773
title: 'Styling',
6874
},
75+
{
76+
id: '11',
77+
parentNodeId: '2',
78+
title: 'Ble ble ble',
79+
},
6980
{
7081
id: '6',
7182
parentNodeId: '4',

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"hono": "^4.4.5",
5959
"lint-staged": "^15.0.2",
6060
"ngx-skeleton-loader": "^8.1.0",
61-
"ngx-vflow": "^1.4.2",
6261
"prettier-plugin-organize-attributes": "^1.0.0",
6362
"rxjs": "~7.8.1",
6463
"sanitize-html": "^2.13.0",

0 commit comments

Comments
 (0)