Comments (5)
Same for me in 1.27.2
from yuml-diagram.
Came here to ask the same thing. Sequence diagrams don't seem to have arrows.
from yuml-diagram.
I don't have issues with the direction arrows, both with dark mode and light mode when generating SVG with the node API. However, if I try to add SVG elements in the same DOM using both modes, the latter one's arrows are not displayed.
const yuml_diagram = require("yuml-diagram");
const sequence_diagram = `
// {type:sequence}
[:Computer]sendUnsentEmail>[:Server]
[:Computer]newEmail>[:Server]
[:Server]reponse.>[:Computer]
[:Computer]downloadEmail>[:Server]
[:Computer]deleteOldEmail>[:Server]
`;
var yuml = new yuml_diagram();
var svgLightBg = yuml.processYumlDocument(sequence_diagram, false);
var svgDarkBg = yuml.processYumlDocument(sequence_diagram, true);
console.log(`<body bgcolor="#000">${svgLightBg}${svgDarkBg}</body>`);
On this example, we can see that the black arrows (which should be used for the "light mode") are used for both SVGs. I think it comes from the fact the same ID attributes are used for both theme and no sandboxing is made by the rendering engine.
yuml-diagram/src/svg-builder.js
Lines 108 to 117 in d0dc8fb
This explains why some users rapport missing arrows on the related VSCode extension as both light mode and dark mode SVG are added to the DOM; users with a dark theme won't be able to see the arrows because of the ID name clash.
To fix this issue, either we need to specify that mixing light and dark mode is not supported, either we need to somehow namespace the ID attributes to avoid the name clash.
from yuml-diagram.
Thanks that does seems to be the root cause and means I have a workaround.
Repo of bug:
Create a .MD file in VS Code, set theme to dark. Use this diagram (removing the . ). Then preview the file
. ```yuml
// {type: sequence}
[Patron]order food>[Waiter]
[Waiter]serve wine.>[Patron]
[Patron]pay bill>>[Waiter]
. ```
Workaround:
Set VS Code theme to light
from yuml-diagram.
Please let me know if the issue has gone.
from yuml-diagram.
Related Issues (20)
- auto add examples that work HOT 1
- Improve extensibility & change `processYumlDocument` HOT 1
- Are the block rows supported? HOT 1
- A space bug. HOT 1
- ubuntu 18.04 vscode yuml plugin memory leak HOT 1
- Wrong Path to data/rgb.txt in loadColors function (file src/utils/yuml2dot-utils.js) HOT 3
- NPM module not finding rgb.txt file! HOT 1
- Class diagram, fields not rendering.... HOT 1
- Package code example code block in wiki is wrong. HOT 1
- When support Nesting for Packages and Deployment? HOT 1
- Partion for acitivity diagram HOT 1
- Class diagram entity's methods causing entity's class not to render HOT 1
- Readme shows black on black img for sequence diag in dark mode HOT 2
- Add zoom in/out of the diagram HOT 1
- Sequence diagram Event Storming and CQRS modelling support
- Class diagram: abstract class/method in italics
- Various output formats
- Activity Diagram: Time Event & Event Signal Icon
- Support name in-between association in class Diagram
- A space bug render text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yuml-diagram.