Comments (6)
I understand, for now, I'll use this patch. It works reasonably well in my current scenario, as the node text isn't extensive. If possible, could you add an option or another method that doesn't require modifying the mind-elixir source code? I anticipate that this patch could become unstable with future mind-elixir updates.
from mind-elixir-core.
Have a try~
from mind-elixir-core.
I'm curious as to why
generateSvgText
isn't used universally.
Because svg text doesn't wrap by default. You have to calculate width of each character to decide when to wrap a line, which is difficult and slow.
So If you don't care about text wrapping, you can just replace generateSvgTextUsingForeignObject
with generateSvgText
. 😂
from mind-elixir-core.
@SSShooter Thanks! It works!
But 4dddb32#diff-22661bb30bb26ab73ab4ec6375682479d6635ce978aaa6b8a3f2ae02e68a9db0R50-R56 breaking another things:
When calling the exportSvg()
or exportSvg(true)
, an error message appears in the console: Error: <rect> attribute width: Expected length, "auto".
Upon checking, it appears that <rect>
elements are being generated as <rect x="661" y="821" rx="0px" ry="0px" width="auto" height="auto">
This issue seems to arise because the getComputedStyle
function, when used on a span
element, returns a width value of auto
.
from mind-elixir-core.
@SSShooter Thanks! It works!
But 4dddb32#diff-22661bb30bb26ab73ab4ec6375682479d6635ce978aaa6b8a3f2ae02e68a9db0R50-R56 breaking another things:
When calling the
exportSvg()
orexportSvg(true)
, an error message appears in the console:Error: <rect> attribute width: Expected length, "auto".
Upon checking, it appears that
<rect>
elements are being generated as<rect x="661" y="821" rx="0px" ry="0px" width="auto" height="auto">
This issue seems to arise because the
getComputedStyle
function, when used on aspan
element, returns a width value ofauto
.
please check 3.2.6
from mind-elixir-core.
@SSShooter Thanks! It works!
But 4dddb32#diff-22661bb30bb26ab73ab4ec6375682479d6635ce978aaa6b8a3f2ae02e68a9db0R50-R56 breaking another things:
When calling theexportSvg()
orexportSvg(true)
, an error message appears in the console:Error: <rect> attribute width: Expected length, "auto".
Upon checking, it appears that<rect>
elements are being generated as<rect x="661" y="821" rx="0px" ry="0px" width="auto" height="auto">
This issue seems to arise because thegetComputedStyle
function, when used on aspan
element, returns a width value ofauto
.please check 3.2.6
Test successful, the functionality is now working as expected.
from mind-elixir-core.
Related Issues (20)
- How to enable icons and hyperlinks in the context menu? HOT 1
- nextjs 中图标不显示 HOT 1
- nextjs中使用打包时报错 HOT 8
- How do versions 3.3.2 and version 4 differ? HOT 1
- Download mindmap as image HOT 2
- Does Vue3 have a node menu function? HOT 2
- Mindmap layout details HOT 1
- 导出的图片,节点文字有点向下偏移了
- 一个一面中有多个实例的情况下,使用API(addChild)添加节点,节点都会被添加到第一个实例的画布上
- 站点HTTPS证书,提示无效 https://doc.mind-elixir.com/ HOT 1
- 麻烦请问一下脑图节点之间连接线的粗细可以自定义吗? HOT 2
- 2 windows to create chart HOT 1
- 无法拖动主节点移动画布
- I had a bug when using the api for the new sibling node;(我在使用添加兄弟节点api时发现一个缺陷) HOT 1
- 在vitepress项目中使用本地运行没问题,打包报错了!该如何解决 HOT 3
- 能否在源代码中上线前删除console.log()? HOT 1
- 有数据导出功能那有没有数据导入功能? HOT 2
- 打包中存在TS类型报错;(An TS error occurs in the package. Procedure) HOT 1
- preview image of maindmap HOT 2
- Is there schema for Mindmap json HOT 1
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 mind-elixir-core.