Comments (4)
感谢你的回答。
jsMind非最新版,0.6+(6个月前的版本)
因业务需要,未安装依赖包,而是直接引入源代码文件
浏览器 chrome 117.0.5938.149(正式版本) (x86_64)
操作系统 macOS Big Sur 11.7.2
我已经通过笨办法解决了:在span上绑定节点id,然后addEventListener('click', this.handleClick)和this.jm.select_node(e.target.id)
from jsmind.
我这里并不能复现你说的这个现象。你要不在这个 demo 页修改一个节点的 topic 试试看。https://hizzgdev.github.io/jsmind/example/2_features.html
- 如果仍然无法选中节点,那可能是浏览器的问题,或许可以换个电脑或换个浏览器试一下,另外麻烦提供一下你的浏览器及操作系统。
- 如果在上面的页面中没有问题,那猜测可能有以下几种可能:
- 不是最新版本
- 页面上有其它脚本接管了 span 的 click 事件
- 页面上有额外的样式影响到了对 span 的 click
from jsmind.
我看到你对这个问题的解答:#293
我用了两种方式都有点小问题:
1.将 input type=text
改成 input type=textarea
并未能实现节点换行,但title提示换行了
// 节点文字显示
node.topic = `<span>Q: ${item.question}\nC: ${item.contents}</span>`;
- 使用support_html属性 &
标签
// 节点文字显示
node.topic = `<span>Q: ${item.question}<br/>C: ${item.contents}</span>`;
请问有什么办法可以解决吗, 或者如何让jmnode节点删除title属性,这样我就可以在标签上增加title属性是一样的效果
@hizzgdev
提出问题后突然想到一个笨办法:
const nodes = document.getElementsByTagName('jmnode');
for (let i = 0; i < nodes.length; i++) {
const spans = nodes[i].getElementsByClassName('mind-qc-node');
if (spans.length > 0) {
nodes[i].setAttribute('title', spans[0].title || nodes[i].innerText);
}
}
from jsmind.
并不是把 <input type="text">
改成 <input type="textarea">
, 而是改成 <textarea></textarea>
,你再这样试试呢?
另外 jmnode
节点上并没有 title
属性啊。你用的是文档中的提到的 cdn 上的版本吗?
from jsmind.
Related Issues (20)
- 移动或者单击节点,会提示节点找不到 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
- 拖拽事件无法自定义 HOT 2
- 节点内输入的内容怎么换行? HOT 1
- 节点方向(direction) 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.