Git Product home page Git Product logo

editflow's Introduction

๐Ÿบ

Hongxu's github stats

Top Langs

editflow's People

Contributors

dependabot[bot] avatar xuhongxu96 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

editflow's Issues

Undo and Redo

Support redo and undo.
Support keyboard shortcuts.

Thumbnail

Add a thumbnail that shows the framework of the whole canvas.
We may hide the thumbnail for workflow with more than 1K (or ?) nodes for the sake of performance and usability.

Customizable

What "Customizable" means?

Users can do easy customization by modifying a config.
Users can do deep customization by replace them with their own components.

We want to support both scenarios.

Customizable Parts

  • Canvas
    • Context Menu
  • Node
    • Content
    • Style
    • Context Menu
  • Port
    • Style
    • Label
    • Context Menu
  • Handle
    • Style

Box Selection

Drag mouse from a blank space in canvas and a box selection will be created.
When mouse up, all nodes inside the box selection will be selected.

Context Menu

Support context menu (popup by clicking right mouse button) Canvas, Node and Port.

Let's implement our own menu component without involving any 3rd party libraries.
We will add customize support to the menu component later, so that users can use their preferred libraries to customize the menu.

Bad Perf when Box Selecting Many Nodes

Currently, editflow uses quadtree with resolution=60 to filter the nodes covered by the box (rect) and then do a fine-grained filter one by one to ensure we only select the nodes within the box.

The quadtree with resolution=60 is initially used for lazy loading and I just reuse it in box selection. But its resolution is too low to accurately select the nodes. Filtering by enumeration is inefficient when selected nodes become too many.

We need to figure out a better way. E.g. use another quadtree for current visible nodes.

Always show Port Name if Node is Big Enough

It's hard to determine which port to connect to while dragging the edge. Because the port name is not easy to be figured out.
Currently, the only way to see the port name is by hovering the mouse and wait for the popup tooltip.

I think it will be much more user-friendly if port names can be always shown as long as the node has enough width.

Copy, Cut and Paste

Support copy, cut and paste nodes.

Copy will only copy the selected node info to clipboard. If there are any edges between selected nodes, the edge info should also be copied.

Cut will do the same thing with Copy and also delete the selected nodes.

Paste will add nodes and edges according to the node/edge info saved in clipboard.

We also need to have keyboard shortcuts for these actions.

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.