Code Monkey home page Code Monkey logo

Comments (5)

xiaoSS-developer avatar xiaoSS-developer commented on May 17, 2024 1

https://g6.antv.antgroup.com/manual/middle/states/default-behavior#drag-node 这里面有个onlyChangeComboSize可以配置不将节点从 Combo 中拖出或将节点拖入到 Combo 中,设置为true就行。
不知道能不能解决你的问题

from g6.

github-actions avatar github-actions commented on May 17, 2024

hi @toddmark, welcome!

from g6.

github-actions avatar github-actions commented on May 17, 2024

Hi @toddmark, Please star this repo if you find it useful! Thanks ⭐!
你好 @toddmark。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

from g6.

Yanyan-Wang avatar Yanyan-Wang commented on May 17, 2024

楼上的方法是对的~,另外 drag-node 的 shouldEnd 和 shouldBegin 也可以尝试一下

from g6.

toddmark avatar toddmark commented on May 17, 2024

@xiaoSS-developer onlyChangeComboSize 这个属性是有效的。不过没有完全解决我的问题。我在拖某类节点A时,需要禁止拖入Combo的行为,但我在拖某类节点B时,需要允许拖入Combo的行为。

由此,如果使用onlyChangeComboSize直接禁用。不满足我拖动B类节点行为。这就带来一个新的问题:需要动态修改 drag-node的配置,可惜,我在setMode中没有找到相关方案。请问如何动态修改 setMode 的配置呢? 比如: setMode("drag-node", {test: true}}

from g6.

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.