Coder Social home page Coder Social logo

dystudio / blazor.diagrams Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blazor-diagrams/blazor.diagrams

0.0 1.0 0.0 11.28 MB

A fully customizable and extensible all-purpose diagrams library for Blazor

Home Page: https://blazor-diagrams.zhaytam.com

License: MIT License

C# 87.79% HTML 7.74% JavaScript 1.03% CSS 3.44%

blazor.diagrams's Introduction

Blazor.Diagrams

Blazor.Diagrams is a fully customizable and extensible all-purpose diagrams library for Blazor (both Server Side and WASM). It was inspired by the popular React library react-diagrams.

Blazor.Diagrams can be used to make advanced diagrams with a custom design. Even the behavior of the library is "hackable" and can be changed to suit your needs. It is very code/OOP oriented, representing a diagram (using models) is seperate from rendering. This has a lot of benefits, for example if you want to (de)serialize diagrams or make an engine that runs at runtime (visual programming).

This library aims to provide most of its features using C#/Blazor while minimizing Javascript.

NuGet Package Version Download
Z.Blazor.Diagrams.Core NuGet Nuget
Z.Blazor.Diagrams NuGet Nuget
Z.Blazor.Diagrams.Algorithms NuGet Nuget
Badges
JavaScript GitHub file size in bytes
CSS GitHub file size in bytes
Activity GitHub
License GitHub

Getting Started

You can get started very easily & quickly using:

Functionalities

  • Panning/Zooming
  • Ports & Links (no free links for now)
  • Multi selection / deletion
  • Locking mechanism
  • Custom nodes/links
  • SVG layer for links/nodes and HTML layer for nodes for maximum customizability
  • Replaceable behaviors (e.g. link dragging, model deletion, ...)
  • Zoom to fit (all nodes or selected ones only)
  • Customizable Diagram Overview/Preview/Navigator (on the bottom right by default)
  • Snap to Grid
  • Grouping: [CTRL + ALT + G] to (un)group
  • Clipping: only draw nodes that are visible to the users
  • Algorithms

Preview

<CascadingValue Name="DiagramManager" Value="diagramManager">
  <DiagramCanvas>
    <Widgets>
      <Navigator Width="300" Height="200" DefaultStyle="true"></Navigator>
    </Widgets>
  </DiagramCanvas>
</CascadingValue>

Sample project

Repository: https://github.com/zHaytam/Blazor.DatabaseDesigner

Roadmap

  • Better way to handle/render groups
  • Pluggable history (undo/redo)
  • Auto layout

Thinking about

  • Razor-oriented diagram creation
  • Send to front/back (limited since there are 2 layers)
  • Free links, no need for ports (useful in simple diagram scenarios, like a flowchart)
  • A set of common shapes (depends on the above feature)

Feedback

If you find a bug or you want to see a functionality in this library, feel free to open an issue in the repository!
Of course, PRs are very welcome.

blazor.diagrams's People

Contributors

joezearing avatar joriskalz avatar stefanloerwald avatar zhaytam avatar

Watchers

 avatar

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.