Comments (5)
看一下这个地址 http://hizzgdev.github.io/jsmind/
声明的也是<!DOCTYPE html>
from jsmind.
额... 这个是ok的,可是我这边不知道啥问题,只要是<!DOCTYPE HTML>
就绘制不了,不要HTML
或改为别的如HTML5
则可以绘制...神奇... 我的用示例代码如下
<!DOCTYPE HTML>
<!-- <!DOCTYPE> -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Document</title>
<link type="text/css" rel="stylesheet" href="jsmind-master/style/jsmind.css" />
<script type="text/javascript" src="jsmind-master/js/jsmind.js"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
var mind = {
"meta":{
"name":"demo",
"author":"",
"version":"0.1"
},
"format":"node_tree",
"data": {
"id": "root",
"topic": "web",
"children": [{
"id": "easy",
"topic": "Easy"
}, {
"id": "open",
"topic": "Open Source",
"children": [{
"id": "open1",
"topic": "on GitHub"
}, {
"id": "open2",
"topic": "BSD License"
}]
}]
}
};
var options = {
container: 'container',
};
var jm = new jsMind(options);
jm.show(mind);
</script>
</body>
</html>
from jsmind.
看看控制台输出的内容。
from jsmind.
控制台和正常绘制输出的一样,这里实际上是已经绘制了,只不过标准h5文档声明<!DOCTYPE HTML>
下,容器的高度未被撑开,即#container
容器的高度为0,而子容器.jsmind-inner
的overflow
为auto
,此种情况下改为visible即可看到图了.
而示例代码http://hizzgdev.github.io/jsmind/中,通过函数`set_container_size()`给容器`#jsmind_container`设定了高度,从而避免了这个问题的出现。
现在要考虑的问题的是,如果不给容器设定高度,也不指定相关容器的overflow
,能否像设置非标准h5文档声明一样可以自动撑开这个高度。
我抽时间再研究下源码,谢谢 @hizzgdev 的回复
from jsmind.
container容器的高度需要按业务场景自行指定。jsmind要确保自身不会超过预设的尺寸。不建议修改jsmind-inner的样式。
from jsmind.
Related Issues (20)
- Implementing draggable plugin with Iframes HOT 2
- 如何单独为每个节点设置线条颜色呢 HOT 7
- 思维导图节点使用support_html属性和<span>标签自定义,点击<span>文字无法选中节点 HOT 4
- 移动或者单击节点,会提示节点找不到 HOT 5
- 如何将生成的思维导图导出呢。我这边用jm实例绘制,拿到的jm实例数据是空的,下载下来的也是空白 HOT 10
- Error: dom-to-image is required since 0.7.2 HOT 1
- uniapp中引入jsmind时, 思维导图的线 和 结点 会分开显示, 不在一起 HOT 4
- 拖拽调整节点顺序,部分位置无法吸附上去 HOT 2
- 请问可以自定义节点样式吗? HOT 2
- 请问有没有办法动态获取jsmind的高度
- 节点删除之后未及时更新 index 属性导致与index 属性相关的方法出现异常,如find_node_after等 HOT 4
- 放大后截图,存在节点错乱问题 HOT 4
- Root node not centered HOT 15
- 使用 custom_node_render 自定义节点后,拖拽卡顿,有时无法拖拽 HOT 6
- 通过npm包安装的无法使用下载导图和拖拽功能啊 HOT 12
- Nodes don't move when press up/down keys HOT 4
- 设置了 custom_node_render 后 jmexpander 位置计算错误被遮蔽 HOT 7
- 最后一个节点编辑后,宽度无法正确调整 HOT 4
- 根节点的连线错位 HOT 2
- 导出图片问题 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 jsmind.