# @dudes/lumly.uml.viewer

> Drawing UML diagrams on canvas

Latest version **0.0.9-build.1** (published 2018-01-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dudes/lumly.uml.viewer
pnpm add @dudes/lumly.uml.viewer
yarn add @dudes/lumly.uml.viewer
bun add @dudes/lumly.uml.viewer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9-build.1 |
| Published | 2018-01-12 |
| First published | 2017-12-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ievgenii Sen |
| Maintainers | stepan-kasyanenko, jexim, alexeypolitov |
| Keywords | uml, diagram, canvas |

## Links

- npm: https://www.npmjs.com/package/@dudes/lumly.uml.viewer
- Repository: https://github.com/DUDESTeam/lumly-viewer-gojs
- Homepage: https://github.com/DUDESTeam/lumly-viewer-gojs#readme
- Issues: https://github.com/DUDESTeam/lumly-viewer-gojs/issues
- npm.io page: https://npm.io/package/@dudes/lumly.uml.viewer

## Dependencies (1)

- [gojs](https://npm.io/package/gojs.md) ^1.8.5

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.9-build.1 (latest) — 2018-01-12
- 0.0.8-build.1 — 2018-01-08
- 0.0.7-build.1 — 2018-01-05
- 0.0.6-build.1 — 2018-01-04
- 0.0.5-build.1 — 2017-12-29
- 0.0.4-build.1 — 2017-12-28
- 0.0.3-build.1 — 2017-12-27
- 0.0.2-build.1 — 2017-12-26
- 0.0.1-build.4 — 2017-12-26
- 0.0.1-build.3 — 2017-12-22
- 0.0.1-build.2 — 2017-12-22
- 0.0.1-build.1 — 2017-12-21

## README

The project is based on [GoJS](https://github.com/NorthwoodsSoftware/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 <div> 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](http://fabricjs.com/docs/fabric.Canvas.html).

### 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](https://i.imgur.com/NQqnEKY.png)

If error:

![UML Diagram Error Screenshot](https://i.imgur.com/Y9bJfgz.png)

---
_Source: https://npm.io/package/@dudes/lumly.uml.viewer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
