@kjn/svg-minimap
v1.0.1
Published
Automatically generate a fully interactive minimap of any svg component
Downloads
2
Maintainers
Readme
@kjn/svg-minimap
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.