mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 08:50:13 +02:00
Merge branch 'release/8.4.1'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as d3 from 'd3';
|
||||
import dagre from 'dagre-layout';
|
||||
import graphlib from 'graphlibrary';
|
||||
import dagre from 'dagre';
|
||||
import graphlib from 'graphlib';
|
||||
import { logger } from '../../logger';
|
||||
import classDb from './classDb';
|
||||
import utils from '../../utils';
|
||||
@@ -204,14 +204,12 @@ const drawEdge = function(elem, path, relation) {
|
||||
x = labalPosition.x;
|
||||
y = labalPosition.y;
|
||||
|
||||
let p1_card_x,
|
||||
p1_card_y,
|
||||
p1_card_padd_x = conf.padding * 2,
|
||||
p1_card_padd_y = conf.padding;
|
||||
let p2_card_x,
|
||||
p2_card_y,
|
||||
p2_card_padd_x = conf.padding * 2,
|
||||
p2_card_padd_y = -conf.padding / 2;
|
||||
let p1_card_x, p1_card_y;
|
||||
// p1_card_padd_x = conf.padding * 2,
|
||||
// p1_card_padd_y = conf.padding;
|
||||
let p2_card_x, p2_card_y;
|
||||
// p2_card_padd_x = conf.padding * 2,
|
||||
// p2_card_padd_y = -conf.padding / 2;
|
||||
if (l % 2 !== 0 && l > 1) {
|
||||
let cardinality_1_point = utils.calcCardinalityPosition(
|
||||
relation.relation.type1 !== 'none',
|
||||
@@ -258,8 +256,7 @@ const drawEdge = function(elem, path, relation) {
|
||||
logger.info('Rendering relation ' + JSON.stringify(relation));
|
||||
if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {
|
||||
const g = elem.append('g').attr('class', 'cardinality');
|
||||
const label = g
|
||||
.append('text')
|
||||
g.append('text')
|
||||
.attr('class', 'type1')
|
||||
.attr('x', p1_card_x)
|
||||
.attr('y', p1_card_y)
|
||||
@@ -269,8 +266,7 @@ const drawEdge = function(elem, path, relation) {
|
||||
}
|
||||
if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {
|
||||
const g = elem.append('g').attr('class', 'cardinality');
|
||||
const label = g
|
||||
.append('text')
|
||||
g.append('text')
|
||||
.attr('class', 'type2')
|
||||
.attr('x', p2_card_x)
|
||||
.attr('y', p2_card_y)
|
||||
@@ -323,8 +319,6 @@ const drawClass = function(elem, classDef) {
|
||||
isFirst = false;
|
||||
});
|
||||
|
||||
console.warn('classDef.id', classDef.id);
|
||||
console.warn('isFirst', isFirst);
|
||||
// add class title
|
||||
const classTitle = title
|
||||
.append('tspan')
|
||||
@@ -348,7 +342,6 @@ const drawClass = function(elem, classDef) {
|
||||
.attr('y', titleHeight + conf.dividerMargin + conf.textHeight)
|
||||
.attr('fill', 'white')
|
||||
.attr('class', 'classText');
|
||||
console.warn(classDef.id, titleHeight, conf.dividerMargin, conf.textHeight);
|
||||
|
||||
isFirst = true;
|
||||
classDef.members.forEach(function(member) {
|
||||
|
@@ -163,7 +163,7 @@ members
|
||||
methodStatement
|
||||
: className {/*console.log('Rel found',$1);*/}
|
||||
| className LABEL {yy.addMember($1,yy.cleanupLabel($2));}
|
||||
| MEMBER {console.warn('Member',$1);}
|
||||
| MEMBER {/*console.warn('Member',$1);*/}
|
||||
| SEPARATOR {/*console.log('sep found',$1);*/}
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user