mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-17 03:04:07 +01:00
Add export default to diagram files
This commit is contained in:
@@ -362,3 +362,8 @@ export const draw = function (text, id) {
|
|||||||
diagram.attr('width', '100%')
|
diagram.attr('width', '100%')
|
||||||
diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20))
|
diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setConf,
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,3 +19,10 @@ export const setInfo = function (inf) {
|
|||||||
export const getInfo = function () {
|
export const getInfo = function () {
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setMessage,
|
||||||
|
getMessage,
|
||||||
|
setInfo,
|
||||||
|
getInfo
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,3 +33,7 @@ export const draw = function (txt, id, ver) {
|
|||||||
svg.attr('height', 100)
|
svg.attr('height', 100)
|
||||||
svg.attr('width', 400)
|
svg.attr('width', 400)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -501,3 +501,11 @@ export const draw = function (text, id, isDot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setConf,
|
||||||
|
addVertices,
|
||||||
|
addEdges,
|
||||||
|
getClasses,
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -401,3 +401,8 @@ export const draw = function (text, id) {
|
|||||||
return getCounts(arr)[word] || 0
|
return getCounts(arr)[word] || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setConf,
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -272,3 +272,8 @@ export const draw = function (txt, id, ver) {
|
|||||||
logger.error(e.message)
|
logger.error(e.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setConf,
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -501,3 +501,10 @@ export const draw = function (text, id) {
|
|||||||
var extraVertForTitle = title ? 40 : 0
|
var extraVertForTitle = title ? 40 : 0
|
||||||
diagram.attr('viewBox', (box.startx - conf.diagramMarginX) + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle))
|
diagram.attr('viewBox', (box.startx - conf.diagramMarginX) + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
bounds,
|
||||||
|
drawActors,
|
||||||
|
setConf,
|
||||||
|
draw
|
||||||
|
}
|
||||||
|
|||||||
@@ -314,3 +314,17 @@ var _drawTextCandidateFunc = (function () {
|
|||||||
conf.textPlacement === 'old' ? byText : byTspan)
|
conf.textPlacement === 'old' ? byText : byTspan)
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
export default {
|
||||||
|
drawRect,
|
||||||
|
drawText,
|
||||||
|
drawLabel,
|
||||||
|
drawActor,
|
||||||
|
anchorElement,
|
||||||
|
drawActivation,
|
||||||
|
drawLoop,
|
||||||
|
insertArrowHead,
|
||||||
|
insertArrowCrossHead,
|
||||||
|
getTextObj,
|
||||||
|
getNoteRect
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user