Git Product home page Git Product logo

Comments (3)

dosubot avatar dosubot commented on August 25, 2024 2

For custom node rendering in G6 version 5.0.0-beta.32, where the drawOtherShapes method is missing, the G6 team has updated their documentation to include a tutorial on custom nodes. You can find this tutorial here: Custom Nodes Tutorial. This guide provides a comprehensive overview of customization, including specific sections on nodes and edges, which should help address your issue.

Please note, the tutorial is in Chinese, so you might need to use a translation tool if you're not comfortable with the language.

Regarding the broken sandbox link you provided, it's not accessible, so I'm unable to review your implementation directly. If you could update the link or provide a new one, I'd be more than happy to offer more specific guidance based on your code.

If after consulting the tutorial you still face difficulties or have further questions, feel free to share more details about the challenges you're encountering.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

from g6.

Aarebecca avatar Aarebecca commented on August 25, 2024

覆写 render 是可以的

{
  render(attributes, container){
    super.render(attributes, container);
    this.drawMyShapes(attributes, container);
  }

  // 自定义的绘制函数,命名自定
  drawMyShapes(attributes, container) {
      this.upsert(...);
  }
}

from g6.

cidre07 avatar cidre07 commented on August 25, 2024

非常感谢!

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.