mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
#4016 Fix for max_sections in mindmap renderer
This commit is contained in:
parent
e5b33087f3
commit
de8928b2d9
@ -203,7 +203,7 @@ const roundedRectBkg = function (elem, node) {
|
|||||||
* @returns {number} The height nodes dom element
|
* @returns {number} The height nodes dom element
|
||||||
*/
|
*/
|
||||||
export const drawNode = function (elem, node, fullSection, conf) {
|
export const drawNode = function (elem, node, fullSection, conf) {
|
||||||
const section = fullSection % MAX_SECTIONS;
|
const section = fullSection % (MAX_SECTIONS - 1);
|
||||||
const nodeElem = elem.append('g');
|
const nodeElem = elem.append('g');
|
||||||
node.section = section;
|
node.section = section;
|
||||||
nodeElem.attr(
|
nodeElem.attr(
|
||||||
@ -303,7 +303,7 @@ export const drawNode = function (elem, node, fullSection, conf) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, fullSection) {
|
export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, fullSection) {
|
||||||
const section = (fullSection % MAX_SECTIONS) - 1;
|
const section = fullSection % (MAX_SECTIONS - 1);
|
||||||
const sx = parent.x + parent.width / 2;
|
const sx = parent.x + parent.width / 2;
|
||||||
const sy = parent.y + parent.height / 2;
|
const sy = parent.y + parent.height / 2;
|
||||||
const ex = mindmap.x + mindmap.width / 2;
|
const ex = mindmap.x + mindmap.width / 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user