Root node not centered #562
Replies: 15 comments
|
Hi, @christopheSeeka , 2 questions:
It looks like the root node was taller and narrower when it was first loaded, and then became shorter and wider when the style was loaded. |
|
Hi, thank you for the answer,
Knowing that the issue seem related to white-space: normal!important; in jmnode.root, if i remove it, it is centered from the start even with max-width: 650px for example so it seem that switching white-space to multiline is triggering the problem. |
|
This is first load with just changing: to It center properly right away. |
|
Yes, by default, how the customized css rules loaded? is it loaded before executing I guess it will work if you add a new <link...> referencing to this stylesheet, just like how you reference And have you considered to add the styles as a new theme? BTW, If you just want to wrap text, there is an option |
|
Hello, thank you very much, view.node_overflow do the job so i don't need to overide the white-space in my css anymore :) I have a question, is there a way to identify left node to right nodes? basically i'd like to have text-align left on right nodes and text-align right on left node but i don't see any way to identify left one to right one. |
|
Thank you, so i have to go over each nodes in a js loop and add classes based on direction, is that correct? |
|
You can leverage |
|
This is a sample of how to use the option https://github.com/hizzgdev/jsmind-samples/blob/main/jsmind-use-cases/jsmind-mathjax.html |
|
Thank you very much, will try figure that out :) |
|
Perfect, it's working, thank you very much :) then
Thank you very much :) |
|
I noticed that using hide_scrollbars_when_draggable: true work well on desktop but the drag don't work on mobile with this activated, is it a known issue? |
|
We didn't do much on mobile compatibility. I guess that on the mobile device, the touch screen is actually a simulated scroll bar, and |
|
Make sens, i will do that, thank you :) |
|
will move this topic to Discussion |



Uh oh!
There was an error while loading. Please reload this page.
Hello,
Implementing jsmind into our project and quite happy with the result but for some reason, i'm running into the following issue:
When i load the mindmap for the the first time, the root node is not centered.
If i clear it and load it again, it is centered.
I did change the css as follow to have the root node multiline and adjust a bit the expander that wasn't well aligned:
and in js (vue3 application) i do the following:
Any idea what i could be missing?
All reactions