ngx-relationship-visualiser 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1876,53 +1876,26 @@ class VisualiserGraphService {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
1878
|
nodeEnter
|
|
1879
|
-
.
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return true;
|
|
1884
|
-
})
|
|
1885
|
-
.append('image')
|
|
1886
|
-
.attr('xlink:href', function (d) {
|
|
1887
|
-
return d.imageUrl;
|
|
1888
|
-
})
|
|
1879
|
+
.selectAll('image.node-image')
|
|
1880
|
+
.data((d) => d.imageUrl ? [d] : [])
|
|
1881
|
+
.join('image')
|
|
1882
|
+
.attr('xlink:href', (d) => d.imageUrl)
|
|
1889
1883
|
.attr('x', -15)
|
|
1890
1884
|
.attr('y', -60)
|
|
1891
|
-
.attr('class',
|
|
1892
|
-
|
|
1893
|
-
const id = d.id ? d.id : '';
|
|
1894
|
-
return `${id}_${suffix}`;
|
|
1895
|
-
})
|
|
1896
|
-
.attr('id', function (d) {
|
|
1897
|
-
const id = d.id ? d.id : '';
|
|
1898
|
-
return `${id}`;
|
|
1899
|
-
})
|
|
1885
|
+
.attr('class', 'image node-image')
|
|
1886
|
+
.attr('id', (d) => d.id)
|
|
1900
1887
|
.attr('width', 32)
|
|
1901
1888
|
.attr('height', 32)
|
|
1902
|
-
.attr('class', 'image')
|
|
1903
1889
|
.style('cursor', 'pointer');
|
|
1904
1890
|
nodeEnter
|
|
1905
|
-
.
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
return true;
|
|
1910
|
-
})
|
|
1911
|
-
.append('text')
|
|
1912
|
-
.text(function (d) {
|
|
1913
|
-
return d.icon;
|
|
1914
|
-
})
|
|
1891
|
+
.selectAll('text.node-icon')
|
|
1892
|
+
.data((d) => d.icon ? [d] : [])
|
|
1893
|
+
.join('text')
|
|
1894
|
+
.text((d) => d.icon)
|
|
1915
1895
|
.attr('x', -18)
|
|
1916
1896
|
.attr('y', -30)
|
|
1917
|
-
.attr('class',
|
|
1918
|
-
|
|
1919
|
-
const id = d.id ? d.id : '';
|
|
1920
|
-
return `${id}_${suffix} fa`;
|
|
1921
|
-
})
|
|
1922
|
-
.attr('id', function (d) {
|
|
1923
|
-
const id = d.id ? d.id : '';
|
|
1924
|
-
return `${id}`;
|
|
1925
|
-
})
|
|
1897
|
+
.attr('class', (d) => `${d.id}_icon fa node-icon`)
|
|
1898
|
+
.attr('id', (d) => d.id)
|
|
1926
1899
|
.style('font-size', '35px')
|
|
1927
1900
|
.style('cursor', 'pointer');
|
|
1928
1901
|
const nodeText = nodeEnter
|
|
@@ -1951,27 +1924,17 @@ class VisualiserGraphService {
|
|
|
1951
1924
|
.attr('dx', 10)
|
|
1952
1925
|
.attr('dy', 15);
|
|
1953
1926
|
nodeEnter
|
|
1954
|
-
.
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
}
|
|
1958
|
-
return true;
|
|
1959
|
-
})
|
|
1960
|
-
.append('text')
|
|
1961
|
-
.attr('id', function (d) {
|
|
1962
|
-
const suffix = 'additionalIcon';
|
|
1963
|
-
const id = d.id ? d.id : '';
|
|
1964
|
-
return `${id}_${suffix}`;
|
|
1965
|
-
})
|
|
1927
|
+
.selectAll('text.additional-icon')
|
|
1928
|
+
.data((d) => d.additionalIcon ? [d] : [])
|
|
1929
|
+
.join('text')
|
|
1930
|
+
.attr('id', (d) => `${d.id}_additionalIcon`)
|
|
1966
1931
|
.attr('width', 100)
|
|
1967
1932
|
.attr('height', 25)
|
|
1968
1933
|
.attr('x', 30)
|
|
1969
1934
|
.attr('y', -50)
|
|
1970
|
-
.attr('class', 'fa')
|
|
1935
|
+
.attr('class', 'fa additional-icon')
|
|
1971
1936
|
.style('fill', '#856404')
|
|
1972
|
-
.text(
|
|
1973
|
-
return d.additionalIcon;
|
|
1974
|
-
});
|
|
1937
|
+
.text((d) => d.additionalIcon);
|
|
1975
1938
|
// transition effects for new pulsating nodes
|
|
1976
1939
|
nodeEnter
|
|
1977
1940
|
.filter(function (d) {
|