uml-diagram-editor
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Rifora UMLDiagram

A simple, lightweight lib to use UML diagram and edit them.

An extension

  • A new shape have to extends superclass Shape from domain.

  • The shape class have to have init field with unique name which will be used to access and restore this shapes.

  • The view part of the shape has to contain ShapeProps props. The view part can use only themselves or extend.

  • The view part and the shape logic must be registered in a Register class. The Register class have to be extend by CoreRegister and all shapes have to be write as a class' fields. After this need to connect field name (written above) with class logic name (init's value). An example:

export class Register extends CoreRegister {
  rect: ShapeRegistryEntry<Rect> = { logic: classBuilder(Rect), view: RectView };

  circle: ShapeRegistryEntry<Circle> = { logic: classBuilder(Circle), view: CircleView };
}

const register = new Register();

register.registerEntries([{ fieldName: 'rect', initName: 'rect' }, { fieldName: 'circle', initName: 'circle' }]);

Release

  • Change the version in package.json
  • Use npm run build
  • Use npm publish

Rollup

Rollup lib is used to prepare the release. Change the rollup.config.js if you need to tune the release.

Readme

Keywords

none

Package Sidebar

Install

npm i uml-diagram-editor

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

638 kB

Total Files

96

Last publish

Collaborators

  • j4ck_vvh173