mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	Change ERD fontSize config to an integer to prevent NaN errors
This commit is contained in:
		@@ -45,10 +45,13 @@ const drawEntities = function(svgNode, entities, graph) {
 | 
			
		||||
      .append('text')
 | 
			
		||||
      .attr('id', textId)
 | 
			
		||||
      .attr('x', 0)
 | 
			
		||||
      .attr('y', (conf.fontSize + 2 * conf.entityPadding) / 2)
 | 
			
		||||
      .attr('y', 0)
 | 
			
		||||
      .attr('dominant-baseline', 'middle')
 | 
			
		||||
      .attr('text-anchor', 'middle')
 | 
			
		||||
      .attr('style', 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize)
 | 
			
		||||
      .attr(
 | 
			
		||||
        'style',
 | 
			
		||||
        'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'
 | 
			
		||||
      )
 | 
			
		||||
      .text(id);
 | 
			
		||||
 | 
			
		||||
    // Calculate the width and height of the entity
 | 
			
		||||
@@ -227,7 +230,10 @@ const drawRelationshipFromLayout = function(svg, rel, g, insert) {
 | 
			
		||||
    .attr('y', labelPoint.y)
 | 
			
		||||
    .attr('text-anchor', 'middle')
 | 
			
		||||
    .attr('dominant-baseline', 'middle')
 | 
			
		||||
    .attr('style', 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize)
 | 
			
		||||
    .attr(
 | 
			
		||||
      'style',
 | 
			
		||||
      'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'
 | 
			
		||||
    )
 | 
			
		||||
    .text(rel.roleA);
 | 
			
		||||
 | 
			
		||||
  // Figure out how big the opaque 'container' rectangle needs to be
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user