draggable
Browse files
content/d3_dependency_graph.html
CHANGED
|
@@ -1827,14 +1827,21 @@ const node = g.append('g')
|
|
| 1827 |
.on('end', dragended)
|
| 1828 |
);
|
| 1829 |
|
| 1830 |
-
// Base‑model icon (
|
| 1831 |
node.filter(d => d.is_base)
|
| 1832 |
-
.append('
|
| 1833 |
-
.attr('
|
| 1834 |
-
.attr('
|
| 1835 |
-
.attr('
|
| 1836 |
-
.attr('width',
|
| 1837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1838 |
|
| 1839 |
// Base‑model label (below icon)
|
| 1840 |
node.filter(d => d.is_base)
|
|
|
|
| 1827 |
.on('end', dragended)
|
| 1828 |
);
|
| 1829 |
|
| 1830 |
+
// Base‑model icon (styled circle instead of external image)
|
| 1831 |
node.filter(d => d.is_base)
|
| 1832 |
+
.append('circle')
|
| 1833 |
+
.attr('r', parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--base‑size')) / 2)
|
| 1834 |
+
.attr('fill', '#FFD21E')
|
| 1835 |
+
.attr('stroke', '#FF9D00')
|
| 1836 |
+
.attr('stroke-width', 3);
|
| 1837 |
+
|
| 1838 |
+
// Add 🤗 emoji as text for base models
|
| 1839 |
+
node.filter(d => d.is_base)
|
| 1840 |
+
.append('text')
|
| 1841 |
+
.attr('text-anchor', 'middle')
|
| 1842 |
+
.attr('dy', '0.35em')
|
| 1843 |
+
.style('font-size', '24px')
|
| 1844 |
+
.text('🤗');
|
| 1845 |
|
| 1846 |
// Base‑model label (below icon)
|
| 1847 |
node.filter(d => d.is_base)
|