uml-diagram-editor
v1.0.6
Published
A simple, lightweight lib to use UML diagram and edit them.
Downloads
10
Readme
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. TheRegister
class have to be extend byCoreRegister
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.