1.0.1 • Published 2 years ago

@kjn/svg-minimap v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@kjn/svg-minimap

semantic-release: angular

npm version

Creates a zoomable, pannable minimap component for your svg elements.

Usage

Install this package

npm install @kjn/svg-minimap

Import and initialise the minimap

import SvgMinimap from "@kjn/svg-minimap";

new SvgMinimap(document.getElementById("svg"), document.getElementById("minimapContainer"));

Assuming that we have a <svg> element that contains various svg drawings. AND that there exists a (preferably bounded) container where the minimap should be placed into.

For more details on how to use, check the examples directory.