mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-02-04 07:13:25 +08:00
#900 Handling ids starting with a number and styling for other nodes as well
This commit is contained in:
parent
a35892da4f
commit
4eda2aa36d
@ -28,6 +28,11 @@
|
|||||||
end
|
end
|
||||||
style test fill:#F99,stroke-width:2px,stroke:#F0F
|
style test fill:#F99,stroke-width:2px,stroke:#F0F
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mermaid">
|
||||||
|
graph TD
|
||||||
|
9e122290-->82072290_1ec3_e711_8c5a_005056ad0002
|
||||||
|
style 9e122290 fill:#F99,stroke-width:2px,stroke:#F0F
|
||||||
|
</div>
|
||||||
<script src="./mermaid.js"></script>
|
<script src="./mermaid.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function showFullFirstSquad(elemName) {
|
function showFullFirstSquad(elemName) {
|
||||||
|
@ -88,8 +88,13 @@ export const addVertex = function (_id, text, type, style, classes) {
|
|||||||
* @param type
|
* @param type
|
||||||
* @param linktext
|
* @param linktext
|
||||||
*/
|
*/
|
||||||
export const addLink = function (start, end, type, linktext) {
|
export const addLink = function (_start, _end, type, linktext) {
|
||||||
|
let start = _start
|
||||||
|
let end = _end
|
||||||
|
if (start[0].match(/\d/)) start = 's' + start
|
||||||
|
if (end[0].match(/\d/)) end = 's' + end
|
||||||
logger.info('Got edge...', start, end)
|
logger.info('Got edge...', start, end)
|
||||||
|
|
||||||
const edge = { start: start, end: end, type: undefined, text: '' }
|
const edge = { start: start, end: end, type: undefined, text: '' }
|
||||||
linktext = type.text
|
linktext = type.text
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user