uml-diagram-editor
v1.0.6
Published
A simple, lightweight lib to use UML diagram and edit them.
Downloads
12
Readme
Rifora UMLDiagram
A simple, lightweight lib to use UML diagram and edit them.
An extension
A new shape have to extends superclass
Shapefrom 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
ShapePropsprops. The view part can use only themselves or extend.The view part and the shape logic must be registered in a
Registerclass. TheRegisterclass have to be extend byCoreRegisterand 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.
