A SolidJS screen magnification tool for diagram traversal.
npm install mantis-solidbluefish-solid/src/mantis) is a component built for Mantis. The only other code for Mantis is in bluefish-solid/src/bluefish.tsx. That file is where the output SVG gets rendered and most of the logic happens, so the bulk of Mantis' code can be found there.
component, you'd wrap it on one of the Mantis component (e.g. , , etc.).
traversalPattern -- Determines the traversal pattern for the component. You can learn more about how to use Mantis' traversal patterns in the Traversal Patterns section below. The default is Cursor.
showVoronoi -- This prop is used primarily for debugging. This renders the Voronoi diagram generated by the midpoint of each Bluefish node.
showHighlighting -- Enables the Dynamic Highlighting feature. Essentially, this attempts to highlight both the current node and those related to it.
parameterOverrides -- Overrides Mantis' global constants. Can be used to adjust scroll or cursor sensitivity, for instance. More information in the MantisOverrides type spec.
Bubble: At all times, centers the user's view around the Bluefish node closest to the cursor.
EdgePan: Mirrors the traditional behavior of screen magnifiers. In other words, it allows the user to move their mouse around, but only moves the screen when the cursor is near its edge.
Cursor: A more free form traversal pattern. The center of the screen just follows the mouse.
c: makes the lens shape circular
r: makes the lens shape rectangular
Shift + Click: adds (or deletes) a lens
flexDirection: row stacks the two screens horizontally--left and right. column stacks the two screens vertically--top and bottom. default: row
diagram (required): the MantisDiagram being traversed.
diagram (required): the MantisDiagram being traversed.
flexDirection: row stacks the two screens horizontally--left and right. column stacks the two screens vertically--top and bottom. default: row
a/d: cycles through the auto-map nodes
w: zooms the automatic view out to see all of the related nodes
s: zooms the automatic view in to see the selected node
e: navigates the traveresal/controlled view to the node selected in the automatic view
diagram: the MantisDiagram being traversed.
Shift + Up: zooms in/increases magnification
Shift + Down: zooms out/decreases magnification
f: Freeze/Unfreeze the cursor.
pnpm installed. Installation instructions can be found at https://pnpm.io/installation.
pnpm, open a new terminal window and navigate to project directory. Run the following command to install all necessary packages and dependencies:
pnpm install
App.tsx Filepnpm start, it builds and renders the contents of App.tsx. You should create an App.tsx file in /public. This can be done by duplicating the App.template.tsx file in the /public folder and renaming it to App.tsx.