Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mafs component docs #18

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:extra-deps
{org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojurescript {:mvn/version "1.11.60"}
org.mentat/clerk-utils {:mvn/version "0.5.1"}
org.mentat/clerk-utils {:mvn/version "0.6.0"}

io.github.nextjournal/clerk
{:git/sha "1f6c5331418aaf9c5a4335fc2e6e95f07dc3af6b"}
Expand Down
12 changes: 11 additions & 1 deletion src/mafs/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,21 @@

- `:pan`: If true (default), enable panning with the mouse and keyboard.

- `:view-box`: If true, enable zooming with the mouse and keyboard.
- `:zoom`: If true, enable zooming with the mouse and keyboard.

can also be a map with keys `:min` (in range `(0, 1]`) and `:max` (in range
`[1, ∞)`).

- `:view-box`: (optional) A way to declare the \"area of interest\" of your
visualizations. Mafs will center and zoom to this area. Supply `nil` or a map
with the following key-value pairs:

- `:x`: (optional) a 2-vector of `[<x-min> <x-max>]`

- `:y`: (optional) a 2-vector of `[<y-min> <y-max>]`

- `:padding`: (optional) number of pixels to pad.

- `:preserve-aspect-ratio`: boolean or \"contain\" (default). Whether to
squish the graph to fill the Mafs viewport or to preserve the aspect ratio of
the coordinate space.
Expand Down
Loading