mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fixed title bounds calculation, removed extra title from merging issues
This commit is contained in:
parent
5e966d60b0
commit
55fac29b3e
@ -866,8 +866,6 @@ export const draw = async function (text, id, _version, diagObj) {
|
||||
const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;
|
||||
|
||||
const svg = root.select(`[id="${id}"]`);
|
||||
|
||||
utils.insertTitle(svg, 'flowchartTitleText', conf.titleTopMargin, diagObj.db.getDiagramTitle());
|
||||
// Define the supported markers for the diagram
|
||||
const markers = ['point', 'circle', 'cross'];
|
||||
|
||||
|
@ -829,7 +829,7 @@ export const insertTitle = (
|
||||
parent
|
||||
.append('text')
|
||||
.text(title)
|
||||
.attr('x', '50%')
|
||||
.attr('x', bounds.x + bounds.width / 2)
|
||||
.attr('y', -titleTopMargin)
|
||||
.attr('class', cssClass);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user