More padding to fix cutoff issue

This commit is contained in:
Tyler Long 2018-03-20 23:04:01 +08:00
parent 03f9264394
commit f8da3c2e48
3 changed files with 31 additions and 8 deletions

25
dist/index.html vendored
View File

@ -8,7 +8,7 @@
</head>
<body>
<div class="mermaid">
graph TD
graph TD
A-->B
A-->C
A-->Z
@ -17,6 +17,29 @@
Z-->Y
Y-->A
</div>
<div class="mermaid">
graph LR
47(SAM.CommonFA.FMESummary)-->48(SAM.CommonFA.CommonFAFinanceBudget)
37(SAM.CommonFA.BudgetSubserviceLineVolume)-->48(SAM.CommonFA.CommonFAFinanceBudget)
35(SAM.CommonFA.PopulationFME)-->47(SAM.CommonFA.FMESummary)
41(SAM.CommonFA.MetricCost)-->47(SAM.CommonFA.FMESummary)
44(SAM.CommonFA.MetricOutliers)-->47(SAM.CommonFA.FMESummary)
46(SAM.CommonFA.MetricOpportunity)-->47(SAM.CommonFA.FMESummary)
40(SAM.CommonFA.OPVisits)-->47(SAM.CommonFA.FMESummary)
38(SAM.CommonFA.CommonFAFinanceRefund)-->47(SAM.CommonFA.FMESummary)
43(SAM.CommonFA.CommonFAFinancePicuDays)-->47(SAM.CommonFA.FMESummary)
42(SAM.CommonFA.CommonFAFinanceNurseryDays)-->47(SAM.CommonFA.FMESummary)
45(SAM.CommonFA.MetricPreOpportunity)-->46(SAM.CommonFA.MetricOpportunity)
35(SAM.CommonFA.PopulationFME)-->45(SAM.CommonFA.MetricPreOpportunity)
41(SAM.CommonFA.MetricCost)-->45(SAM.CommonFA.MetricPreOpportunity)
41(SAM.CommonFA.MetricCost)-->44(SAM.CommonFA.MetricOutliers)
39(SAM.CommonFA.ChargeDetails)-->43(SAM.CommonFA.CommonFAFinancePicuDays)
39(SAM.CommonFA.ChargeDetails)-->42(SAM.CommonFA.CommonFAFinanceNurseryDays)
39(SAM.CommonFA.ChargeDetails)-->41(SAM.CommonFA.MetricCost)
39(SAM.CommonFA.ChargeDetails)-->40(SAM.CommonFA.OPVisits)
35(SAM.CommonFA.PopulationFME)-->39(SAM.CommonFA.ChargeDetails)
36(SAM.CommonFA.PremetricCost)-->39(SAM.CommonFA.ChargeDetails)
</div>
<div class="mermaid">
graph TD
9e122290_1ec3_e711_8c5a_005056ad0002("fa:fa-creative-commons My System | Test Environment")

View File

@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "8.0.0-rc.4",
"version": "8.0.0-rc.5",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.core.js",
"keywords": [

View File

@ -409,19 +409,19 @@ export const draw = function (text, id) {
// Center the graph
svg.attr('height', '100%')
svg.attr('width', conf.width)
svg.attr('viewBox', '0 0 ' + (g.graph().width + 40) + ' ' + (g.graph().height + 40))
svg.attr('style', 'max-width:' + (g.graph().width + 40) + 'px;')
svg.attr('viewBox', '0 0 ' + (g.graph().width + 64) + ' ' + (g.graph().height + 64))
svg.attr('style', 'max-width:' + (g.graph().width + 64) + 'px;')
} else {
// Center the graph
svg.attr('height', g.graph().height)
svg.attr('height', g.graph().height + 64)
if (typeof conf.width === 'undefined') {
svg.attr('width', g.graph().width)
svg.attr('width', g.graph().width + 64)
} else {
svg.attr('width', conf.width)
}
svg.attr('viewBox', '0 0 ' + (g.graph().width + 40) + ' ' + (g.graph().height + 40))
svg.attr('viewBox', '0 0 ' + (g.graph().width + 64) + ' ' + (g.graph().height + 64))
}
svg.select('g').attr('transform', 'translate(20, 20)')
svg.select('g').attr('transform', 'translate(32, 32)')
// Index nodes
flowDb.indexNodes('subGraph' + i)