Comments (3)
I think this somehow relates to #38 as well. I'd suggest a zoom level or scale parameter in the vars.d2-config
and/or command line arguments that - when set to the same value for multiple diagrams - ensures consistent item sizes across the rendered images. Then it should also be no problem to determine the required canvas size in Obsidian by querying the generated image height, so that there is no redundant whitespace below the diagram. Diagrams exceeding the available width should be scrollable horizontally. For maximum customization I'd also suggest an explicit per-diagram height (and maybe also width) parameter exclusive to the Obsidian plugin (i.e. they are not passed to D2) which control the size of the canvas in the Obsidian document. This could be useful when the height (which would otherwise be deduced from the generated image height) should be reduced. Then there should also be vertical scrolling.
from d2-obsidian.
Without this feature the plugin is not useful for me, so I consider it a blocker.
from d2-obsidian.
#32 keeps the scale consistent (up to max height 800) (assuming the window has sufficient width). I think this essentially resolves this issue, but if there is a need for consistent scale outside of the max-height or otherwise we can re-open this
from d2-obsidian.
Related Issues (20)
- Enhancement: control size of rendered image
- Ability to scale diagrams HOT 3
- Make a troubleshooting section HOT 1
- Failing to update (or re-install) HOT 2
- investigate export to PDF problem HOT 3
- support animate-interval
- Allow zooming like on the D2 playground
- D2 Compilation error: The operation was aborted HOT 2
- Feature Request: Embed rendered diagrams in scrollable/zoomable window HOT 1
- [Question] How to set the Theme to dark HOT 4
- [feature request] Allow theme selection per diagram HOT 2
- [bug] Extra whitespace at bottom of diagram HOT 3
- Custom arguments to d2 compiler
- error when importing .d2 files from same folder as the .md
- Please support iOS HOT 1
- Flatpak support
- Handle .d2 files
- Syntax Highlighting in markdown
- Support custom fonts
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 d2-obsidian.