foreignObject works. labels work! Yeah!

This commit is contained in:
Raghu Rajagopalan
2016-04-02 18:59:12 +05:30
parent 5dcd3e6f35
commit 89307d3f13
3 changed files with 467 additions and 460 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -192,6 +192,7 @@ function resolveSVGElement(element) {
}
function resolveForeignObjects(element) {
return;
var children
, textElement
, textSpan

View File

@@ -145,7 +145,10 @@ function renderCommitHistory(svg, commitid, branches, direction) {
.text(commit.id);
var branch = _.find(branches, ["commit", commit]);
if (branch) {
svg.select("#node-" + commit.id + " foreignObject")
log.debug("found branch ", branch.name);
// don't try to select foreignObject - doesn't work.
// instead select by class name and it works.
svg.select("#node-" + commit.id + " .node-label")
.append("xhtml:p")
.attr("class", "branch-label")
.text(branch.name);