Skip to content

Commit

Permalink
Update Mafs component docs (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
sritchie authored Jun 1, 2024
1 parent 60a074e commit 74d9e3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit 74d9e3f

Please sign in to comment.