mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Add export default to diagram files
This commit is contained in:
parent
2a0bc3b2e8
commit
4fc082b526
@ -362,3 +362,8 @@ export const draw = function (text, id) {
|
||||
diagram.attr('width', '100%')
|
||||
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 () {
|
||||
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('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
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
setConf,
|
||||
draw
|
||||
}
|
||||
|
@ -272,3 +272,8 @@ export const draw = function (txt, id, ver) {
|
||||
logger.error(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
setConf,
|
||||
draw
|
||||
}
|
||||
|
@ -501,3 +501,10 @@ export const draw = function (text, id) {
|
||||
var extraVertForTitle = title ? 40 : 0
|
||||
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)
|
||||
}
|
||||
})()
|
||||
|
||||
export default {
|
||||
drawRect,
|
||||
drawText,
|
||||
drawLabel,
|
||||
drawActor,
|
||||
anchorElement,
|
||||
drawActivation,
|
||||
drawLoop,
|
||||
insertArrowHead,
|
||||
insertArrowCrossHead,
|
||||
getTextObj,
|
||||
getNoteRect
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user