Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

diagram-js-minimap

bpmn-io33.4kMIT5.2.0

A minimap for diagram-js

diagram-js, minimap

readme

diagram-js Minimap

Build Status

A minimap for diagram-js.

Minimap

Features

  • See the whole diagram in the minimap
  • Highlight current viewport
  • Click/drag/scroll the minimap to navigate the diagram

Usage

Extend your diagram-js application with the minimap module. We'll use bpmn-js as an example:

import BpmnModeler from 'bpmn-js/lib/Modeler';

import minimapModule from 'diagram-js-minimap';

var bpmnModeler = new BpmnModeler({
  additionalModules: [
    minimapModule
  ]
});

For proper styling integrate the embedded style sheet:

<link rel="stylesheet" href="diagram-js-minimap/assets/diagram-js-minimap.css" />

Please see this example for a more detailed instruction.

License

MIT

changelog

Changelog

All notable changes to diagram-js-minimap are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

5.2.0

5.1.0

  • FEAT: support multiple diagram-js-instances on the same page
  • FIX: do not copy elements with IDs
  • CHORE: prefix svg graphic IDs

5.0.0

  • CHORE: drop hammerjs dependency (#73)

Breaking Change

  • Following diagram-js@14 this release drops hammerjs and broken touch support.

4.1.0

  • CHORE: bump dependencies
  • CHORE: bump rollup
  • CHORE: use diagram-js facilities for CSS escaping

4.0.1

  • DEPS: make hammerjs regular dependency

4.0.0

  • FEAT: minimap works with touch (#54)
  • DEPS: add hammerjs peer dependency

3.0.0

  • DEPS: update to diagram-js@9

2.1.1

  • FIX: ensure backwards compatibility with diagram-js@7

2.1.0

  • FEAT: support multi-plane diagrams (#46),
  • DEPS: bump diagram-js to 8.1.1

2.0.4

  • FIX: translate toggle button content (#43)

2.0.3

Re-released v2.0.2.

2.0.2

  • FIX: do not log graphics not found (#38)

2.0.1

  • FIX: prevent minimap from crashing on mouse move (#36)

2.0.0

  • CHORE: provide pre-packaged distribution
  • CHORE: bump to diagram-js@4
  • FIX: only update viewbox on valid bounds

1.3.0

  • CHORE: bump to diagram-js@3

1.2.2

Republish with updated changelog.

1.2.0

  • FEAT: zoom on CTRL key only (a1848cf8)
  • FEAT: center & drag on SVG mouse down (5585f871)
  • FIX: change title attribute depending on open/closed (5bc0e04a)

1.1.2

  • FIX: use svgClasses for IE 11 compatibility (#25)

1.1.1

  • FIX: export Minimap as ES module

1.1.0

  • FEAT: align minimap to canvas (0, 0) if possible (#17)
  • FIX: make close handle always clickable (#18)
  • FIX: correct stepping when zooming out (#19)
  • FIX: use same zoom directions like diagram-js ZoomScroll

1.0.0

Breaking Changes

  • CHORE: migrate to ES modules

Other Improvements

  • FEAT: improved minimap UX (#4)
  • FEAT: add more intuitive open / close controls (#5)
  • FIX: disallow minimap zoom outside of minimap (153093be)
  • FIX: ignore canvas.resized events if not present in DOM (24614f86)
  • FIX: correct wheel / click interaction (#12)
  • FIX: properly cleanup global event listeners (#16)

...

Check git log for earlier history.