爱意满满的作品展示区。
ssshooter

无框架依赖的思维导图内核 Mind Elixir 开源啦

  •  
  •   ssshooter ·
    ssshooter · Aug 1, 2019 · 7020 views
    This topic created in 2659 days ago, the information mentioned may be changed or developed.

    Github 地址: https://github.com/ssshooter/mind-elixir-core

    试用地址: https://mindelixir.ink/

    mindelixir logo

    Mind elixir 是一个免费开源的思维导图内核

    立即试用

    mindelixir

    https://mindelixir.ink/#/

    在项目中使用

    安装

    NPM

    npm i mind-elixir -S
    
    import MindElixir, { E } from 'mind-elixir'
    

    script 标签引入

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mind-elixir.js"></script>
    

    HTML 结构

    <div class="outer">
      <div id="map"></div>
    </div>
    <style>
      .outer {
        position: relative;
        margin: 50px;
      }
      #map {
        height: 500px;
        width: 100%;
        overflow: auto;
      }
    </style>
    

    初始化

    let mind = new MindElixir({
      el: '#map',
      direction: MindElixir.LEFT,
      data: MindElixir.new('new topic'), // 也可以把 getDataAll 得到的数据初始化
      draggable: true, // 启用拖动 default true
      contextMenu: true, // 启用右键菜单 default true
      toolBar: true, // 启用工具栏 default true
      nodeMenu: true, // 启用节点菜单 default true
      keypress: true, // 启用快捷键 default true
    })
    mind.init()
    
    // get a node
    E('node-id')
    

    Data Export

    mind.getAllData()
    // see src/example.js
    

    使用提示

    direction 选项

    direction 选项可选 MindElixir.LEFT、MindElixir.RIGHT 和 MindElixir.SIDE。

    HTML 结构

    挂载的目标需要定宽高,可以是百分百;外层元素建议设置 position: relative;,否则菜单位置以视窗为标准分布。

    E 函数

    在使用节点操作方法时需要传入的参数可以借助 E 函数获得。

    mind.insertSibling(E('bd4313fbac40284b'))
    

    文档

    https://inspiring-golick-3c01b9.netlify.com/

    依赖

    hotkeys-js

    Supplement 1  ·  Aug 3, 2019
    添加 i18n 支持(中英日)
    26 replies  •  2019-08-03 14:35:19 +08:00
    ankazen
    ankazen
    Aug 1, 2019
    1
    非常棒,完成度很高
    azssjli
    azssjli
    Aug 1, 2019
    2
    试了下,发现触摸板移动,只能上下左右,不能左上左下,或任意角度移动,不算这个其他都挺好了,给个赞
    tt67wq
    tt67wq
    Aug 1, 2019❤️1
    3
    我擦 以为是个 elixir 的项目,原来不是
    ssshooter
    ssshooter
    OP
    Aug 1, 2019
    4
    @tt67wq 对不起是 JavaScript 项目😂
    @azssjli 有可能是触摸板本身不能同时垂直水平移动? macbook 的触摸板是可以左上左下的
    @ankazen 感谢支持!
    kokdemo
    kokdemo
    Aug 1, 2019
    5
    赞,我想想怎么做成 hugo 的插件
    ZiLong
    ZiLong
    Aug 1, 2019
    6
    非常棒
    zaynex
    zaynex
    Aug 1, 2019
    7
    赞,专注模式很有意思!
    NUT
    NUT
    Aug 1, 2019
    8
    如果导出可以搞成 Markdown 就好了。
    everettjf
    everettjf
    Aug 1, 2019
    9
    给力
    ssshooter
    ssshooter
    OP
    Aug 1, 2019
    10
    @kokdemo 支持!!

    @NUT 这个真的可以有,周末研究一下

    @everettjf 头像给力😂
    viperasi
    viperasi
    Aug 1, 2019
    11
    好东西,码云上也来一份吧。
    jorneyr
    jorneyr
    Aug 1, 2019
    12
    看上去很不错
    MonoBiao
    MonoBiao
    Aug 1, 2019
    13
    看起来不错,赞一个
    noli
    noli
    Aug 1, 2019
    14
    问个可能离题的问题,Elixir 是什么意思?
    ipwx
    ipwx
    Aug 1, 2019
    15
    It would be fantastic if you support MathJax/KaTeX.
    Mitt
    Mitt
    Aug 1, 2019
    16
    @ssshooter macbook 触控板也只能四相移动,只是 macbook 的触控板比较灵活感觉好像可以八相,但实际上移动是先平移后上移的
    ssshooter
    ssshooter
    OP
    Aug 1, 2019❤️1
    17
    @noli 魔法药水 /灵丹妙药
    @ipwx Thanks for your advice, this feature will be soon evaluated.
    jorneyr
    jorneyr
    Aug 1, 2019
    18
    Mac Safari 不能编辑,Mac Chrome 可以编辑,但是编辑的体验很不好,编辑框和内容没有完全重叠。
    ssshooter
    ssshooter
    OP
    Aug 2, 2019
    19
    @jorneyr 已修复 safari 不能编辑的 bug
    haozes
    haozes
    Aug 2, 2019
    20
    思维导图的工具实在太多,而且好用的也不少。这方面没太多需求。但画流程图,像 https://www.processon.com/
    这样的画流程图,代替 VISIO ( VISIO 不能跨平台)这种,很少而且收费,期待楼主考虑下这种
    ssshooter
    ssshooter
    OP
    Aug 2, 2019
    21
    @haozes emmm 其实也不是主推在线思维导图服务,而是希望这个项目能让前端开发者方便地在自己的项目使用思维导图
    netnr
    netnr
    Aug 2, 2019
    22
    支持,顶顶顶

    前面接触了 mxgraph 和百度脑图,集成的效果
    //www.netnr.com/draw/discover
    ssshooter
    ssshooter
    OP
    Aug 2, 2019
    23
    @netnr 哇这个功能真的丰富😂
    netnr
    netnr
    Aug 2, 2019
    24
    但你造轮子,赞
    ssshooter
    ssshooter
    OP
    Aug 2, 2019
    25
    @netnr 👌谢谢
    Jex
    Jex
    Aug 3, 2019
    26
    我也以为是 Elixir 写的。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1419 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 16:48 · PVG 00:48 · LAX 08:48 · JFK 11:48
    ♥ Do have faith in what you're doing.