mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 21:39:40 +02:00
foreignObject works. labels work! Yeah!
This commit is contained in:
921
dist/www/javascripts/lib/mermaid.js
vendored
921
dist/www/javascripts/lib/mermaid.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -192,6 +192,7 @@ function resolveSVGElement(element) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveForeignObjects(element) {
|
function resolveForeignObjects(element) {
|
||||||
|
return;
|
||||||
var children
|
var children
|
||||||
, textElement
|
, textElement
|
||||||
, textSpan
|
, textSpan
|
||||||
|
@@ -145,7 +145,10 @@ function renderCommitHistory(svg, commitid, branches, direction) {
|
|||||||
.text(commit.id);
|
.text(commit.id);
|
||||||
var branch = _.find(branches, ["commit", commit]);
|
var branch = _.find(branches, ["commit", commit]);
|
||||||
if (branch) {
|
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")
|
.append("xhtml:p")
|
||||||
.attr("class", "branch-label")
|
.attr("class", "branch-label")
|
||||||
.text(branch.name);
|
.text(branch.name);
|
||||||
|
Reference in New Issue
Block a user