0.0.9-build.1 • Published 6 years ago

@dudes/lumly.uml.viewer v0.0.9-build.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

The project is based on GoJS.

Quick start

Install dependencies

yarn install

Start developing

npm run start

Build the project

Build distribution and minified distribution file 'dist/uml.js'

npm run build

Getting started

Preparation

Create an HTML element with an id attribute. Something like:

<div id="uml"></div>

Create an UML document

Next, use the UML() function to create an UML document within the wrapper element:

var uml = new UML('uml');

The first argument should be an id of the element. The second optional argument is options for fabric.Canvas.

Draw diagram

Pass JSON object to UML.draw() (Promise function):

const json = JSON.stringify({
  "title": "Some diagram",
  "type": "usecase-diagram",
  "definitions": {
    "Actor01": {
      "title": "John Doe",
      "type": "actor"
    }
  }
});

uml.draw(json).then(
  () => console.log('Diagram was successfully created!'),
  (error) => alert(error)
);

Result:

UML Diagram Screenshot

If error:

UML Diagram Error Screenshot

0.0.9-build.1

6 years ago

0.0.8-build.1

6 years ago

0.0.7-build.1

6 years ago

0.0.6-build.1

6 years ago

0.0.5-build.1

6 years ago

0.0.4-build.1

6 years ago

0.0.3-build.1

6 years ago

0.0.2-build.1

6 years ago

0.0.1-build.4

6 years ago

0.0.1-build.3

6 years ago

0.0.1-build.2

6 years ago

0.0.1-build.1

6 years ago