Add export default to diagram files

This commit is contained in:
Tyler Long 2017-09-10 22:03:10 +08:00
parent 2a0bc3b2e8
commit 4fc082b526
8 changed files with 55 additions and 0 deletions

View File

@ -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
}

View File

@ -19,3 +19,10 @@ export const setInfo = function (inf) {
export const getInfo = function () {
return info
}
export default {
setMessage,
getMessage,
setInfo,
getInfo
}

View File

@ -33,3 +33,7 @@ export const draw = function (txt, id, ver) {
svg.attr('height', 100)
svg.attr('width', 400)
}
export default {
draw
}

View File

@ -501,3 +501,11 @@ export const draw = function (text, id, isDot) {
}
}
}
export default {
setConf,
addVertices,
addEdges,
getClasses,
draw
}

View File

@ -401,3 +401,8 @@ export const draw = function (text, id) {
return getCounts(arr)[word] || 0
}
}
export default {
setConf,
draw
}

View File

@ -272,3 +272,8 @@ export const draw = function (txt, id, ver) {
logger.error(e.message)
}
}
export default {
setConf,
draw
}

View File

@ -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
}

View File

@ -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
}