mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 02:44:17 +01:00 
			
		
		
		
	MC-1730 Fix for subroutine shape
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@mermaid-chart/mermaid", | ||||
|   "version": "11.0.0-b.58", | ||||
|   "version": "11.0.0-b.59", | ||||
|   "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", | ||||
|   "type": "module", | ||||
|   "module": "./dist/mermaid.core.mjs", | ||||
|   | ||||
| @@ -65,6 +65,7 @@ export const subroutine = async (parent: SVGAElement, node: Node) => { | ||||
|   ]; | ||||
|  | ||||
|   if (node.look === 'handdrawn' || (node.look === 'neo' && !useGradient)) { | ||||
|     console.log('OXE points 1', points); | ||||
|     // @ts-ignore - rough is not typed | ||||
|     const rc = rough.svg(shapeSvg); | ||||
|     const options = userNodeOverrides(node, {}); | ||||
| @@ -72,8 +73,6 @@ export const subroutine = async (parent: SVGAElement, node: Node) => { | ||||
|     if (node.look === 'neo') { | ||||
|       options.roughness = 0; | ||||
|       options.fillStyle = 'solid'; | ||||
|       // options.stroke = 'none'; | ||||
|       // options.strokeWidth = 0 | ||||
|     } | ||||
|  | ||||
|     const roughNode = rc.rectangle(x - 8, y, w + 16, h, options); | ||||
| @@ -87,7 +86,9 @@ export const subroutine = async (parent: SVGAElement, node: Node) => { | ||||
|     let rect = shapeSvg.insert(() => roughNode, ':first-child'); | ||||
|     const { cssStyles } = node; | ||||
|     rect.attr('class', 'basic label-container').attr('style', cssStyles); | ||||
|     updateNodeBounds(node, rect); | ||||
|   } else { | ||||
|     console.log('OXE points 2', points); | ||||
|     const el = insertPolygonShape(shapeSvg, w, h, points); | ||||
|     if (nodeStyles) { | ||||
|       el.attr('style', nodeStyles); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Knut Sveidqvist
					Knut Sveidqvist