|
92 | 92 | } |
93 | 93 |
|
94 | 94 | #visual-output.error { |
95 | | - background: var(--error-color); |
| 95 | + box-shadow: 0 0 0 .25rem var(--error-color) inset; |
96 | 96 | } |
97 | 97 |
|
98 | 98 | #visual-output.dark { |
|
263 | 263 | return; |
264 | 264 | } |
265 | 265 |
|
| 266 | + visualOutput.classList.remove('error'); |
266 | 267 | visualOutput.classList.add('loading'); |
267 | 268 | fetch('https://kroki.io/mermaid/svg', { |
268 | 269 | method: 'POST', |
|
272 | 273 | .then(response => response.text()) |
273 | 274 | .then(svgMarkup => { |
274 | 275 | diagramWrapper.innerHTML = svgMarkup; |
275 | | - updateDiagramAppearance(); |
276 | | - diagramWrapper.classList.remove('error'); |
277 | 276 | resetView(); |
278 | 277 | }) |
279 | 278 | .catch(error => { |
280 | 279 | console.error(error); |
281 | | - diagramWrapper.classList.add('error'); |
| 280 | + visualOutput.classList.add('error'); |
282 | 281 | diagramWrapper.innerHTML = ''; |
283 | 282 | }) |
| 283 | + .then(() => { |
| 284 | + updateDiagramAppearance(); |
| 285 | + }) |
284 | 286 | .finally(() => { |
285 | 287 | visualOutput.classList.remove('loading'); |
286 | 288 | }); |
|
360 | 362 | 000D : 2008 : 00 : FFFE : FFFC : 00000000000000000000000000000000 |
361 | 363 | [semi 0x2008] Report a bug on GitHub or Discord (Attach the BHAV code you've pasted into the tool) |
362 | 364 |
|
363 | | - 000E : 0002 : 00 : FFFD : 000E : 00000000000000000000000000000000 |
| 365 | + 000E : 0002 : 00 : FFFD : 000F : 00000000000000000000000000000000 |
364 | 366 | [prim 0x0002] Expression (Do you know what the colors of lines with arrows mean?) |
365 | 367 |
|
366 | 368 | 000F : 1003 : 00 : 0010 : 0010 : 00000000000000000000000000000000 |
|
720 | 722 |
|
721 | 723 | let blocksWithIncomingTransitions = blocks |
722 | 724 | .flatMap(block => block.outgoingTransitions |
| 725 | + .filter(transition => block != transition.endBlock) |
723 | 726 | .map(transition => transition.endBlock) |
724 | 727 | ); |
725 | 728 |
|
|
877 | 880 | static #getBlockCode(block, indentSize = 0) { |
878 | 881 | let indent = this.#getIndent(indentSize); |
879 | 882 | if (block.isSpecial === true) { |
880 | | - return `${indent}${block.id}[${block.name}]` |
| 883 | + return `${indent}${block.id}{{${block.name}}}` |
881 | 884 | + `\r\n${indent}class ${block.id} specialBlock` |
882 | 885 | + `\r\n${indent}class ${block.id} ${block.type}` |
883 | 886 | + '\r\n\r\n'; |
884 | 887 | } |
885 | 888 |
|
886 | 889 | let instanceEmoji = this.#instanceEmojiMap[block.instance] ?? ''; |
887 | 890 |
|
888 | | - return `${indent}${block.id}["${toHex(block.id)} [${block.type} ${toHex(block.instance, 4)}]` |
| 891 | + return `${indent}${block.id}("${toHex(block.id)} [${block.type} ${toHex(block.instance, 4)}]` |
889 | 892 | + `<br>${instanceEmoji} <b>${block.name}<\/b>` |
890 | | - + `<br>${block.description}"]` |
| 893 | + + `<br>${block.description}")` |
891 | 894 | + `\r\n${indent}class ${block.id} ${block.type}` |
892 | 895 | + '\r\n\r\n'; |
893 | 896 | } |
|
0 commit comments