Comparing version 8.0.0-alpha.8 to 8.0.0-alpha.9
{ | ||
"name": "mermaid", | ||
"version": "8.0.0-alpha.8", | ||
"version": "8.0.0-alpha.9", | ||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", | ||
@@ -5,0 +5,0 @@ "main": "dist/mermaid.core.js", |
@@ -218,14 +218,3 @@ import graphlib from 'graphlibrary' | ||
parser.parse(text) | ||
const classes = flowDb.getClasses() | ||
// Add default class if undefined | ||
if (typeof (classes.default) === 'undefined') { | ||
classes.default = { id: 'default' } | ||
classes.default.styles = [] | ||
classes.default.clusterStyles = ['rx:4px', 'fill: rgb(255, 255, 222)', 'rx: 4px', 'stroke: rgb(170, 170, 51)', 'stroke-width: 1px'] | ||
classes.default.nodeLabelStyles = ['fill:#000', 'stroke:none', 'font-weight:300', 'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf', 'font-size:14px'] | ||
classes.default.edgeLabelStyles = ['fill:#000', 'stroke:none', 'font-weight:300', 'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf', 'font-size:14px'] | ||
} | ||
return classes | ||
return flowDb.getClasses() | ||
} | ||
@@ -232,0 +221,0 @@ |
@@ -95,3 +95,2 @@ /** | ||
txt = he.decode(txt).trim().replace(/<br>/ig, '<br/>') | ||
console.log(txt) | ||
@@ -98,0 +97,0 @@ mermaidAPI.render(id, txt, (svgCode, bindFunctions) => { |
@@ -383,4 +383,13 @@ /** | ||
// classDef | ||
let style = themes[config.theme] || themes.default | ||
if (graphType === 'flowchart') { | ||
const classes = flowRenderer.getClasses(txt) | ||
for (const className in classes) { | ||
style += `\n.${className} > * { ${classes[className].styles.join(' !important; ')} !important; }` | ||
} | ||
} | ||
const style1 = document.createElement('style') | ||
style1.innerHTML = scope(themes[config.theme] || themes.default, `#${id}`) | ||
style1.innerHTML = scope(style, `#${id}`) | ||
svg.insertBefore(style1, firstChild) | ||
@@ -387,0 +396,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11122644
84658