Created
April 21, 2020 13:15
-
-
Save afrinc/b7a2de2184bafc941513d7a5c4403737 to your computer and use it in GitHub Desktop.
Appending image inside rectangular node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const images = g | |
.append("svg:image") | |
.attr( | |
"xlink:href", | |
"https://img.icons8.com/ios-glyphs/30/000000/superman.png" | |
) | |
.attr("x", function(d) { | |
let X = outerNodebbox.x; | |
return X + 10; | |
}) | |
.attr("y", function(d) { | |
let Y = outerNodebbox.y; | |
let HEIGHT = outerNodebbox.height; | |
return Y + HEIGHT / 3 ; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment