Giter VIP home page Giter VIP logo

Comments (5)

hizzgdev avatar hizzgdev commented on May 23, 2024

@gmxyb

感谢你的支持。

第一个问题,如果确实需要的话,你可以改进一下,但是要注意js在数字和字符串比较时的特点,不能把节点1和节点“1”当成同一个节点了。

第二个问题,本来这个在计划里,但是后来发现通过监视dom很容易就实现了,做api的话可能会增加学习成本,所以暂时还没有加,想先看看大家反馈的情况再做决定。

第三个问题,画线这个需求看似简单,又很不简单,直线很容易,但是实用性不强,曲线用处广,可是画起来又比较复杂,如果项目需要的话,你可以拿到canvas对象先进行绘制,看看能不能从你的项目中总结出需要的线型,我给加进去。

from jsmind.

gmxyb avatar gmxyb commented on May 23, 2024

回复的好快~~

  1. 我的意思是,应该允许使用number(整形的)的id, parentid,但是内部都转成string而不是直接报错,另外,对于root节点,其实可以不必要加isroot=true,可以更加智能点,找不到 parentid 的就是 root(丢弃多余的),这样从数据库生成数据更规整。

  2. 节点 topic 是html的好处理,可是象select/unselect,展开/收拢 之类的好像不知道如何监听啊~~

  3. 粗看了下源码,确实可以用 canvas 绘制。那么如何取节点的位置属性呢?如果没有 展开/收拢事件,如何做到绘制的同步处理呢?

^_^~

from jsmind.

hizzgdev avatar hizzgdev commented on May 23, 2024
  1. 报错就不应该了,我回头看一下,作为一个bug处理一下。

  2. isroot这个是我刻意加的,让使用者显式指定,以避免错误的认定根节点,对于tree方式,就没有这个属性了。

  3. 这些事件确实提供一下比较好,暂时可以先用dom的click代替。

  4. 如果需要根据节点坐标画线的话,我想应该需要知道很多坐标才行,你看一下运行期的jsmind对象,有很多隐藏的属性供你参考。

from jsmind.

gmxyb avatar gmxyb commented on May 23, 2024

好的。我在研究研究~ 谢谢了!

from jsmind.

hizzgdev avatar hizzgdev commented on May 23, 2024

resolve dc5c12d

from jsmind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.