Skip to content

Proposal: Shape Node #55

@MugenMuso

Description

@MugenMuso

One of commonly associated feature on whiteboard or canvas is integrated flowchart creation.

In order to support this, what do you think of an idea of adding Shape Node. While this might sounds similar to #7, this proposal is more rigid/explicit just like rest of current JSONCanvas spec is.

Generic node inherited shape node

Shape type nodes store shape with optional text. long with generic node attributes, shape nodes include the following attribute:

  • Text (optional, string) in plain text with Markdown syntax.
  • shape is used to determine the shape of the shape node.

1 - Circle/Ellipse
2 - Diamond
3 - Triangle
4 - Rectangle

*Height and width will determine the sizes of these shapes.

More flexible shape nodes.

If more flexible shape support is planned, perhaps shape node should be different from generic node as we might not be able to use width and height in every case.

For example,

Generic shape node

  • id (required, string) is a unique ID for the node.
  • type (required, string) is the shape node type.
  • circle
  • rectangle/square
  • triangle
  • pentagon etc.
  • x (required, integer) is the x position of the node in pixels.
  • y (required, integer) is the y position of the node in pixels.
  • color (optional, canvasColor) is the color of the node, see the Color section.

Then individual shape has additional shape specific attributes

Circle Shape

  • radius int

rectangle

  • width int
  • height

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions